开发者

NetBeans Restfull testing error

开发者 https://www.devze.com 2023-02-06 18:26 出处:网络
Hi I am trying to test a RESTful Application, but keep getting the following error. I am using \"NetBeans 6.9.1\" and \"GlassFish Server 3\" and I have added all the JAR files.

Hi I am trying to test a RESTful Application, but keep getting the following error. I am using "NetBeans 6.9.1" and "GlassFish Server 3" and I have added all the JAR files. restlib_gfv3ee6, EclipseLink-GlassFish-v3,EclipseLink(JPA2.0), mysql-connector-java :

GET RequestFailed RequestFailed --> Status: () Response: { HTTP Status 500 -

type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection开发者_如何学JAVA. Cause: null Error Code: 0

root cause

javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null Error Code: 0

root cause

Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null Error Code: 0

root cause

java.sql.SQLException: Error in allocating a connection. Cause: null

please let me know what is the problem ???


Check whether the connection to mysql is defined in the services window or not. It usually looks like 'jdbc:mysql://localhost:3306/mydb[root on Default schema]"

0

精彩评论

暂无评论...
验证码 换一张
取 消