0 Replies Latest reply on Apr 19, 2003 1:47 PM by Alex Shneyderman

    Problem autoincrement and HSQLDB

    Alex Shneyderman Newbie

      I am tryeing to use autoincrement for PK and get the following exception on deployment:

      13:20:19,245 ERROR [EntityContainer] Starting failed
      java.lang.IllegalStateException: auto-increment template not found
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addField(JDBCStartCommand.java:269)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:232)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:87)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:505)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:416)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy123.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:341)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy21.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:473)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:404)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:531)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:206)
      :
      :


      my jboss-jdbccmp.xml has the following fragment:
      :
      :

      <ejb-name>SearchUnitEJB</ejb-name>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <table-name>nuke_search_unit</table-name>

      <cmp-field>
      <field-name>id</field-name>
      <column-name>id</column-name>

      <auto-increment/>
      </cmp-field>
      :
      :

      Anyone know what might be wrong here?

      Thanks,
      Alex.