您好我已經在使用mysql的NetBeans 6.9中創建了一個REST風格的Web服務。我遵循本教程從netbeans:http://netbeans.org/kb/docs/websvc/rest.htmlREST風格的Web服務在Netbeans 6.9中使用Mysql測試錯誤
但是,當我試圖測試服務,我在瀏覽器中得到以下錯誤。任何人都可以請幫助如何解決這個問題。
在此先感謝。
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. 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
我有完全相同的問題。 你能看到這個問題: http://stackoverflow.com/questions/10936746/mysql-and-glassfish-error-in-allocating-a-connection 由於我在wamp上使用mysql,我已經給出了管理員屬性中的以下內容: 管理工具的路徑/ URL:http:// localhost/phpmyadmin/ 啓動命令路徑:C:\ wamp \ bin \ mysql \ mysql5.5.24 \ bin \ mysqld.exe 停止命令的路徑:C:\ wamp \ bin \ mysql \ mysql5.5.24 \ bin \ mysqld.exe 參數:-u root stop 它仍然不起作用。你能否提供指針@meraz? 在此先感謝! – JazJ 2012-06-07 22:14:51