Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Persisting EJB Timer - Gives some exception  RSS feed

Gopi Chand
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I have some problem with persisting ejb timer service.

java.lang.IllegalStateException: Unable to persist timer
at org.jboss.ejb.txtimer.DatabasePersistencePolicy.insertTimer(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -195: Column 'INSTANCEPK' in table 'TIMERS' cannot be NULL
at com.sybase.jdbc2.tds.Tds.processEed(
at com.sybase.jdbc2.tds.Tds.nextResult(
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(

and I am getting this exception. When I look at the sybase table definition, it says INSTANCEPK cannot accept null. So tried to change the way table is created, by using this ejb-timer-service.xml

<mbean code="org.jboss.ejb.txtimer.DatabasePersistencePolicy" name="jboss.ejb:service=EJBTimerService,persistencePolicy=database">
<depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
<attribute name="DatabasePersistencePlugin">org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin</attribute>
<!--<attribute name="CreateTableDDL">
create table TIMERS
TIMERID varchar(50) NOT NULL,
TARGETID varchar(50) NOT NULL,
INTERVAL bigint,
INFO other,
constraint timers_pk primary key (TIMERID)

you can see I have comment out attribute tag, I thought this how table is defined. When I uncomment CreateTableDDL I am getting another error saying that "No such attribute as CreateTableDDL, since DatabasePersistencePolicy class doesn't have a equivalent set method.

Why is this happening and am I doing something wrong here !!

[ July 30, 2007: Message edited by: Jcoder ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!