Derby Error Starting Glassfish

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As my application has grown larger, something that has been working for some time has started failing while Glassfish is starting up; EJB timers.  During startup, I see the exception below.  Following this, timers can not function as the EJB timer is not available.  In addition, I have found that random SAs become unavailable and have to be reloaded.  Sometimes this issue appears to "fix itself" but I have not been able to identify a pattern, and it seems to be getting worse.  I hope someone has some ideas...

Thanks

JDO74009: Bean 'TimerBean' method ejbSelectAllTimersByOwnerAndState: problems running JDOQL query with params [server, 0]
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 38 more
EJB5018: An exception was thrown during an ejb invocation on [TimerBean]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the database has not been started or the timer database table has not been created.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
        at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
        at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
        at com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
        at com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW", t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE", t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server, java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
        at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
        at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
        at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
JTS5064: Unexpected exception occurred while delisting the resource
javax.transaction.xa.XAException
        at org.apache.derby.jdbc.EmbedXAResource.end(Unknown Source)
        at com.sun.gjc.spi.XAResourceImpl.end(XAResourceImpl.java:100)
        at com.sun.jts.jta.TransactionState.beforeCompletion(TransactionState.java:161)
        at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:133)
        at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158)
        at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548)
        at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:278)
        at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
        at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
        at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the database has not been started or the timer database table has not been created.
javax.transaction.RollbackException
        at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:311)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
        at com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
        at com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
        at com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
        at com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Application server startup complete.
Error registering com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
javax.management.InstanceAlreadyExistsException: com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
        at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
        at com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
        at com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
        at com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
WEB0788: Error registering request
javax.management.InstanceAlreadyExistsException: com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
        at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
        at com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
        at com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
        at com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
[AutoDeploy] Selecting file C:\openesb\glassfish-v2-ur2-b04-patch-20080729\domains\domain1\autodeploy\amserver.war for autodeployment.
Autoundeploying application :amserver

Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have you reviewed this thread?

Please examine the SQLException for more information.  NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested

On Fri, May 1, 2009 at 10:30 AM, jsexton0 <jsexton0@...> wrote:

As my application has grown larger, something that has been working for some
time has started failing while Glassfish is starting up; EJB timers.  During
startup, I see the exception below.  Following this, timers can not function
as the EJB timer is not available.  In addition, I have found that random
SAs become unavailable and have to be reloaded.  Sometimes this issue
appears to "fix itself" but I have not been able to identify a pattern, and
it seems to be getting worse.  I hope someone has some ideas...

Thanks

JDO74009: Bean 'TimerBean' method ejbSelectAllTimersByOwnerAndState:
problems running JDOQL query with params [server, 0]
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
EJB5018: An exception was thrown during an ejb invocation on [TimerBean]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
       at
com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
       at
com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
JTS5064: Unexpected exception occurred while delisting the resource
javax.transaction.xa.XAException
       at org.apache.derby.jdbc.EmbedXAResource.end(Unknown Source)
       at com.sun.gjc.spi.XAResourceImpl.end(XAResourceImpl.java:100)
       at
com.sun.jts.jta.TransactionState.beforeCompletion(TransactionState.java:161)
       at
com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:133)
       at
com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158)
       at
com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548)
       at
com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:278)
       at
com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
       at
com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
       at
com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.
javax.transaction.RollbackException
       at
com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:311)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Application server startup complete.
Error registering
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
javax.management.InstanceAlreadyExistsException:
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at
com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
       at
com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
       at
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
       at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
       at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
WEB0788: Error registering request
javax.management.InstanceAlreadyExistsException:
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at
com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
       at
com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
       at
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
       at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
       at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
[AutoDeploy] Selecting file
C:\openesb\glassfish-v2-ur2-b04-patch-20080729\domains\domain1\autodeploy\amserver.war
for autodeployment.
Autoundeploying application :amserver

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334048.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I have seen that.  But I don't really see a solution there, is there?  I understand that this appears to be a timeout, which could mean that something in Glassfish's startup is either taking too long, or is completely blocked.

But what can I do about it?

I do have use of a timer in my application, but this problem happens on startup, even if I remove that EA and restart.

OpenXGroup Inc. wrote:
Have you reviewed this thread?*
http://forums.java.net/jive/message.jspa?messageID=231728*

Please examine the SQLException for more information.  NestedException:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested


On Fri, May 1, 2009 at 10:30 AM, jsexton0 <jsexton0@gmail.com> wrote:
>
> As my application has grown larger, something that has been working for
> some
> time has started failing while Glassfish is starting up; EJB timers.
>  During
> startup, I see the exception below.  Following this, timers can not
> function
> as the EJB timer is not available.  In addition, I have found that random
> SAs become unavailable and have to be reloaded.  Sometimes this issue
> appears to "fix itself" but I have not been able to identify a pattern, and
> it seems to be getting worse.  I hope someone has some ideas...
>
> Thanks
>
> JDO74009: Bean 'TimerBean' method ejbSelectAllTimersByOwnerAndState:
> problems running JDOQL query with params [server, 0]
> com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
> JDBC SQLException while executing the SQL statement:
> SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
> t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
> t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
> "EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
> t0."STATE" = CAST (? AS INTEGER)> with input
> values:java.lang.String:server,
> java.lang.Integer:0.
> Please examine the SQLException for more information.
> NestedException: java.sql.SQLTransactionRollbackException: A lock could not
> be obtained within the time requested
>        at
>
> com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
>        at
>
> com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)

Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource? Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32 (default) to 64. The error vanished, but I don't know if it just depends on how many times per timer event a connection is requested. May be the error will occure again with more connection requests. Do you now what the maximal possible value is for the Initial and Minimum Pool Size? The value of 128 seemed not to be accepted. 

I was able to resolve my problem by changing the resource type to java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your pool to return non-transactional-connections.

Set non-transactional-connections="true" in your <jdbc-connection-pool> configuration.

There are two type of transactions we can talk about in general (pertaining to this thread). 

1) There is the transaction that you can write using SQL which you (the programmer) write yourself. 
2) There is the transaction that java handles at a system level which can apply to any operation or series of operations you require to be performed from beginning to end without error (including database operations).

By setting non-transactional-connections to true you will not get the protection from system failure as described in number 2.

On Fri, May 1, 2009 at 10:43 AM, David Delivante Gifford <openxgroup@...> wrote:
Have you reviewed this thread?
Please examine the SQLException for more information.  NestedException: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested

On Fri, May 1, 2009 at 10:30 AM, jsexton0 <jsexton0@...> wrote:

As my application has grown larger, something that has been working for some
time has started failing while Glassfish is starting up; EJB timers.  During
startup, I see the exception below.  Following this, timers can not function
as the EJB timer is not available.  In addition, I have found that random
SAs become unavailable and have to be reloaded.  Sometimes this issue
appears to "fix itself" but I have not been able to identify a pattern, and
it seems to be getting worse.  I hope someone has some ideas...

Thanks

JDO74009: Bean 'TimerBean' method ejbSelectAllTimersByOwnerAndState:
problems running JDOQL query with params [server, 0]
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
EJB5018: An exception was thrown during an ejb invocation on [TimerBean]
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
       at
com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
NestedStackTrace:
java.sql.SQLTransactionRollbackException: A lock could not be obtained
within the time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
       at
org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown
Source)
       at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.ResultDesc.getResult(ResultDesc.java:490)
       at
com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.SelectQueryPlan.getResult(SelectQueryPlan.java:1576)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:477)
       at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
       at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:1118)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:689)
       at
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.executeWithArray(QueryImpl.java:607)
       at
com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl.ejbSelectAllTimersByOwnerAndState(TimerBean_2100919770_ConcreteImpl.java:1700)
       at
