1 Reply Latest reply on Mar 17, 2005 5:45 PM by Szymon Dembek

    JBoss4.0.1RC2 EJBTimerService failure

    Raj Subramani Newbie

      I posted this in Installation & Configuration forum and got no joy, maybe it was the wrong forum, maybe I'd have some better luck here.


      I noticed this new MBean in the ejb-deployer.xml (whe compared to v4.0.0):

       <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>
       </mbean>
      


      This causes the following (metadata) exception with my database (Apache Derby)


      12:43:34,140 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for Conn
      ectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding to JNDI name 'java:DefaultDS'
      12:43:34,171 ERROR [DatabasePersistencePolicy] Starting failed jboss.ejb:persistencePolicy=database,
      service=EJBTimerService
      java.lang.IllegalStateException: Cannot find datasource meta data: jboss.jdbc:datasource=DefaultDS,s
      ervice=metadata
       at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.init(GeneralPurposeDatabasePersist
      encePlugin.java:81)
       at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:87)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:173)
       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:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:908)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at org.jboss.system.ServiceController.start(ServiceController.java:438)
       at org.jboss.system.ServiceController.start(ServiceController.java:438)
       at org.jboss.system.ServiceController.start(ServiceController.java:438)
       at org.jboss.system.ServiceController.start(ServiceController.java:438)
       at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      
      


      Is this because of the way in which the Metadata is being sought:


      (org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.java)
      ...
       // Get the DataSource meta data
       String dsName = dataSourceName.getKeyProperty("name");
       metaDataName = ObjectNameFactory.create("jboss.jdbc:datasource=" + dsName + ",service=metadata");
       if (this.server.isRegistered(metaDataName) == false)
       throw new IllegalStateException("Cannot find datasource meta data: " + metaDataName);
      ...
      


      I could register this as a bug with Derby if this is the standard method for getting metadata from a datasource?

      (the derby bug reporting url is http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=10594 )


      For the moment I am commenting this MBean out and the rest works ok.

      Cheers
      -raj