- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在Linux Mandriva上安装了Tomcat 7和MySQL数据库,但是部署在容器中的应用无法连接。
我写了两个简单的测试,当从客户端运行它们时,我得到了连接 -
public class TestHibernate {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
User user = new User();
user.setName("userName");
user.setPassword("userPassword");
Session session = HibernateUtil.
getSessionFactory().openSession();
session.beginTransaction();
session.save(user);
session.getTransaction().commit();
session.close();
}
}
HibernateUtil 的一部分 -
...
cnf.setProperty("hibernate.connection.url", "jdbc:mysql://ip:3306/gibrid");
cnf.setProperty("hibernate.connection.username", "java");
cnf.setProperty("hibernate.connection.password", "java");
...
Jdbc 测试-
public class TestJdbc {
public static void main(String[] args) {
Connection conn = null;
String url = "jdbc:mysql://ip:3306/";
String dbName = "gibrid";
String driver = "com.mysql.jdbc.Driver";
String userName = "java";
String password = "java";
try {
Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url+dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
}
}
}
在这些情况下,我可以获得连接并可以使用数据库。但是当我从客户端浏览器请求时,我会超时。这是为什么?如果能提供信息,我将不胜感激。
这是 catalina.out -
...
INFO: Server startup in 5315 ms
17.10.2012 15:36:52 com.vaadin.terminal.gwt.server.AbstractApplicationServlet serveStaticResourcesInVAADIN
INFO: Requested resource [VAADIN/themes/web13theme/favicon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
17.10.2012 15:36:58 com.vaadin.terminal.gwt.server.AbstractApplicationServlet serveStaticResourcesInVAADIN
INFO: Requested resource [VAADIN/themes/projtheme/img/cancel.png] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
3 [http-bio-8081-exec-7] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.GA
25 [http-bio-8081-exec-7] INFO org.hibernate.cfg.Environment - Hibernate 3.3.0.SP1
39 [http-bio-8081-exec-7] INFO org.hibernate.cfg.Environment - hibernate.properties not found
44 [http-bio-8081-exec-7] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
50 [http-bio-8081-exec-7] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
148 [http-bio-8081-exec-7] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.1.0.GA
176 [http-bio-8081-exec-7] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
247 [http-bio-8081-exec-7] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.ssi.domen.Incoming
313 [http-bio-8081-exec-7] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.ssi.domen.Incoming on table INCOMING
397 [http-bio-8081-exec-7] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.ssi.domen.Outcoming
397 [http-bio-8081-exec-7] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.ssi.domen.Outcoming on table OUTCOMING
400 [http-bio-8081-exec-7] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.ssi.domen.User
400 [http-bio-8081-exec-7] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.ssi.domen.User on table USER
402 [http-bio-8081-exec-7] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.ssi.domen.Cable
402 [http-bio-8081-exec-7] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.ssi.domen.Cable on table CABLE
497 [http-bio-8081-exec-7] INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring
509 [http-bio-8081-exec-7] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
510 [http-bio-8081-exec-7] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
510 [http-bio-8081-exec-7] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
514 [http-bio-8081-exec-7] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://---ip here----/gibrid
514 [http-bio-8081-exec-7] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=java, password=****}
189691 [http-bio-8081-exec-7] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection timed out
STACKTRACE:
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at com.ssi.hbnutils.HibernateUtil.<clinit>(HibernateUtil.java:34)
at com.ssi.windows.RegWindow.check(RegWindow.java:167)
at com.ssi.windows.RegWindow.insert(RegWindow.java:140)
at com.ssi.windows.RegWindow.access$0(RegWindow.java:139)
at com.ssi.windows.RegWindow$1.buttonClick(RegWindow.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:567)
at com.vaadin.ui.Button.changeVariables(Button.java:223)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:323)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
** END NESTED EXCEPTION **
Last packet sent to the server was 6 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2847)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
at com.ssi.hbnutils.HibernateUtil.<clinit>(HibernateUtil.java:34)
at com.ssi.windows.RegWindow.check(RegWindow.java:167)
at com.ssi.windows.RegWindow.insert(RegWindow.java:140)
at com.ssi.windows.RegWindow.access$0(RegWindow.java:139)
at com.ssi.windows.RegWindow$1.buttonClick(RegWindow.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:567)
at com.vaadin.ui.Button.changeVariables(Button.java:223)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:323)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
190005 [http-bio-8081-exec-7] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
190066 [http-bio-8081-exec-7] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
190090 [http-bio-8081-exec-7] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
190092 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
190092 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
190114 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: disabled
190115 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
190116 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
190125 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
190127 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
190127 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
190128 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
190128 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
190129 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
190167 [http-bio-8081-exec-7] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
190169 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
190169 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
190170 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
190171 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
190171 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
190173 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
190174 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
190239 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
190250 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
190250 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
190260 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
190260 [http-bio-8081-exec-7] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
190761 [http-bio-8081-exec-7] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
191112 [http-bio-8081-exec-7] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
380252 [http-bio-8081-exec-7] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 08S01
380252 [http-bio-8081-exec-7] ERROR org.hibernate.util.JDBCExceptionReporter - Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection timed out
STACKTRACE:
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
at com.ssi.windows.RegWindow.check(RegWindow.java:168)
at com.ssi.windows.RegWindow.insert(RegWindow.java:140)
at com.ssi.windows.RegWindow.access$0(RegWindow.java:139)
at com.ssi.windows.RegWindow$1.buttonClick(RegWindow.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:567)
at com.vaadin.ui.Button.changeVariables(Button.java:223)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:323)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
** END NESTED EXCEPTION **
Last packet sent to the server was 5 ms ago.
最佳答案
我不熟悉 Hibernate,所以我不知道这是否相关:
“未找到 hibernate.properties”
“在 URL 上使用驱动程序:com.mysql.jdbc.Driver:jdbc:mysql://---ip here----/gibrid”
IP 和端口是否与您测试程序中的相同?
这blog提示 C3PO 的配置问题。一条评论暗示了 Mysql 和 C3PO 之间不同的超时设置。
关于mysql - Linux Mandriva : Tomcat can not get MySQL database connection, 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12934384/
使用 caret::train() 运行逻辑回归模型时出现问题。LR = caret::train(Satisfaction ~., data= log_train, method = "glm",
我正在尝试将nginx容器作为我所有网站和Web服务的主要入口点。我设法将portainer作为容器运行,并且可以从互联网上访问它。现在,我正在尝试访问由另一个Nginx容器托管的静态网站,但这样做失
我有一个在 Windows XP SP3 x86 上运行的 Visual Studio 2008 C# .NET 3.5 应用程序。在我的应用程序中,我有一个事件处理程序 OnSendTask 可以同
我在 Eclipse 中创建了作为独立程序执行的此类,它可以毫无问题地连接所有 http URL(例如:http://stackoverflow.com),但是当我尝试连接到 https(例如 htt
我在我的 nginx 错误日志中收到大量以下错误: connect() failed (111: Connection refused) while connecting to upstream 我的
我正在尝试将新的 log4j2 与 Socket Appender 一起使用,但我有点不走运。这是我的 XML 配置文件:
我目前正在尝试寻找 Android 应用程序后端的替代方案。目前,我使用 php servlet 来查询 Mysql 数据库。数据库(Mysql)托管在我大学的计算机上,因此我无法更改任何配置,因为我
类MapperExtension有一些方法,before_insert, before_update, ...都有一个参数connection. def before_insert(self, map
嗨,我正在尝试更改位于连接库 (v 5.5) 中的文档的文档所有者,我仍在等待 IBM 的回复,但对我来说可能需要太长时间,这就是我尝试的原因逆向工程。 我尝试使用标准编辑器 POST 请求将编辑器更
我在 nginx( http://52.xx.xx.xx/ )上访问我的 IP 时遇到 502 网关错误,日志只是这样说: 2015/09/18 13:03:37 [error] 32636#0: *
我要实现 Connected-Component Labeling但我不确定我应该以 4-connected 还是 8-connected 的方式来做。我已经阅读了大约 3 种 Material ,但
我在Resources ->JMS ->Connection Factories下有两个连接工厂。 1) 连接工厂 2)集成连接工厂 我想修改两个连接工厂下连接池的最大连接数。资源 ->JMS ->连
我在将 mongoengine 合并到我的 django 应用程序时遇到问题。以下是我收到的错误: Traceback (most recent call last): File "/home/d
上下文 我正在关注 tutorial on writing a TCP server last week in Real World Haskell .一切顺利,我的最终版本可以正常工作,并且能够在
我在访问我的域时遇到了这个问题:我看到了我的默认 http500 错误 django 模板正在显示。 我有 gunicorn 设置: command = '/usr/local/bin/gunicor
我更换了电脑,并重新安装了所有版本:tomcat 8 和 6、netbeans 8、jdk 1.7、hibernate 4.3.4,但是当我运行 Web 应用程序时,出现此错误。过去使用我的旧电脑时,
您好,我是这个项目的新手,我在 CentOS7 ec2 实例上托管它时遇到问题。当我访问我的域时出现此错误: 2017/02/17 05:53:35 [error] 27#27: *20 connec
在开始之前,我已经查看了所有我能找到的类似问题,但没有找到解决我的问题的方法。 我正在运行 2 个 docker 容器,1 个用于 nginx,1 个用于 nodejs api。我正在使用 nginx
使用 debian 包将 kaa -iot 平台配置为单节点时。我收到以下错误。 himanshu@himpc:~/kaa/deb$ sudo dpkg -i kaa-node-0.10.0.deb
我是我公司开发团队的成员,担任管理员角色。我可以通过 https://developer.apple.com/ 访问团队的成员(member)中心 但是,当我尝试在 https://itunescon
我是一名优秀的程序员,十分优秀!