com.sun.ejb.containers.TimerBean.ejbHomeSelectAllActiveTimersOwnedByThisServer(TimerBean.java:709)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
       at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
       at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:242)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Caused by: java.sql.SQLException: A lock could not be obtained within the
time requested
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
       at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
       ... 38 more
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean;
nested exception is:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a
JDBC SQLException while executing the SQL statement:
SQL statement<select distinct t0."TIMERID", t0."CREATIONTIMERAW",
t0."LASTEXPIRATIONRAW", t0."CONTAINERID", t0."OWNERID", t0."STATE",
t0."PKHASHCODE", t0."INTERVALDURATION", t0."INITIALEXPIRATIONRAW" from
"EJB__TIMER__TBL" t0 where t0."OWNERID" = CAST (? AS VARCHAR(32672)) and
t0."STATE" = CAST (? AS INTEGER)> with input values:java.lang.String:server,
java.lang.Integer:0.
Please examine the SQLException for more information.
NestedException: java.sql.SQLTransactionRollbackException: A lock could not
be obtained within the time requested
       at
com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3728)
       at
com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3576)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
       at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
       at
com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:251)
       at $Proxy24.selectAllActiveTimersOwnedByThisServer(Unknown Source)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:491)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
JTS5064: Unexpected exception occurred while delisting the resource
javax.transaction.xa.XAException
       at org.apache.derby.jdbc.EmbedXAResource.end(Unknown Source)
       at com.sun.gjc.spi.XAResourceImpl.end(XAResourceImpl.java:100)
       at
com.sun.jts.jta.TransactionState.beforeCompletion(TransactionState.java:161)
       at
com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:133)
       at
com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:158)
       at
com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2548)
       at
com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:278)
       at
com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:249)
       at
com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:623)
       at
com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:309)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.
javax.transaction.RollbackException
       at
com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:311)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:1004)
       at
com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:397)
       at
com.sun.ejb.containers.EJBTimerService.restoreTimers(EJBTimerService.java:511)
       at
com.sun.ejb.containers.ContainerFactoryImpl.restoreEJBTimers(ContainerFactoryImpl.java:364)
       at
com.sun.enterprise.server.ApplicationLifecycle.onReady(ApplicationLifecycle.java:348)
       at
com.sun.enterprise.server.ApplicationServer.onReady(ApplicationServer.java:526)
       at com.sun.enterprise.server.PEMain.run(PEMain.java:413)
       at com.sun.enterprise.server.PEMain.main(PEMain.java:338)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.sun.enterprise.server.PELaunch.main(PELaunch.java:412)
Application server startup complete.
Error registering
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
javax.management.InstanceAlreadyExistsException:
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at
com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
       at
com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
       at
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
       at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
       at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
WEB0788: Error registering request
javax.management.InstanceAlreadyExistsException:
com.sun.appserv:type=RequestProcessor,worker=http4848,name=HttpRequest3
       at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
       at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
       at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
       at
com.sun.enterprise.interceptor.DynamicInterceptor.registerMBean(DynamicInterceptor.java:263)
       at
com.sun.org.apache.commons.modeler.Registry.registerComponent(Registry.java:872)
       at
com.sun.enterprise.web.connector.grizzly.GrizzlyHttpProtocol$ModelerManagement.registerComponent(GrizzlyHttpProtocol.java:963)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.registerMonitoring(DefaultProcessorTask.java:1627)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.configPreProcess(DefaultProcessorTask.java:521)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.preProcess(DefaultProcessorTask.java:504)
       at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:812)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
       at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
       at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
       at
com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
[AutoDeploy] Selecting file
C:\openesb\glassfish-v2-ur2-b04-patch-20080729\domains\domain1\autodeploy\amserver.war
for autodeployment.
Autoundeploying application :amserver

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334048.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.




Re: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello -

This is interesting...
This error is happening on the Derby database, very early in Glassfish's startup.  I am not (directly) using the Derby database in any of my code.  Are you suggesting a change to Glassfish's default setup for its Derby pool?  I can certainly try that...

Thanks

OpenXGroup Inc. wrote:
Take a look at wrong XA state as well...

Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
Or use XA datasource altogether?
I increased the "Initial and Minimum Pool Size" from 32 (default) to 64. The
error vanished, but I don't know if it just depends on how many times per
timer event a connection is requested. May be the error will occure again
with more connection requests. Do you now what the maximal possible value is
for the Initial and Minimum Pool Size? The value of 128 seemed not to be
accepted.

I was able to resolve my problem by changing the resource type to
java.sql.ConnectionPoolDataSource.

Do you need transactional capability. If not, you can set your pool to
return non-transactional-connections.

Set non-transactional-connections="true" in your <jdbc-connection-pool>
configuration.

There are two type of transactions we can talk about in general (pertaining
to this thread).

1) There is the transaction that you can write using SQL which you (the
programmer) write yourself.
2) There is the transaction that java handles at a system level which can
apply to any operation or series of operations you require to be performed
from beginning to end without error (including database operations).

By setting non-transactional-connections to true you will not get the
protection from system failure as described in number 2.

Parent Message unknown RE: Derby Error Starting Glassfish

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You might want to point your EJB timer pool to another
database.

See $GLASSFISH_INSTALL/lib/install/databases for the
proper SQL scripts for your flavor of database.

Manfred



Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could also follow up on Manfred's suggestion and determine if this bug was addressed by Derby as I think there was a bug logged in the past.  Also, you can test with MySQL if possible and compare results using the logging/debugging techniques suggested in the forum.

On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in Glassfish's
startup.  I am not (directly) using the Derby database in any of my code.
Are you suggesting a change to Glassfish's default setup for its Derby pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
>
> Take a look at wrong XA state as well...
>
> Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> Or use XA datasource altogether?
> I increased the "Initial and Minimum Pool Size" from 32 (default) to 64.
> The
> error vanished, but I don't know if it just depends on how many times per
> timer event a connection is requested. May be the error will occure again
> with more connection requests. Do you now what the maximal possible value
> is
> for the Initial and Minimum Pool Size? The value of 128 seemed not to be
> accepted.
>
> I was able to resolve my problem by changing the resource type to
> java.sql.ConnectionPoolDataSource.
>
> Do you need transactional capability. If not, you can set your pool to
> return non-transactional-connections.
>
> Set non-transactional-connections="true" in your <jdbc-connection-pool>
> configuration.
>
> There are two type of transactions we can talk about in general
> (pertaining
> to this thread).
>
> 1) There is the transaction that you can write using SQL which you (the
> programmer) write yourself.
> 2) There is the transaction that java handles at a system level which can
> apply to any operation or series of operations you require to be performed
> from beginning to end without error (including database operations).
>
> By setting non-transactional-connections to true you will not get the
> protection from system failure as described in number 2.
>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Another thing to try- change connection-validation-method="auto-commit" to be "table"?

Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource? Or use XA datasource altogether? 

When you use a timer, it comes with the XA datasource access because the timer instances are stored in the database. When you call your method directly, it uses a single (non-XA) connection. And that is a big difference.

More information about how to diagnose a deadlock situation in Derby / Java DB
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important (e.g. locking in same order) and that a table being accessed without an index could lead to a Table-level lock, affecting the lock granularity quite significantly and the risk of deadlocks as part of the applications. It seemed like some index might have been missing for some of the columns being searched as part of some queries


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in Glassfish's
startup.  I am not (directly) using the Derby database in any of my code.
Are you suggesting a change to Glassfish's default setup for its Derby pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
>
> Take a look at wrong XA state as well...
>
> Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> Or use XA datasource altogether?
> I increased the "Initial and Minimum Pool Size" from 32 (default) to 64.
> The
> error vanished, but I don't know if it just depends on how many times per
> timer event a connection is requested. May be the error will occure again
> with more connection requests. Do you now what the maximal possible value
> is
> for the Initial and Minimum Pool Size? The value of 128 seemed not to be
> accepted.
>
> I was able to resolve my problem by changing the resource type to
> java.sql.ConnectionPoolDataSource.
>
> Do you need transactional capability. If not, you can set your pool to
> return non-transactional-connections.
>
> Set non-transactional-connections="true" in your <jdbc-connection-pool>
> configuration.
>
> There are two type of transactions we can talk about in general
> (pertaining
> to this thread).
>
> 1) There is the transaction that you can write using SQL which you (the
> programmer) write yourself.
> 2) There is the transaction that java handles at a system level which can
> apply to any operation or series of operations you require to be performed
> from beginning to end without error (including database operations).
>
> By setting non-transactional-connections to true you will not get the
> protection from system failure as described in number 2.
>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'll try adjusting the connection pools.  I see these...

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Any idea which one is used when initializing the EJB timer service?

