简体   繁体   English

在IntelliJ上,如何在启动Glassfish时运行JDBC连接

[英]On IntelliJ, how to run JDBC connection on starting Glassfish

In Intellij Idea 12, i'm trying to start glassfish and deploy my application. 在Intellij Idea 12中,我试图启动glassfish并部署我的应用程序。

I got that error: rg.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Connection could not be allocated because: java.net.ConnectException. 我收到该错误:rg.eclipse.persistence.exceptions.DatabaseException内部异常:java.sql.SQLException:无法分配连接,因为:java.net.ConnectException。 Port 1527 closed. 端口1527已关闭。

But when I run the same project in Netbeans, I see that Netbeans start the connection on 1527 before starting Glassfish. 但是,当我在Netbeans中运行同一项目时,我看到Netbeans在启动Glassfish之前于1527年启动了连接。 And the option is checked: "Enable JDBC Driver Deployment". 并选中该选项:“启用JDBC驱动程序部署”。

How can I do the same in Intellij? 如何在Intellij中做同样的事情?

Thanks in advance 提前致谢

That was due to the Apache derby server that wasn't running. 那是由于Apache derby服务器未运行。 I need to run before the script "startNetworkServer" from derby driver to make it work 我需要在来自derby驱动程序的脚本“ startNetworkServer”之前运行,以使其运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM