我在Java EE的初學者。今天,我嘗試按照本教程學習Java EE: http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.htmlJavaEE的項目無法部署
它基本上教會了如何使用Netbeans從Java Web類別創建Web應用程序。
當我運行應用程序,我得到了這樣的構建失敗的錯誤消息:
WebApplication1/build/web&name=WebApplication1&contextroot=/WebApplication1&force=true failed on GlassFish Server 3+
Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection.
Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused.
Error Code: 0. Please see server.log for more details.
WebApplication1/nbproject/build-impl.xml:721: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 2 seconds)
創建這個項目時,我已經打開GlassFish服務器,並選擇將GlassFish作爲服務器,但它看起來像服務器拒絕連接。
你可以發佈glassfish server.log文件中的內容嗎? – Preston
我找不到它。它是玻璃魚3.1.2。 – qusr