Thanks

OpenXGroup Inc. wrote:
You could also follow up on Manfred's suggestion and determine if this bug
was addressed by Derby as I think there was a bug logged in the past.  Also,
you can test with MySQL if possible and compare results using the
logging/debugging techniques suggested in the forum.

On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@gmail.com> wrote:

>
> Hello -
>
> This is interesting...
> This error is happening on the Derby database, very early in Glassfish's
> startup.  I am not (directly) using the Derby database in any of my code.
> Are you suggesting a change to Glassfish's default setup for its Derby
> pool?
> I can certainly try that...
>
> Thanks
>
>
> OpenXGroup Inc. wrote:
> >
> > Take a look at wrong XA state as well...
> >
> > Can you change javax.sql.ConnectionPoolDataSource to
> javax.sql.DataSource?
> > Or use XA datasource altogether?
> > I increased the "Initial and Minimum Pool Size" from 32 (default) to 64.
> > The
> > error vanished, but I don't know if it just depends on how many times per
> > timer event a connection is requested. May be the error will occure again
> > with more connection requests. Do you now what the maximal possible value
> > is
> > for the Initial and Minimum Pool Size? The value of 128 seemed not to be
> > accepted.
> >
> > I was able to resolve my problem by changing the resource type to
> > java.sql.ConnectionPoolDataSource.
> >
> > Do you need transactional capability. If not, you can set your pool to
> > return non-transactional-connections.
> >
> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
> > configuration.
> >
> > There are two type of transactions we can talk about in general
> > (pertaining
> > to this thread).
> >
> > 1) There is the transaction that you can write using SQL which you (the
> > programmer) write yourself.
> > 2) There is the transaction that java handles at a system level which can
> > apply to any operation or series of operations you require to be
> performed
> > from beginning to end without error (including database operations).
> >
> > By setting non-transactional-connections to true you will not get the
> > protection from system failure as described in number 2.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>
>

Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Activate derby-lock-print 

Using this to settings: 
derby.locks.deadlockTrace=true 
derby.locks.monitor=true 

According to table/row lock: 

Changing the lock granularity for the table 
The LOCKSIZE clause allows you to override row-level locking for the specific table, 
if your system uses the default setting of row-level locking. (If your system is set for 
table-level locking, you cannot change the locking granularity to row-level locking, 
although Derby allows you to use the LOCKSIZE clause in such a situation without 
throwing an exception.) To override row-level locking for the specific table, set locking 
for the table to TABLE. If you created the table with table-level locking granularity, you 
can change locking back to ROW with the LOCKSIZE clause in the ALTER TABLE 
STATEMENT. For information about why this is sometimes useful, see Tuning Java DB. 

Links: 
 * http://db.apache.org/derby/docs/dev/devguide/cdevconcepts15366.html  
 * http://db.apache.org/derby/docs/dev/devguide/cdevconcepts23810.html  

Derby: 

By default, Derby is configured for row-level locking. Row-level locking uses more memory but allows greater concurrency, which works better in multi-user systems. Table-level locking works best with single-user applications or read-only applications. 


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:

Hello -

This is interesting...
This error is happening on the Derby database, very early in Glassfish's
startup.  I am not (directly) using the Derby database in any of my code.
Are you suggesting a change to Glassfish's default setup for its Derby pool?
I can certainly try that...

Thanks


OpenXGroup Inc. wrote:
>
> Take a look at wrong XA state as well...
>
> Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> Or use XA datasource altogether?
> I increased the "Initial and Minimum Pool Size" from 32 (default) to 64.
> The
> error vanished, but I don't know if it just depends on how many times per
> timer event a connection is requested. May be the error will occure again
> with more connection requests. Do you now what the maximal possible value
> is
> for the Initial and Minimum Pool Size? The value of 128 seemed not to be
> accepted.
>
> I was able to resolve my problem by changing the resource type to
> java.sql.ConnectionPoolDataSource.
>
> Do you need transactional capability. If not, you can set your pool to
> return non-transactional-connections.
>
> Set non-transactional-connections="true" in your <jdbc-connection-pool>
> configuration.
>
> There are two type of transactions we can talk about in general
> (pertaining
> to this thread).
>
> 1) There is the transaction that you can write using SQL which you (the
> programmer) write yourself.
> 2) There is the transaction that java handles at a system level which can
> apply to any operation or series of operations you require to be performed
> from beginning to end without error (including database operations).
>
> By setting non-transactional-connections to true you will not get the
> protection from system failure as described in number 2.
>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Parent Message unknown RE: Derby Error Starting Glassfish

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That would be '__TimerPool'

Manfred

> -------- Original Message --------
> Subject: Re: [entpack] Derby Error Starting Glassfish
> From: jsexton0 <jsexton0@...>
> Date: Fri, May 01, 2009 9:19 am
> To: nbentpack@...
>
>
> I'll try adjusting the connection pools.  I see these...
>
> __TimerPool
> DerbyPool
> iepseDerbyPoolNonXA
> iepseDerbyPoolXA
>
> Any idea which one is used when initializing the EJB timer service?
>
> Thanks



Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Perhaps some additional insight provided be How to resolve "EJB5108:Unable to initialize EJB Timer Service" Keep things exciting with

EJB Timer Clustering in Glassfish


In the cluster you need to setup your own database for the timer service because by default __TimerPool points to the embedded JavaDB.

- OR -

I created a new connection pool using Network Derby.


On Fri, May 1, 2009 at 11:19 AM, jsexton0 <jsexton0@...> wrote:

I'll try adjusting the connection pools.  I see these...

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Any idea which one is used when initializing the EJB timer service?

Thanks


OpenXGroup Inc. wrote:
>
> You could also follow up on Manfred's suggestion and determine if this bug
> was addressed by Derby as I think there was a bug logged in the past.
> Also,
> you can test with MySQL if possible and compare results using the
> logging/debugging techniques suggested in the forum.
>
> On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
>
>>
>> Hello -
>>
>> This is interesting...
>> This error is happening on the Derby database, very early in Glassfish's
>> startup.  I am not (directly) using the Derby database in any of my code.
>> Are you suggesting a change to Glassfish's default setup for its Derby
>> pool?
>> I can certainly try that...
>>
>> Thanks
>>
>>
>> OpenXGroup Inc. wrote:
>> >
>> > Take a look at wrong XA state as well...
>> >
>> > Can you change javax.sql.ConnectionPoolDataSource to
>> javax.sql.DataSource?
>> > Or use XA datasource altogether?
>> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
>> 64.
>> > The
>> > error vanished, but I don't know if it just depends on how many times
>> per
>> > timer event a connection is requested. May be the error will occure
>> again
>> > with more connection requests. Do you now what the maximal possible
>> value
>> > is
>> > for the Initial and Minimum Pool Size? The value of 128 seemed not to
>> be
>> > accepted.
>> >
>> > I was able to resolve my problem by changing the resource type to
>> > java.sql.ConnectionPoolDataSource.
>> >
>> > Do you need transactional capability. If not, you can set your pool to
>> > return non-transactional-connections.
>> >
>> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
>> > configuration.
>> >
>> > There are two type of transactions we can talk about in general
>> > (pertaining
>> > to this thread).
>> >
>> > 1) There is the transaction that you can write using SQL which you (the
>> > programmer) write yourself.
>> > 2) There is the transaction that java handles at a system level which
>> can
>> > apply to any operation or series of operations you require to be
>> performed
>> > from beginning to end without error (including database operations).
>> >
>> > By setting non-transactional-connections to true you will not get the
>> > protection from system failure as described in number 2.
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
>> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334783.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello -

