2013-07-29 157 views
0

我有一個與MySQL連接的問題,我使用Spring MVC 3 /谷歌應用程序引擎JPA /休眠4。我在本地或谷歌應用程序引擎服務器上有錯誤。春天mvc 3休眠異常

org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [S1000]; error code [0]; Could not open connection; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection 
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651) 
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:104) 
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:403) 
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58) 
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) 
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
at com.sun.proxy.$Proxy52.findByLogonemailAndPwd(Unknown Source) 

Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection 
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:52) 
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) 
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) 
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304) 
at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169) 
at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.extractPhysicalConnection(ConnectionProxyHandler.java:82) 
at org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler.continueInvocation(ConnectionProxyHandler.java:138) 
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81) 
at com.sun.proxy.$Proxy64.prepareStatement(Unknown Source) 
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:147) 
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:166) 
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:145) 
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1739) 
at org.hibernate.loader.Loader.doQuery(Loader.java:828) 
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289) 
at org.hibernate.loader.Loader.doList(Loader.java:2463) 
at org.hibernate.loader.Loader.doList(Loader.java:2449) 
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279) 
at org.hibernate.loader.Loader.list(Loader.java:2274) 

:應用程序工作得非常好之前,我重啓機器誤差出現。 謝謝。

回答

0

也許你還沒有開始你的MySQL服務器,例如:它是設置爲手動服務/可執行文件,你必須先

+0

我啓動了mysql服務器,但錯誤仍然存​​在 – badri

0

也許你可以看看你的配置文件,看看MySQL服務器的主機名運行。