首页上一页 1 下一页尾页 1 条记录 1/1页
<
发表在Java图书答疑
2008-04-19
是否精华
是
否
版块置顶:
是
否
<P>程序报错入下;自几想了很多,查了很多,解决不了 请高手指点 </P>
<P>Exception in thread "AWT-EventQueue-0" org.springframework.dao.DataAccessResourceFailureException: Cannot open connection; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection<BR>Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open connection<BR> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)<BR> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)<BR> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)<BR> at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)<BR> at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)<BR> at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)<BR> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)<BR> at org.hibernate.loader.Loader.doQuery(Loader.java:661)<BR> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)<BR> at org.hibernate.loader.Loader.doList(Loader.java:2145)<BR> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)<BR> at org.hibernate.loader.Loader.list(Loader.java:2024)<BR> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)<BR> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)<BR> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)<BR> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)<BR> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)<BR> at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:839)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:830)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:822)<BR> at dao.UserDAO.queryObject(UserDAO.java:19)<BR> at dao.UserDAO$$FastClassByCGLIB$$7befd4b.invoke(<generated>)<BR> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)<BR> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:608)<BR> at dao.UserDAO$$EnhancerByCGLIB$$a6abf36f.queryObject(<generated>)<BR> at Login$3.actionPerformed(Login.java:99)<BR> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)<BR> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)<BR> at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)<BR> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)<BR> at javax.swing.AbstractButton.doClick(AbstractButton.java:302)<BR> at javax.swing.AbstractButton.doClick(AbstractButton.java:282)<BR> at Login$2.keyPressed(Login.java:76)<BR> at java.awt.Component.processKeyEvent(Component.java:5446)<BR> at javax.swing.JComponent.processKeyEvent(JComponent.java:2713)<BR> at java.awt.Component.processEvent(Component.java:5265)<BR> at java.awt.Container.processEvent(Container.java:1966)<BR> at java.awt.Component.dispatchEventImpl(Component.java:3955)<BR> at java.awt.Container.dispatchEventImpl(Container.java:2024)<BR> at java.awt.Component.dispatchEvent(Component.java:3803)<BR> at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)<BR> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)<BR> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)<BR> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)<BR> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)<BR> at java.awt.Component.dispatchEventImpl(Component.java:3841)<BR> at java.awt.Container.dispatchEventImpl(Container.java:2024)<BR> at java.awt.Window.dispatchEventImpl(Window.java:1778)<BR> at java.awt.Component.dispatchEvent(Component.java:3803)<BR> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)<BR> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)<BR> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)<BR> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)<BR> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)<BR> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)<BR>Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.<BR> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)<BR> at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)<BR> at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)<BR> at java.sql.DriverManager.getConnection(DriverManager.java:525)<BR> at java.sql.DriverManager.getConnection(DriverManager.java:140)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240)<BR> at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)<BR> at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)<BR> ... 52 more<BR></P>
<P>Exception in thread "AWT-EventQueue-0" org.springframework.dao.DataAccessResourceFailureException: Cannot open connection; nested exception is org.hibernate.exception.JDBCConnectionException: Cannot open connection<BR>Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open connection<BR> at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)<BR> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)<BR> at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)<BR> at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)<BR> at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)<BR> at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)<BR> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)<BR> at org.hibernate.loader.Loader.doQuery(Loader.java:661)<BR> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)<BR> at org.hibernate.loader.Loader.doList(Loader.java:2145)<BR> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)<BR> at org.hibernate.loader.Loader.list(Loader.java:2024)<BR> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)<BR> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)<BR> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)<BR> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)<BR> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)<BR> at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:839)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:830)<BR> at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:822)<BR> at dao.UserDAO.queryObject(UserDAO.java:19)<BR> at dao.UserDAO$$FastClassByCGLIB$$7befd4b.invoke(<generated>)<BR> at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)<BR> at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:608)<BR> at dao.UserDAO$$EnhancerByCGLIB$$a6abf36f.queryObject(<generated>)<BR> at Login$3.actionPerformed(Login.java:99)<BR> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)<BR> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)<BR> at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)<BR> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)<BR> at javax.swing.AbstractButton.doClick(AbstractButton.java:302)<BR> at javax.swing.AbstractButton.doClick(AbstractButton.java:282)<BR> at Login$2.keyPressed(Login.java:76)<BR> at java.awt.Component.processKeyEvent(Component.java:5446)<BR> at javax.swing.JComponent.processKeyEvent(JComponent.java:2713)<BR> at java.awt.Component.processEvent(Component.java:5265)<BR> at java.awt.Container.processEvent(Container.java:1966)<BR> at java.awt.Component.dispatchEventImpl(Component.java:3955)<BR> at java.awt.Container.dispatchEventImpl(Container.java:2024)<BR> at java.awt.Component.dispatchEvent(Component.java:3803)<BR> at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1810)<BR> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:672)<BR> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:920)<BR> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:798)<BR> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:636)<BR> at java.awt.Component.dispatchEventImpl(Component.java:3841)<BR> at java.awt.Container.dispatchEventImpl(Container.java:2024)<BR> at java.awt.Window.dispatchEventImpl(Window.java:1778)<BR> at java.awt.Component.dispatchEvent(Component.java:3803)<BR> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)<BR> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)<BR> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)<BR> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)<BR> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)<BR> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)<BR>Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.<BR> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)<BR> at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)<BR> at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)<BR> at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)<BR> at java.sql.DriverManager.getConnection(DriverManager.java:525)<BR> at java.sql.DriverManager.getConnection(DriverManager.java:140)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)<BR> at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:240)<BR> at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)<BR> at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)<BR> ... 52 more<BR></P>