I tried changing the max connections to 64, and the timeout to 90000 on each pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change.  I do not know were/how to set other Derby properties.  My server is as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server altogether.  I'd like to understand why this started happening however, and I hate having to make such a drastic change to the way Glassfish comes "out of the box".  

I do have one timer bean in my application, but it's been working fine for months as other development has progressed.  Nothing in particular seems to have caused this error to begin happening, except the application has grown.

Thanks

OpenXGroup Inc. wrote:
Another thing to try- change connection-validation-method="auto-commit" to
be "table"?
Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
Or use XA datasource altogether?

When you use a timer, it comes with the XA datasource access because the
timer instances are stored in the database. When you call your method
directly, it uses a single (non-XA) connection. And that is a big
difference.

More information about *how to diagnose a deadlock situation in Derby / Java
DB*.
http://wiki.apache.org/db-derby/LockDebugging
http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html

Note that lock ordering as part of the application is important (e.g.
locking in same order) and that a table being accessed without an index
could lead to a Table-level lock, affecting the lock granularity quite
significantly and the risk of deadlocks as part of the applications. It
seemed like some index might have been missing for some of the columns being
searched as part of some queries.


On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@gmail.com> wrote:

>
> Hello -
>
> This is interesting...
> This error is happening on the Derby database, very early in Glassfish's
> startup.  I am not (directly) using the Derby database in any of my code.
> Are you suggesting a change to Glassfish's default setup for its Derby
> pool?
> I can certainly try that...
>
> Thanks
>
>
> OpenXGroup Inc. wrote:
> >
> > Take a look at wrong XA state as well...
> >
> > Can you change javax.sql.ConnectionPoolDataSource to
> javax.sql.DataSource?
> > Or use XA datasource altogether?
> > I increased the "Initial and Minimum Pool Size" from 32 (default) to 64.
> > The
> > error vanished, but I don't know if it just depends on how many times per
> > timer event a connection is requested. May be the error will occure again
> > with more connection requests. Do you now what the maximal possible value
> > is
> > for the Initial and Minimum Pool Size? The value of 128 seemed not to be
> > accepted.
> >
> > I was able to resolve my problem by changing the resource type to
> > java.sql.ConnectionPoolDataSource.
> >
> > Do you need transactional capability. If not, you can set your pool to
> > return non-transactional-connections.
> >
> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
> > configuration.
> >
> > There are two type of transactions we can talk about in general
> > (pertaining
> > to this thread).
> >
> > 1) There is the transaction that you can write using SQL which you (the
> > programmer) write yourself.
> > 2) There is the transaction that java handles at a system level which can
> > apply to any operation or series of operations you require to be
> performed
> > from beginning to end without error (including database operations).
> >
> > By setting non-transactional-connections to true you will not get the
> > protection from system failure as described in number 2.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>
>

Parent Message unknown RE: Derby Error Starting Glassfish

by Manfred Riem :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

> -------- Original Message --------
> Subject: Re: [entpack] Derby Error Starting Glassfish
> From: jsexton0 <jsexton0@...>
> Date: Fri, May 01, 2009 9:49 am
> To: nbentpack@...
>
>
> Hello -
>
> I tried changing the max connections to 64, and the timeout to 90000 on each
> pool..
>
> __TimerPool
> DerbyPool
> iepseDerbyPoolNonXA
> iepseDerbyPoolXA
>
> Still unable to startup Glassfish correctly, no change.  I do not know
> were/how to set other Derby properties.  My server is
> as-originally-installed with respect to the __TimerPool settings.
>
> I guess I'll have to try pointing it at a different database server
> altogether.  I'd like to understand why this started happening however, and
> I hate having to make such a drastic change to the way Glassfish comes "out
> of the box".  
>
> I do have one timer bean in my application, but it's been working fine for
> months as other development has progressed.  Nothing in particular seems to
> have caused this error to begin happening, except the application has grown.
>
> Thanks
>
>
> OpenXGroup Inc. wrote:
> >
> > Another thing to try- change connection-validation-method="auto-commit" to
> > be "table"?
> > Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> > Or use XA datasource altogether?
> >
> > When you use a timer, it comes with the XA datasource access because the
> > timer instances are stored in the database. When you call your method
> > directly, it uses a single (non-XA) connection. And that is a big
> > difference.
> >
> > More information about *how to diagnose a deadlock situation in Derby /
> > Java
> > DB*.
> > http://wiki.apache.org/db-derby/LockDebugging
> > http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
> >
> > Note that lock ordering as part of the application is important (e.g.
> > locking in same order) and that a table being accessed without an index
> > could lead to a Table-level lock, affecting the lock granularity quite
> > significantly and the risk of deadlocks as part of the applications. It
> > seemed like some index might have been missing for some of the columns
> > being
> > searched as part of some queries.
> >
> >
> > On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
> >
> >>
> >> Hello -
> >>
> >> This is interesting...
> >> This error is happening on the Derby database, very early in Glassfish's
> >> startup.  I am not (directly) using the Derby database in any of my code.
> >> Are you suggesting a change to Glassfish's default setup for its Derby
> >> pool?
> >> I can certainly try that...
> >>
> >> Thanks
> >>
> >>
> >> OpenXGroup Inc. wrote:
> >> >
> >> > Take a look at wrong XA state as well...
> >> >
> >> > Can you change javax.sql.ConnectionPoolDataSource to
> >> javax.sql.DataSource?
> >> > Or use XA datasource altogether?
> >> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
> >> 64.
> >> > The
> >> > error vanished, but I don't know if it just depends on how many times
> >> per
> >> > timer event a connection is requested. May be the error will occure
> >> again
> >> > with more connection requests. Do you now what the maximal possible
> >> value
> >> > is
> >> > for the Initial and Minimum Pool Size? The value of 128 seemed not to
> >> be
> >> > accepted.
> >> >
> >> > I was able to resolve my problem by changing the resource type to
> >> > java.sql.ConnectionPoolDataSource.
> >> >
> >> > Do you need transactional capability. If not, you can set your pool to
> >> > return non-transactional-connections.
> >> >
> >> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
> >> > configuration.
> >> >
> >> > There are two type of transactions we can talk about in general
> >> > (pertaining
> >> > to this thread).
> >> >
> >> > 1) There is the transaction that you can write using SQL which you (the
> >> > programmer) write yourself.
> >> > 2) There is the transaction that java handles at a system level which
> >> can
> >> > apply to any operation or series of operations you require to be
> >> performed
> >> > from beginning to end without error (including database operations).
> >> >
> >> > By setting non-transactional-connections to true you will not get the
> >> > protection from system failure as described in number 2.
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.


Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


If you are looking for a workaround - Since this seems to be Derby issue, you can bypass using derby and point timer service to any other external data source you have.

Setting property "derby.locks.monitor=true" will print out diagnostic information in derby.log to confirm this.  You can try modifying schema for the timer database (it resides in ${com.sun.aas.instanceRoot}/lib/databases/ejbtimer ) to define index on required field.


Using the EJB Timer Service is equivalent to interacting with a single JDBC resource manager. If an EJB component or application accesses a database either directly through JDBC or indirectly (for example, through an entity bean’s persistence mechanism), and also interacts with the EJB Timer Service, its data source must be configured with an XA JDBC driver.

