users@glassfish.java.net

Re: How to enable EJB Timer on GlassFish Cluster?

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 May 2010 06:18:10 PDT

It gives:

javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: null source

Tracking:

EJB5108:Unable to initialize EJB Timer Service.[b] The likely cause is the database has not been started or the timer database table has not been created[/b].
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: null source
java.lang.IllegalArgumentException: null source
        at java.util.EventObject.<init>(EventObject.java:38)
        at javax.sql.StatementEvent.<init>(StatementEvent.java:39)
        at com.mysql.jdbc.jdbc2.optional.JDBC4PreparedStatementWrapper.close(JDBC4PreparedStatementWrapper.java:70)
        at com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement.close(DBStatement.java:185)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.close(SQLStoreManager.java:685)
        at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:482)
        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)


BUT I have the database created as:
mysql> CREATE TABLE EJB__TIMER__TBL (
    -> CREATIONTIMERAW bigint NOT NULL,
    -> `BLOB` BLOB,
    -> TIMERID VARCHAR (255) NOT NULL,
    -> CONTAINERID bigint NOT NULL,
    -> OWNERID VARCHAR (255) NOT NULL,
    -> STATE INTEGER NOT NULL,
    -> PKHASHCODE INTEGER NOT NULL,
    -> INTERVALDURATION bigint NOT NULL,
    -> INITIALEXPIRATIONRAW bigint NOT NULL,
    -> LASTEXPIRATIONRAW bigint NOT NULL,
    -> CONSTRAINT PRIMARY KEY (TIMERID)
    -> );
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;
+--------------------+
| Tables_in_ejbtimer |
+--------------------+
| ejb__timer__tbl |
+--------------------+
1 row in set (0.00 sec)

If you open the attachment ejbtimerDB.PNG in my previous post, the db table can be opened in NetBeans.

If you open the attachment PingConnectionPool.PNG in my previous post, I can ping the db connection pool successfully.

But why it cannot be accessed by EJB Containter?

There is one sentence from http://programmaremobile.blogspot.com/2009/02/clustering-and-ejb-timer-eng.html :

"Note: The table name must be uppercase."
My table name appears as "ejb__timer__tbl" (mysql 5.1.6) in the windows env, could that be the problem?
[Message sent by forum member 'raejean99']

http://forums.java.net/jive/thread.jspa?messageID=400328