我用了一个多线程并行去连接informix数据库,执行增删改查操作。
同时并行20个线程报了如下错误,jdbc 连接应该没问题。
谁知道是怎么回事。
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:632)
at com.informix.jdbc.IfxDriver.getPropertiesFromUrl(IfxDriver.java:903)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.execute(BasicJdbcManager.java:63)
at com.rx.framework.dao.BaseDAO.execute(BaseDAO.java:97)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.jobStarted(SchedulerDAO.java:138)
at com.rx.toolkit.scheduler.process.session.TaskSession.jobStart(TaskSession.java:138)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:92)
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:632)
at com.informix.jdbc.IfxDriver.getPropertiesFromUrl(IfxDriver.java:903)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.execute(BasicJdbcManager.java:63)
at com.rx.framework.dao.BaseDAO.execute(BaseDAO.java:97)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.jobStarted(SchedulerDAO.java:138)
at com.rx.toolkit.scheduler.process.session.TaskSession.jobStart(TaskSession.java:138)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:92)
Aug 4, 2010 6:40:27 PM com.rx.framework.exception.BaseApplicationException <init>
WARNING: ????
java.sql.SQLException: Message text will be provided in later releases java.lang.NullPointerException
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:423)
at com.informix.jdbc.IfxSqliConnect.<init>(IfxSqliConnect.java:761)
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:251)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.queryForInt(BasicJdbcManager.java:147)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.jobStarted(SchedulerDAO.java:125)
at com.rx.toolkit.scheduler.process.session.TaskSession.jobStart(TaskSession.java:138)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:92)
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:632)
at com.informix.jdbc.IfxDriver.getPropertiesFromUrl(IfxDriver.java:903)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.queryForList(BasicJdbcManager.java:214)
at com.rx.framework.dao.BaseDAO.queryForList(BaseDAO.java:92)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.isJobSucceed(SchedulerDAO.java:78)
at com.rx.toolkit.scheduler.process.handle.INIJobHandle.start(INIJobHandle.java:50)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:95)
Aug 4, 2010 6:40:27 PM com.rx.framework.exception.BaseApplicationException <init>
WARNING: ????
java.sql.SQLException: Database not selected yet.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348)
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3000)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3310)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2263)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2183)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1310)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1283)
at com.informix.jdbc.IfxResultSet.executeQuery(IfxResultSet.java:219)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:815)
at com.informix.jdbc.IfxStatement.executeQuery(IfxStatement.java:146)
at com.rx.framework.jdbc.BasicJdbcManager.queryForList(BasicJdbcManager.java:216)
at com.rx.framework.dao.BaseDAO.queryForList(BaseDAO.java:92)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.isJobSucceed(SchedulerDAO.java:78)
at com.rx.toolkit.scheduler.process.handle.INIJobHandle.start(INIJobHandle.java:50)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:95)
com.rx.framework.exception.BaseApplicationException: ????; nested exception is java.sql.SQLException: Database not selected yet.
java.sql.SQLException: Database not selected yet.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:348)
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3000)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3310)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2263)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2183)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1310)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1283)
at com.informix.jdbc.IfxResultSet.executeQuery(IfxResultSet.java:219)
at com.informix.jdbc.IfxStatement.executeQueryImpl(IfxStatement.java:815)
at com.informix.jdbc.IfxStatement.executeQuery(IfxStatement.java:146)
at com.rx.framework.jdbc.BasicJdbcManager.queryForList(BasicJdbcManager.java:216)
at com.rx.framework.dao.BaseDAO.queryForList(BaseDAO.java:92)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.isJobSucceed(SchedulerDAO.java:78)
at com.rx.toolkit.scheduler.process.handle.INIJobHandle.start(INIJobHandle.java:50)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:95)
java.lang.NullPointerException
at com.informix.jdbc.IfxDriver.getPropertiesFromUrl(IfxDriver.java:852)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.execute(BasicJdbcManager.java:63)
at com.rx.framework.dao.BaseDAO.execute(BaseDAO.java:97)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.initJobLog(SchedulerDAO.java:386)
at com.rx.toolkit.scheduler.process.handle.INIJobHandle.start(INIJobHandle.java:67)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:95)
java.lang.NullPointerException
at com.informix.jdbc.IfxDriver.getPropertiesFromUrl(IfxDriver.java:852)
at com.informix.jdbc.IfxDriver.connect(IfxDriver.java:241)
at java.sql.DriverManager.getConnection(DriverManager.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:186)
at com.rx.framework.jdbc.BasicJdbcManager.getConnection(BasicJdbcManager.java:47)
at com.rx.framework.jdbc.BasicJdbcManager.execute(BasicJdbcManager.java:63)
at com.rx.framework.dao.BaseDAO.execute(BaseDAO.java:97)
at com.rx.toolkit.scheduler.dao.SchedulerDAO.initJobLog(SchedulerDAO.java:386)
at com.rx.toolkit.scheduler.process.handle.INIJobHandle.start(INIJobHandle.java:67)
at com.rx.toolkit.scheduler.process.queue.ProcessQueue$JobProcessor.run(ProcessQueue.java:95)