You can change the following EJB Timer Service settings. You must restart the server for the changes to take effect.

  • Minimum Delivery Interval - Specifies the minimum time in milliseconds before an expiration for a particular timer can occur. This guards against extremely small timer increments that can overload the server. The default is 7000.

  • Maximum Redeliveries - Specifies the maximum number of times the EJB timer service attempts to redeliver a timer expiration due for exception or rollback. The default is 1.

  • Redelivery Interval - Specifies how long in milliseconds the EJB timer service waits after a failedejbTimeout delivery before attempting a redelivery. The default is 5000.

  • Timer DataSource - Specifies the database used by the EJB Timer Service. The default isjdbc/__TimerPool.


On Fri, May 1, 2009 at 11:19 AM, jsexton0 <jsexton0@...> wrote:

I'll try adjusting the connection pools.  I see these...

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Any idea which one is used when initializing the EJB timer service?

Thanks


OpenXGroup Inc. wrote:
>
> You could also follow up on Manfred's suggestion and determine if this bug
> was addressed by Derby as I think there was a bug logged in the past.
> Also,
> you can test with MySQL if possible and compare results using the
> logging/debugging techniques suggested in the forum.
>
> On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
>
>>
>> Hello -
>>
>> This is interesting...
>> This error is happening on the Derby database, very early in Glassfish's
>> startup.  I am not (directly) using the Derby database in any of my code.
>> Are you suggesting a change to Glassfish's default setup for its Derby
>> pool?
>> I can certainly try that...
>>
>> Thanks
>>
>>
>> OpenXGroup Inc. wrote:
>> >
>> > Take a look at wrong XA state as well...
>> >
>> > Can you change javax.sql.ConnectionPoolDataSource to
>> javax.sql.DataSource?
>> > Or use XA datasource altogether?
>> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
>> 64.
>> > The
>> > error vanished, but I don't know if it just depends on how many times
>> per
>> > timer event a connection is requested. May be the error will occure
>> again
>> > with more connection requests. Do you now what the maximal possible
>> value
>> > is
>> > for the Initial and Minimum Pool Size? The value of 128 seemed not to
>> be
>> > accepted.
>> >
>> > I was able to resolve my problem by changing the resource type to
>> > java.sql.ConnectionPoolDataSource.
>> >
>> > Do you need transactional capability. If not, you can set your pool to
>> > return non-transactional-connections.
>> >
>> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
>> > configuration.
>> >
>> > There are two type of transactions we can talk about in general
>> > (pertaining
>> > to this thread).
>> >
>> > 1) There is the transaction that you can write using SQL which you (the
>> > programmer) write yourself.
>> > 2) There is the transaction that java handles at a system level which
>> can
>> > apply to any operation or series of operations you require to be
>> performed
>> > from beginning to end without error (including database operations).
>> >
>> > By setting non-transactional-connections to true you will not get the
>> > protection from system failure as described in number 2.
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
>> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334783.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



RE: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted Glassfish (it looked OK), and then reloaded the SAs one at a time and everything came up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with the general start up process, when everything is loaded.

Thanks

Manfred Riem wrote:
The only other thing I could recommend is to connect
to the EJB timer database yourself and see if the
database itself is not corrupted in anyway.

Manfred

> -------- Original Message --------
> Subject: Re: [entpack] Derby Error Starting Glassfish
> From: jsexton0 <jsexton0@gmail.com>
> Date: Fri, May 01, 2009 9:49 am
> To: nbentpack@netbeans.org
>
>
> Hello -
>
> I tried changing the max connections to 64, and the timeout to 90000 on each
> pool..
>
> __TimerPool
> DerbyPool
> iepseDerbyPoolNonXA
> iepseDerbyPoolXA
>
> Still unable to startup Glassfish correctly, no change.  I do not know
> were/how to set other Derby properties.  My server is
> as-originally-installed with respect to the __TimerPool settings.
>
> I guess I'll have to try pointing it at a different database server
> altogether.  I'd like to understand why this started happening however, and
> I hate having to make such a drastic change to the way Glassfish comes "out
> of the box".  
>
> I do have one timer bean in my application, but it's been working fine for
> months as other development has progressed.  Nothing in particular seems to
> have caused this error to begin happening, except the application has grown.
>
> Thanks
>
>
> OpenXGroup Inc. wrote:
> >
> > Another thing to try- change connection-validation-method="auto-commit" to
> > be "table"?
> > Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> > Or use XA datasource altogether?
> >
> > When you use a timer, it comes with the XA datasource access because the
> > timer instances are stored in the database. When you call your method
> > directly, it uses a single (non-XA) connection. And that is a big
> > difference.
> >
> > More information about *how to diagnose a deadlock situation in Derby /
> > Java
> > DB*.
> > http://wiki.apache.org/db-derby/LockDebugging
> > http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
> >
> > Note that lock ordering as part of the application is important (e.g.
> > locking in same order) and that a table being accessed without an index
> > could lead to a Table-level lock, affecting the lock granularity quite
> > significantly and the risk of deadlocks as part of the applications. It
> > seemed like some index might have been missing for some of the columns
> > being
> > searched as part of some queries.
> >
> >
> > On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@gmail.com> wrote:
> >
> >>
> >> Hello -
> >>
> >> This is interesting...
> >> This error is happening on the Derby database, very early in Glassfish's
> >> startup.  I am not (directly) using the Derby database in any of my code.
> >> Are you suggesting a change to Glassfish's default setup for its Derby
> >> pool?
> >> I can certainly try that...
> >>
> >> Thanks
> >>
> >>
> >> OpenXGroup Inc. wrote:
> >> >
> >> > Take a look at wrong XA state as well...
> >> >
> >> > Can you change javax.sql.ConnectionPoolDataSource to
> >> javax.sql.DataSource?
> >> > Or use XA datasource altogether?
> >> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
> >> 64.
> >> > The
> >> > error vanished, but I don't know if it just depends on how many times
> >> per
> >> > timer event a connection is requested. May be the error will occure
> >> again
> >> > with more connection requests. Do you now what the maximal possible
> >> value
> >> > is
> >> > for the Initial and Minimum Pool Size? The value of 128 seemed not to
> >> be
> >> > accepted.
> >> >
> >> > I was able to resolve my problem by changing the resource type to
> >> > java.sql.ConnectionPoolDataSource.
> >> >
> >> > Do you need transactional capability. If not, you can set your pool to
> >> > return non-transactional-connections.
> >> >
> >> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
> >> > configuration.
> >> >
> >> > There are two type of transactions we can talk about in general
> >> > (pertaining
> >> > to this thread).
> >> >
> >> > 1) There is the transaction that you can write using SQL which you (the
> >> > programmer) write yourself.
> >> > 2) There is the transaction that java handles at a system level which
> >> can
> >> > apply to any operation or series of operations you require to be
> >> performed
> >> > from beginning to end without error (including database operations).
> >> >
> >> > By setting non-transactional-connections to true you will not get the
> >> > protection from system failure as described in number 2.
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.

Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The are many properties that could be set for tuning Derby. You can find them in the tuning guide at:
http://db.apache.org/derby/docs/dev/tuning/ctunproper22250.html

Do take a look at this list for the ones that could be helpful in your case.

The property at the database side to increase default timeout is derby.locks.waitTimeout (default is 60 seconds). You can either set this as a system wide property in the derby.property file OR within the database.


