« Return to Thread: Derby Error Starting Glassfish

Re: Derby Error Starting Glassfish

by OpenXGroup Inc. :: Rate this Message:

Reply to Author | View in Thread

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.



 « Return to Thread: Derby Error Starting Glassfish