0 Replies Latest reply on Jan 16, 2006 1:09 PM by erich_lol

    Jboss does alter table on unchanged ejb and fails

      Hi,

      I am running jboss as 4.0.3 sp1 on mysql 5.0 or Hsql (the db the comes with jboss)
      I designed two ejbs user and buddy and deployed them using xdoclet.
      Everything runs fine for the first run, but when I redploy the same ejbs or restart jboss I get

      19:07:23,453 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
      ame=ejb/MessageLocalHome,service=EJB
      org.jboss.deployment.DeploymentException: Error while alter table buddy ALTER TA
      BLE buddy ADD buddy_id VARCHAR(250) BINARY NOT NULL; - nested throwable: (java.s
      ql.SQLException: Duplicate column name 'buddy_id')
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.alterTable(JDBCStartC
      ommand.java:466)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartComm
      and.java:125)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
      CStoreManager.java:484)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:381)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:157)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:274)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:230)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      ... and so on.
      Why does Jboss CMP try to alter the table? it looks was perfectly fine the first time it was created.