On Fri, May 1, 2009 at 12:20 PM, jsexton0 <jsexton0@...> wrote:

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
>
> The only other thing I could recommend is to connect
> to the EJB timer database yourself and see if the
> database itself is not corrupted in anyway.
>
> Manfred
>
>> -------- Original Message --------
>> Subject: Re: [entpack] Derby Error Starting Glassfish
>> From: jsexton0 <jsexton0@...>
>> Date: Fri, May 01, 2009 9:49 am
>> To: nbentpack@...
>>
>>
>> Hello -
>>
>> I tried changing the max connections to 64, and the timeout to 90000 on
>> each
>> pool..
>>
>> __TimerPool
>> DerbyPool
>> iepseDerbyPoolNonXA
>> iepseDerbyPoolXA
>>
>> Still unable to startup Glassfish correctly, no change.  I do not know
>> were/how to set other Derby properties.  My server is
>> as-originally-installed with respect to the __TimerPool settings.
>>
>> I guess I'll have to try pointing it at a different database server
>> altogether.  I'd like to understand why this started happening however,
>> and
>> I hate having to make such a drastic change to the way Glassfish comes
>> "out
>> of the box".
>>
>> I do have one timer bean in my application, but it's been working fine
>> for
>> months as other development has progressed.  Nothing in particular seems
>> to
>> have caused this error to begin happening, except the application has
>> grown.
>>
>> Thanks
>>
>>
>> OpenXGroup Inc. wrote:
>> >
>> > Another thing to try- change connection-validation-method="auto-commit"
>> to
>> > be "table"?
>> > Can you change javax.sql.ConnectionPoolDataSource to
>> javax.sql.DataSource?
>> > Or use XA datasource altogether?
>> >
>> > When you use a timer, it comes with the XA datasource access because
>> the
>> > timer instances are stored in the database. When you call your method
>> > directly, it uses a single (non-XA) connection. And that is a big
>> > difference.
>> >
>> > More information about *how to diagnose a deadlock situation in Derby /
>> > Java
>> > DB*.
>> > http://wiki.apache.org/db-derby/LockDebugging
>> > http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
>> >
>> > Note that lock ordering as part of the application is important (e.g.
>> > locking in same order) and that a table being accessed without an index
>> > could lead to a Table-level lock, affecting the lock granularity quite
>> > significantly and the risk of deadlocks as part of the applications. It
>> > seemed like some index might have been missing for some of the columns
>> > being
>> > searched as part of some queries.
>> >
>> >
>> > On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
>> >
>> >>
>> >> Hello -
>> >>
>> >> This is interesting...
>> >> This error is happening on the Derby database, very early in
>> Glassfish's
>> >> startup.  I am not (directly) using the Derby database in any of my
>> code.
>> >> Are you suggesting a change to Glassfish's default setup for its Derby
>> >> pool?
>> >> I can certainly try that...
>> >>
>> >> Thanks
>> >>
>> >>
>> >> OpenXGroup Inc. wrote:
>> >> >
>> >> > Take a look at wrong XA state as well...
>> >> >
>> >> > Can you change javax.sql.ConnectionPoolDataSource to
>> >> javax.sql.DataSource?
>> >> > Or use XA datasource altogether?
>> >> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
>> >> 64.
>> >> > The
>> >> > error vanished, but I don't know if it just depends on how many
>> times
>> >> per
>> >> > timer event a connection is requested. May be the error will occure
>> >> again
>> >> > with more connection requests. Do you now what the maximal possible
>> >> value
>> >> > is
>> >> > for the Initial and Minimum Pool Size? The value of 128 seemed not
>> to
>> >> be
>> >> > accepted.
>> >> >
>> >> > I was able to resolve my problem by changing the resource type to
>> >> > java.sql.ConnectionPoolDataSource.
>> >> >
>> >> > Do you need transactional capability. If not, you can set your pool
>> to
>> >> > return non-transactional-connections.
>> >> >
>> >> > Set non-transactional-connections="true" in your
>> <jdbc-connection-pool>
>> >> > configuration.
>> >> >
>> >> > There are two type of transactions we can talk about in general
>> >> > (pertaining
>> >> > to this thread).
>> >> >
>> >> > 1) There is the transaction that you can write using SQL which you
>> (the
>> >> > programmer) write yourself.
>> >> > 2) There is the transaction that java handles at a system level
>> which
>> >> can
>> >> > apply to any operation or series of operations you require to be
>> >> performed
>> >> > from beginning to end without error (including database operations).
>> >> >
>> >> > By setting non-transactional-connections to true you will not get
>> the
>> >> > protection from system failure as described in number 2.
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
>> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
>> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


When it comes to MySQL and Derby, I recommend MySQL for production use and Derby for testing purposes only.  I only use Derby for JPA/JAXB/XSLT/Torque code generation testing.  http://rrees.wordpress.com/2007/06/17/jpa-derby-hibernate-openjpa-and-me/ and http://db.apache.org/derby/integrate/db_torque.html

If you have to use Derby in a production system and want to get this issue fixed, you have the following options:


* Try to get Derby running in client/server mode (we currently use embedded mode).  Connect locally (via localhost) to it. 


* Open an issue in Derby's issue tracker or post to Derby's mailing list: http://db.apache.org/derby/derby_comm.html#Provide+Feedback


On Fri, May 1, 2009 at 11:49 AM, jsexton0 <jsexton0@...> wrote:

Hello -

I tried changing the max connections to 64, and the timeout to 90000 on each
pool..

__TimerPool
DerbyPool
iepseDerbyPoolNonXA
iepseDerbyPoolXA

Still unable to startup Glassfish correctly, no change.  I do not know
were/how to set other Derby properties.  My server is
as-originally-installed with respect to the __TimerPool settings.

I guess I'll have to try pointing it at a different database server
altogether.  I'd like to understand why this started happening however, and
I hate having to make such a drastic change to the way Glassfish comes "out
of the box".

I do have one timer bean in my application, but it's been working fine for
months as other development has progressed.  Nothing in particular seems to
have caused this error to begin happening, except the application has grown.

Thanks


OpenXGroup Inc. wrote:
>
> Another thing to try- change connection-validation-method="auto-commit" to
> be "table"?
> Can you change javax.sql.ConnectionPoolDataSource to javax.sql.DataSource?
> Or use XA datasource altogether?
>
> When you use a timer, it comes with the XA datasource access because the
> timer instances are stored in the database. When you call your method
> directly, it uses a single (non-XA) connection. And that is a big
> difference.
>
> More information about *how to diagnose a deadlock situation in Derby /
> Java
> DB*.
> http://wiki.apache.org/db-derby/LockDebugging
> http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
>
> Note that lock ordering as part of the application is important (e.g.
> locking in same order) and that a table being accessed without an index
> could lead to a Table-level lock, affecting the lock granularity quite
> significantly and the risk of deadlocks as part of the applications. It
> seemed like some index might have been missing for some of the columns
> being
> searched as part of some queries.
>
>
> On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
>
>>
>> Hello -
>>
>> This is interesting...
>> This error is happening on the Derby database, very early in Glassfish's
>> startup.  I am not (directly) using the Derby database in any of my code.
>> Are you suggesting a change to Glassfish's default setup for its Derby
>> pool?
>> I can certainly try that...
>>
>> Thanks
>>
>>
>> OpenXGroup Inc. wrote:
>> >
>> > Take a look at wrong XA state as well...
>> >
>> > Can you change javax.sql.ConnectionPoolDataSource to
>> javax.sql.DataSource?
>> > Or use XA datasource altogether?
>> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
>> 64.
>> > The
>> > error vanished, but I don't know if it just depends on how many times
>> per
>> > timer event a connection is requested. May be the error will occure
>> again
>> > with more connection requests. Do you now what the maximal possible
>> value
>> > is
>> > for the Initial and Minimum Pool Size? The value of 128 seemed not to
>> be
>> > accepted.
>> >
>> > I was able to resolve my problem by changing the resource type to
>> > java.sql.ConnectionPoolDataSource.
>> >
>> > Do you need transactional capability. If not, you can set your pool to
>> > return non-transactional-connections.
>> >
>> > Set non-transactional-connections="true" in your <jdbc-connection-pool>
>> > configuration.
>> >
>> > There are two type of transactions we can talk about in general
>> > (pertaining
>> > to this thread).
>> >
>> > 1) There is the transaction that you can write using SQL which you (the
>> > programmer) write yourself.
>> > 2) There is the transaction that java handles at a system level which
>> can
>> > apply to any operation or series of operations you require to be
>> performed
>> > from beginning to end without error (including database operations).
>> >
>> > By setting non-transactional-connections to true you will not get the
>> > protection from system failure as described in number 2.
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
>> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Down in the stack trace is 
EJB5108:Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.


