Hi!
There may be an error before or after this about a failure to get the transaction manager from JNDI. But if it fails on JNDI it tries to use DBCP (the Apache Data-Base-Connection-Pool, which BTW is not XA aware), and then direct JDBC driver class loading. But the driver class loading is very slow,after the exception,i test login ,it's success after 20 minutes or more long time. Why the DBCP connect sometime failure?I don't know what do,now i am very worry. I'II expect to help! OFBIZ:V3.1.0 DB:MS SQL Server 2000 chinese OS:Windows 2000 Server You must specify either inline-jdbc or jndi-jdbc, but not both, for the datasource.I specify the inline-jdbc,the following data source. <datasource name="localmssql" helper-class="org.ofbiz.entity.datasource.GenericHelperDAO" schema-name="dbo" field-type-name="mssql" check-on-start="true" add-missing-on-start="true" join-style="ansi" use-fk-initially-deferred="false"> <read-data reader-name="main"/> <inline-jdbc jdbc-driver="com.microsoft.jdbc.sqlserver.SQLServerDriver" jdbc-uri="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=applyservice_12;SelectMethod=Cursor" jdbc-username="ofbiz" jdbc-password="ofbiz" isolation-level="ReadCommitted" pool-minsize="10" pool-maxsize="100"/> <!--<jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localmssql" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name --> </datasource> I get the following exception. 160375[ ConnectionFactory.java:74 :ERROR] ---- runtime exception report -------------------------------------------------- There was an error getting a DBCP datasource. Exception: java.lang.NullPointerException Message: null ---- stack trace --------------------------------------------------------------- java.lang.NullPointerException org.apache.commons.pool.impl.GenericObjectPool.borrowObject( GenericObjectPool.java:841) org.apache.commons.dbcp.PoolingDataSource.getConnection( PoolingDataSource.java:95) org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection( DBCPConnectionFactory.java:61) org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources( ConnectionFactory.java:71) org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158) org.ofbiz.entity.transaction.TransactionFactory.getConnection( TransactionFactory.java:105) org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java :53) org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:367) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:351) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:530) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:501) org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey( GenericHelperDAO.java:90) org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java :606) org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java :644) org.ofbiz.shark.instance.Process.<init>(Process.java:58) org.ofbiz.shark.instance.Process.getInstance(Process.java:87) org.ofbiz.shark.instance.EntityPersistentMgr.restoreProcess( EntityPersistentMgr.java:154) org.enhydra.shark.SharkUtilities.getProcess(Unknown Source) org.enhydra.shark.ExecutionAdmin.getProcess(Unknown Source) org.enhydra.shark.ExecutionAdmin.getProcess(Unknown Source) org.ofbiz.shark.requester.RequesterFactory.restoreRequesters( RequesterFactory.java:145) org.ofbiz.shark.container.SharkContainer.start(SharkContainer.java:159) org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:89) org.ofbiz.base.start.Start.startStartLoaders(Start.java:258) org.ofbiz.base.start.Start.startServer(Start.java:309) org.ofbiz.base.start.Start.start(Start.java:313) org.ofbiz.base.start.Start.main(Start.java:399) -------------------------------------------------------------------------------- 160515[ Process.java:92 :INFO ] Returning null Process ID : 10856_applyservice_v1_new_apply_v1 170172[ ConnectionFactory.java:66 :ERROR] ---- runtime exception report -------------------------------------------------- There was an error getting a Minerva datasource. Exception: java.lang.RuntimeException Message: No ManagedConnections Available! ---- stack trace --------------------------------------------------------------- java.lang.RuntimeException: No ManagedConnections Available! org.ofbiz.minerva.pool.ObjectPool.getObject(ObjectPool.java:657) org.ofbiz.minerva.pool.jdbc.xa.XAPoolDataSource.getConnection( XAPoolDataSource.java:359) org.ofbiz.entity.transaction.MinervaConnectionFactory.getConnection( MinervaConnectionFactory.java:56) org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources( ConnectionFactory.java:63) org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158) org.ofbiz.entity.transaction.TransactionFactory.getConnection( TransactionFactory.java:105) org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java :53) org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:367) org.ofbiz.entity.datasource.GenericDAO.selectListIteratorByCondition( GenericDAO.java:920) org.ofbiz.entity.datasource.GenericDAO.selectByCondition(GenericDAO.java :761) org.ofbiz.entity.datasource.GenericHelperDAO.findByCondition( GenericHelperDAO.java:190) org.ofbiz.entity.GenericDelegator.findByCondition(GenericDelegator.java :1150) org.ofbiz.service.job.JobManager.poll(JobManager.java:148) org.ofbiz.service.job.JobPoller.run(JobPoller.java:96) java.lang.Thread.run(Thread.java:536) -------------------------------------------------------------------------------- 170250[ ConnectionFactory.java:74 :ERROR] ---- runtime exception report -------------------------------------------------- There was an error getting a DBCP datasource. Exception: java.lang.NullPointerException Message: null ---- stack trace --------------------------------------------------------------- java.lang.NullPointerException org.apache.commons.pool.impl.GenericObjectPool.borrowObject( GenericObjectPool.java:841) org.apache.commons.dbcp.PoolingDataSource.getConnection( PoolingDataSource.java:95) org.ofbiz.entity.transaction.DBCPConnectionFactory.getConnection( DBCPConnectionFactory.java:61) org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources( ConnectionFactory.java:71) org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158) org.ofbiz.entity.transaction.TransactionFactory.getConnection( TransactionFactory.java:105) org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java :53) org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:367) org.ofbiz.entity.datasource.GenericDAO.selectListIteratorByCondition( GenericDAO.java:920) org.ofbiz.entity.datasource.GenericDAO.selectByCondition(GenericDAO.java :761) org.ofbiz.entity.datasource.GenericHelperDAO.findByCondition( GenericHelperDAO.java:190) org.ofbiz.entity.GenericDelegator.findByCondition(GenericDelegator.java :1150) org.ofbiz.service.job.JobManager.poll(JobManager.java:148) org.ofbiz.service.job.JobPoller.run(JobPoller.java:96) java.lang.Thread.run(Thread.java:536) -------------------------------------------------------------------------------- 170531[ ConnectionFactory.java:66 :ERROR] ---- runtime exception report -------------------------------------------------- There was an error getting a Minerva datasource. Exception: java.lang.RuntimeException Message: No ManagedConnections Available! ---- stack trace --------------------------------------------------------------- java.lang.RuntimeException: No ManagedConnections Available! org.ofbiz.minerva.pool.ObjectPool.getObject(ObjectPool.java:657) org.ofbiz.minerva.pool.jdbc.xa.XAPoolDataSource.getConnection( XAPoolDataSource.java:359) org.ofbiz.entity.transaction.MinervaConnectionFactory.getConnection( MinervaConnectionFactory.java:56) org.ofbiz.entity.jdbc.ConnectionFactory.tryGenericConnectionSources( ConnectionFactory.java:63) org.ofbiz.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:158) org.ofbiz.entity.transaction.TransactionFactory.getConnection( TransactionFactory.java:105) org.ofbiz.entity.jdbc.ConnectionFactory.getConnection(ConnectionFactory.java :53) org.ofbiz.entity.jdbc.SQLProcessor.getConnection(SQLProcessor.java:267) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:367) org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement(SQLProcessor.java:351) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:530) org.ofbiz.entity.datasource.GenericDAO.select(GenericDAO.java:501) org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey( GenericHelperDAO.java:90) org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java :606) org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java :644) org.ofbiz.shark.instance.Process.<init>(Process.java:58) org.ofbiz.shark.instance.Process.getInstance(Process.java:87) org.ofbiz.shark.instance.EntityPersistentMgr.restoreProcess( EntityPersistentMgr.java:154) org.enhydra.shark.SharkUtilities.getProcess(Unknown Source) org.enhydra.shark.ExecutionAdmin.getProcess(Unknown Source) org.enhydra.shark.ExecutionAdmin.getProcess(Unknown Source) org.ofbiz.shark.requester.RequesterFactory.restoreRequesters( RequesterFactory.java:145) org.ofbiz.shark.container.SharkContainer.start(SharkContainer.java:159) org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:89) org.ofbiz.base.start.Start.startStartLoaders(Start.java:258) org.ofbiz.base.start.Start.startServer(Start.java:309) org.ofbiz.base.start.Start.start(Start.java:313) org.ofbiz.base.start.Start.main(Start.java:399) -------------------------------------------------------------------------------- |
Free forum by Nabble | Edit this page |