Derby java sql exception

僤鯓⒐⒋嵵緔 提交于 2020-01-06 06:59:34

问题


I am trying to start an application on Glassfish 4 server but it gives me some strange exception: 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: connect. Could it be because I don't have SQL? I am not sure how to fix it.


回答1:


You need to start the Derby Network Server, and have it listen on port 1527 on localhost (which is the default setting for the Derby Network Server, so no special configuration is required to achieve that host and port).

You can find the instructions for starting the Derby Network Server here: http://db.apache.org/derby/docs/10.11/adminguide/tadmincbdjhhfd.html

If you are just getting started with Derby, you can learn more here: http://db.apache.org/derby/docs/10.11/getstart/



来源:https://stackoverflow.com/questions/31572123/derby-java-sql-exception

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!