我有一个在 Windows 7 中运行的 java 网站应用程序,它使用 oracle 数据库来实现其功能。数据库具有默认 SID 名称 orcl。当我使用 tnsping 时,我可以看到 orcl 服务处于活动状态。除一部分外,大多数应用程序都运行良好。我想知道是否有人可以帮助我解决以下错误:-
1. cause:
message:null,java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.olat.course.statistic.StatisticAutoCreator.createController(StatisticAutoCreator.java:73)
at org.olat.course.statistic.StatisticActionExtension.createController(StatisticActionExtension.java:40)
at org.olat.course.statistic.StatisticMainController.createController(StatisticMainController.java:80)
at org.olat.core.gui.control.generic.layout.GenericMainController.getContentCtr(GenericMainController.java:258)
at org.olat.core.gui.control.generic.layout.GenericMainController.event(GenericMainController.java:221)
at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:196)
2. cause:
message:Could not get JDBC Connection; nested exception is java.sql.SQLException: The Network Adapter could not establish the connection,org.springframework.jdbc.CannotGetJdbcConnectionException
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:463)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:471)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:476)
at org.springframework.jdbc.core.JdbcTemplate.queryForLong(JdbcTemplate.java:480)
at org.olat.course.statistic.SimpleStatisticInfoHelper.doGetFirstLoggingTableCreationDate(SimpleStatisticInfoHelper.java:63)
at org.olat.course.statistic.SimpleStatisticInfoHelper.getFirstLoggingTableCreationDate(SimpleStatisticInfoHelper.java:81)
at org.olat.course.statistic.StatisticDisplayController.getStatsSinceStr(StatisticDisplayController.java:517)
3. cause:
message:The Network Adapter could not establish the connection,java.sql.SQLException
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:480)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:508)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
4. cause:
message:The Network Adapter could not establish the connection,oracle.net.ns.NetException
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:328)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:421)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:634)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:208)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:508)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:203)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
5. cause:
message:Connection timed out: connect,java.net.ConnectException
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at java.net.Socket.(Socket.java:372)
at java.net.Socket.(Socket.java:186)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:127)