| Author |
Persisting EJB Timer - Gives some exception
|
Gopi Chand
Greenhorn
Joined: Feb 04, 2007
Posts: 24
|
|
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(DatabasePersistencePolicy.java:126) 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:585) ....... ....... 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(Tds.java:2538) at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922) at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69) at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201) 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, INITIALDATE timestamp NOT NULL, INTERVAL bigint, INSTANCEPK other NULL, INFO other, constraint timers_pk primary key (TIMERID) ) </attribute> --> </mbean> 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 ]
|
 |
 |
|
|
subject: Persisting EJB Timer - Gives some exception
|
|
|