User id length (0) is outside the range of 1 to 255.
It's because a non-empty username is needed for connection. However, I've put a username and the problem persists.
The solve this problem, edit META-INF/persistence.xml and add the following:
<properties> <property name="javax.persistence.jdbc.user" value="APP"/> <property name="javax.persistence.jdbc.password" value="APP"/> </properties>Change user and password to your configuration.
Note: The above works only for JPA 2.0-compliant ORM. For proprietary EclipseLink would be:
<properties> <property name="eclipselink.jdbc.user" value="APP"/> <property name="eclipselink.jdbc.password" value="APP"/> </properties>
Related resources:
Thanks a ton! I'm very new to Java EE and JPA, and you saved a me headaches.
ReplyDelete