How do you verify the EJB Timer Service is enabled?  Does this work: You can verify that it was deployed successfully by accessing the following URL:http://localhost:8080/ejb-timer-service-app/timer 

EJB5108 Unable to initialize EJB Timer Service. The likely cause is the database has not been started or the timer database table has not been created.

Cause:

The EJB Timer Service could not be initialized because a problem occurred while attempting to restore previously registered timers from the associated data source.

Solution:

Double-check the JDBC data source (and its associated connection pool) assigned to the EJB Timer Service. Common causes are that the database is not running, the timer table has not been created within that database, or that the connection pool's JDBC driver URL information is incorrect.

This is how an older version of WAS did it with Cloudscape/Derby....

What's probably happening is: something is preventing the 
timer/scheduler service from starting, back at the time this module (or 
some other module that also contains TimedObjects) is started. At the 
time an EJB module is started, the WAS EJB container looks to see if any 
beans within that module implement TimedObject. If any do, we attempt 
to start the scheduler service if it is not already running.

When you see the message, it means that the EJB container is attempting 
to call the scheduler service, but the service is not started. Some 
possible causes for the service being unable to start are:

- Scheduler database not present
- Database is present but scheduler tables are not present or are not 
defined correctly
- Server does not have access authority to the scheduler database


When you install WAS, it comes pre-configured out of the box to use an 
internal instance of a Cloudscape/Derby database for its scheduler data. 

However, it is possible to configure the EJB Timer service (which in 
turn uses the scheduler service) to use an alternate database or 
scheduler instance. It's possible, if the scheduler/timer service 
config has been modified, that there could be a config problem that 
would prevent the scheduler from starting.

In any case, there should be some messages further up in your system out 
log indicating that the scheduler had trouble starting, which should 
shed some light as to the cause.

On Fri, May 1, 2009 at 12:20 PM, jsexton0 <jsexton0@...> wrote:

Hello -

I unloaded some SAs, shutdown everything on my computer, restarted Glassfish
(it looked OK), and then reloaded the SAs one at a time and everything came
up and runs normally.

So it doesn't appear to be corrupted at least, it's just a problem with the
general start up process, when everything is loaded.

Thanks


Manfred Riem wrote:
>
> The only other thing I could recommend is to connect
> to the EJB timer database yourself and see if the
> database itself is not corrupted in anyway.
>
> Manfred
>
>> -------- Original Message --------
>> Subject: Re: [entpack] Derby Error Starting Glassfish
>> From: jsexton0 <jsexton0@...>
>> Date: Fri, May 01, 2009 9:49 am
>> To: nbentpack@...
>>
>>
>> Hello -
>>
>> I tried changing the max connections to 64, and the timeout to 90000 on
>> each
>> pool..
>>
>> __TimerPool
>> DerbyPool
>> iepseDerbyPoolNonXA
>> iepseDerbyPoolXA
>>
>> Still unable to startup Glassfish correctly, no change.  I do not know
>> were/how to set other Derby properties.  My server is
>> as-originally-installed with respect to the __TimerPool settings.
>>
>> I guess I'll have to try pointing it at a different database server
>> altogether.  I'd like to understand why this started happening however,
>> and
>> I hate having to make such a drastic change to the way Glassfish comes
>> "out
>> of the box".
>>
>> I do have one timer bean in my application, but it's been working fine
>> for
>> months as other development has progressed.  Nothing in particular seems
>> to
>> have caused this error to begin happening, except the application has
>> grown.
>>
>> Thanks
>>
>>
>> OpenXGroup Inc. wrote:
>> >
>> > Another thing to try- change connection-validation-method="auto-commit"
>> to
>> > be "table"?
>> > Can you change javax.sql.ConnectionPoolDataSource to
>> javax.sql.DataSource?
>> > Or use XA datasource altogether?
>> >
>> > When you use a timer, it comes with the XA datasource access because
>> the
>> > timer instances are stored in the database. When you call your method
>> > directly, it uses a single (non-XA) connection. And that is a big
>> > difference.
>> >
>> > More information about *how to diagnose a deadlock situation in Derby /
>> > Java
>> > DB*.
>> > http://wiki.apache.org/db-derby/LockDebugging
>> > http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
>> >
>> > Note that lock ordering as part of the application is important (e.g.
>> > locking in same order) and that a table being accessed without an index
>> > could lead to a Table-level lock, affecting the lock granularity quite
>> > significantly and the risk of deadlocks as part of the applications. It
>> > seemed like some index might have been missing for some of the columns
>> > being
>> > searched as part of some queries.
>> >
>> >
>> > On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@...> wrote:
>> >
>> >>
>> >> Hello -
>> >>
>> >> This is interesting...
>> >> This error is happening on the Derby database, very early in
>> Glassfish's
>> >> startup.  I am not (directly) using the Derby database in any of my
>> code.
>> >> Are you suggesting a change to Glassfish's default setup for its Derby
>> >> pool?
>> >> I can certainly try that...
>> >>
>> >> Thanks
>> >>
>> >>
>> >> OpenXGroup Inc. wrote:
>> >> >
>> >> > Take a look at wrong XA state as well...
>> >> >
>> >> > Can you change javax.sql.ConnectionPoolDataSource to
>> >> javax.sql.DataSource?
>> >> > Or use XA datasource altogether?
>> >> > I increased the "Initial and Minimum Pool Size" from 32 (default) to
>> >> 64.
>> >> > The
>> >> > error vanished, but I don't know if it just depends on how many
>> times
>> >> per
>> >> > timer event a connection is requested. May be the error will occure
>> >> again
>> >> > with more connection requests. Do you now what the maximal possible
>> >> value
>> >> > is
>> >> > for the Initial and Minimum Pool Size? The value of 128 seemed not
>> to
>> >> be
>> >> > accepted.
>> >> >
>> >> > I was able to resolve my problem by changing the resource type to
>> >> > java.sql.ConnectionPoolDataSource.
>> >> >
>> >> > Do you need transactional capability. If not, you can set your pool
>> to
>> >> > return non-transactional-connections.
>> >> >
>> >> > Set non-transactional-connections="true" in your
>> <jdbc-connection-pool>
>> >> > configuration.
>> >> >
>> >> > There are two type of transactions we can talk about in general
>> >> > (pertaining
>> >> > to this thread).
>> >> >
>> >> > 1) There is the transaction that you can write using SQL which you
>> (the
>> >> > programmer) write yourself.
>> >> > 2) There is the transaction that java handles at a system level
>> which
>> >> can
>> >> > apply to any operation or series of operations you require to be
>> >> performed
>> >> > from beginning to end without error (including database operations).
>> >> >
>> >> > By setting non-transactional-connections to true you will not get
>> the
>> >> > protection from system failure as described in number 2.
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
>> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
>> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>
>
>

--
View this message in context: http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
Sent from the NetBeans - EntPack mailing list archive at Nabble.com.



Re: Derby Error Starting Glassfish

by jsexton0 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The cause of the timer service's failure to start, is the earlier SQL failure to accessing the timer table in the Derby database.

OpenXGroup Inc. wrote:
Down in the stack trace is EJB5108:Unable to initialize EJB Timer Service.
The likely cause is the
database has not been started or the timer database table has not been
created.

