7 Replies Latest reply on May 22, 2012 8:05 AM by Halli Balli

    Tablename with reserved name "user" -> "XUser"

    Halli Balli Newbie

      Hallo,

       

      when I deploy my entity beans I get the following error:

       

      10:05:45,817 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."gan

      .ear"."gan_ejb-server.jar".component.UserEntityEJB.jdbc.store-manager.START: org.jboss.msc.service.StartException in service jboss.dep

      loyment.subunit."gan.ear"."gan_ejb-server.jar".component.UserEntityEJB.jdbc.store-manager.START: JBAS010785: Failed start store mana

      ger

              at org.jboss.as.cmp.jdbc.JdbcStoreManagerStartService.start(JdbcStoreManagerStartService.java:46)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2

      .GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_31]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_31]

              at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_31]

      Caused by: java.lang.RuntimeException: JBAS010765: Error while creating table: Xuser

              at org.jboss.as.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:447)

              at org.jboss.as.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:175)

              at org.jboss.as.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:233)

              at org.jboss.as.cmp.jdbc.JdbcStoreManagerStartService.start(JdbcStoreManagerStartService.java:44)

              ... 5 more

      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Eine Tabelle kann h÷chstens eine timestamp-Spalte besitzen. Da die 'Xuser'-Tabel

      le bereits eine timestamp-Spalte besitzt, kann die 'valid_until'-Spalte nicht hinzugef³gt werden.

              at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)

              at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)

              at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(Unknown Source)

              at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:371)

              at org.jboss.as.cmp.jdbc.JDBCStartCommand.createTable(JDBCStartCommand.java:439)

              ... 8 more

       

       

      I think the problem is caused because in the database there is a table called user and this is a reserved word. And JBoss seems to use Xuser instead

      Is there a way to "convince" JBoss to accept user as a tablename for my entity bean? Escaping brackets [] don't work either.

       

      In addition to that I am wondering why there is a error about timestamp columns because I don't use MySQL I use MS-SQL and there the column's data type is Datetime not Timestamp.

       

      Any help is apreciated

      Thank you in advance