http://wiki.glassfish.java.net/Wiki.jsp?page=Ejb

*How do you verify the EJB Timer Service is enabled?  Does this work: You
can verify that it was deployed successfully by accessing the following URL:
**http://localhost:8080/ejb-timer-service-app/timer*<http://localhost:8080/ejb-timer-service-app/timer>
* *

EJB5108 Unable to initialize EJB Timer Service. The likely cause is the
database has not been started or the timer database table has not been
created.Cause:The EJB Timer Service could not be initialized because a
problem occurred while attempting to restore previously registered timers
from the associated data source.Solution:*Double-check the JDBC data source
(and its associated connection pool) assigned **to** the **EJB** **Timer** *
*Service.* Common causes are that the database is not running, the timer table
has not been created within that database, or that the connection pool's
JDBC driver URL information is incorrect.

This is how an older version of WAS did it with Cloudscape/Derby....

What's probably happening is: something is preventing the
timer/scheduler service from starting, back at the time this module (or
some other module that also contains TimedObjects) is started. At the
time an EJB module is started, the WAS EJB container looks to see if any
beans within that module implement TimedObject. If any do, we attempt
to start the scheduler service if it is not already running.

When you see the message, it means that the EJB container is attempting
to call the scheduler service, but the service is not started.* Some
possible causes for the service being unable to start are:

- Scheduler database not present
- Database is present but scheduler tables are not present or are not
defined correctly
- Server does not have access authority to the scheduler database*

*When you install WAS, it comes pre-configured out of the box to use an
internal instance of a Cloudscape/Derby database for its scheduler data. *
However, it is possible to configure the EJB Timer service (which in
turn uses the scheduler service) to use an alternate database or
scheduler instance. It's possible, if the scheduler/timer service
config has been modified, that there could be a config problem that
would prevent the scheduler from starting.

In any case, there should be some messages further up in your system out
log indicating that the scheduler had trouble starting, which should
shed some light as to the cause.

On Fri, May 1, 2009 at 12:20 PM, jsexton0 <jsexton0@gmail.com> wrote:

>
> Hello -
>
> I unloaded some SAs, shutdown everything on my computer, restarted
> Glassfish
> (it looked OK), and then reloaded the SAs one at a time and everything came
> up and runs normally.
>
> So it doesn't appear to be corrupted at least, it's just a problem with the
> general start up process, when everything is loaded.
>
> Thanks
>
>
> Manfred Riem wrote:
> >
> > The only other thing I could recommend is to connect
> > to the EJB timer database yourself and see if the
> > database itself is not corrupted in anyway.
> >
> > Manfred
> >
> >> -------- Original Message --------
> >> Subject: Re: [entpack] Derby Error Starting Glassfish
> >> From: jsexton0 <jsexton0@gmail.com>
> >> Date: Fri, May 01, 2009 9:49 am
> >> To: nbentpack@netbeans.org
> >>
> >>
> >> Hello -
> >>
> >> I tried changing the max connections to 64, and the timeout to 90000 on
> >> each
> >> pool..
> >>
> >> __TimerPool
> >> DerbyPool
> >> iepseDerbyPoolNonXA
> >> iepseDerbyPoolXA
> >>
> >> Still unable to startup Glassfish correctly, no change.  I do not know
> >> were/how to set other Derby properties.  My server is
> >> as-originally-installed with respect to the __TimerPool settings.
> >>
> >> I guess I'll have to try pointing it at a different database server
> >> altogether.  I'd like to understand why this started happening however,
> >> and
> >> I hate having to make such a drastic change to the way Glassfish comes
> >> "out
> >> of the box".
> >>
> >> I do have one timer bean in my application, but it's been working fine
> >> for
> >> months as other development has progressed.  Nothing in particular seems
> >> to
> >> have caused this error to begin happening, except the application has
> >> grown.
> >>
> >> Thanks
> >>
> >>
> >> OpenXGroup Inc. wrote:
> >> >
> >> > Another thing to try- change
> connection-validation-method="auto-commit"
> >> to
> >> > be "table"?
> >> > Can you change javax.sql.ConnectionPoolDataSource to
> >> javax.sql.DataSource?
> >> > Or use XA datasource altogether?
> >> >
> >> > When you use a timer, it comes with the XA datasource access because
> >> the
> >> > timer instances are stored in the database. When you call your method
> >> > directly, it uses a single (non-XA) connection. And that is a big
> >> > difference.
> >> >
> >> > More information about *how to diagnose a deadlock situation in Derby
> /
> >> > Java
> >> > DB*.
> >> > http://wiki.apache.org/db-derby/LockDebugging
> >> > http://db.apache.org/derby/docs/dev/devguide/cdevconcepts50894.html
> >> >
> >> > Note that lock ordering as part of the application is important (e.g.
> >> > locking in same order) and that a table being accessed without an
> index
> >> > could lead to a Table-level lock, affecting the lock granularity quite
> >> > significantly and the risk of deadlocks as part of the applications.
> It
> >> > seemed like some index might have been missing for some of the columns
> >> > being
> >> > searched as part of some queries.
> >> >
> >> >
> >> > On Fri, May 1, 2009 at 10:59 AM, jsexton0 <jsexton0@gmail.com> wrote:
> >> >
> >> >>
> >> >> Hello -
> >> >>
> >> >> This is interesting...
> >> >> This error is happening on the Derby database, very early in
> >> Glassfish's
> >> >> startup.  I am not (directly) using the Derby database in any of my
> >> code.
> >> >> Are you suggesting a change to Glassfish's default setup for its
> Derby
> >> >> pool?
> >> >> I can certainly try that...
> >> >>
> >> >> Thanks
> >> >>
> >> >>
> >> >> OpenXGroup Inc. wrote:
> >> >> >
> >> >> > Take a look at wrong XA state as well...
> >> >> >
> >> >> > Can you change javax.sql.ConnectionPoolDataSource to
> >> >> javax.sql.DataSource?
> >> >> > Or use XA datasource altogether?
> >> >> > I increased the "Initial and Minimum Pool Size" from 32 (default)
> to
> >> >> 64.
> >> >> > The
> >> >> > error vanished, but I don't know if it just depends on how many
> >> times
> >> >> per
> >> >> > timer event a connection is requested. May be the error will occure
> >> >> again
> >> >> > with more connection requests. Do you now what the maximal possible
> >> >> value
> >> >> > is
> >> >> > for the Initial and Minimum Pool Size? The value of 128 seemed not
> >> to
> >> >> be
> >> >> > accepted.
> >> >> >
> >> >> > I was able to resolve my problem by changing the resource type to
> >> >> > java.sql.ConnectionPoolDataSource.
> >> >> >
> >> >> > Do you need transactional capability. If not, you can set your pool
> >> to
> >> >> > return non-transactional-connections.
> >> >> >
> >> >> > Set non-transactional-connections="true" in your
> >> <jdbc-connection-pool>
> >> >> > configuration.
> >> >> >
> >> >> > There are two type of transactions we can talk about in general
> >> >> > (pertaining
> >> >> > to this thread).
> >> >> >
> >> >> > 1) There is the transaction that you can write using SQL which you
> >> (the
> >> >> > programmer) write yourself.
> >> >> > 2) There is the transaction that java handles at a system level
> >> which
> >> >> can
> >> >> > apply to any operation or series of operations you require to be
> >> >> performed
> >> >> > from beginning to end without error (including database
> operations).
> >> >> >
> >> >> > By setting non-transactional-connections to true you will not get
> >> the
> >> >> > protection from system failure as described in number 2.
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23334482.html
> >> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335261.html
> >> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Derby-Error-Starting-Glassfish-tp23334048p23335749.html
> Sent from the NetBeans - EntPack mailing list archive at Nabble.com.
>
>
< Prev | 1 - 2 | Next >