0 Replies Latest reply on Oct 30, 2013 8:49 AM by Sascha Janz

    problems with seam 2.2 jbpm 3.2.2 and sql server on as7

    Sascha Janz Master

      we use a seam 2.2. application in combination with jbpm 3.2.2

       

      we migrated the application to Jboss AS 7. It works fine under oracle, but we got problems using it with sql server.

       

      When jbpm want's to generate a new id for token or something else we got following error

       

      Error commitTransaction: org.hibernate.exception.SQLGrammarException: could not get next sequence value

      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)

      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

      at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:96)

      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)

      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)

      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)

      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94)

      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)

      at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)

      at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)

      at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)

      at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)

      at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)

      at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)

      at org.hibernate.engine.Cascade.cascade(Cascade.java:130)

       

      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Ungültiger Objektname 'dual'.

      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)

      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1458)

      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)

      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)

      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4016)

      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1414)

      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:176)

      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:151)

      at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:281)

      at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:107)

      at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)

      at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:75)

      ... 62 more

       

      it seems jbpm still wants to use oracle dialect.

       

      but in the hibernate.cfg.xml in our war ear file, there is the appropriate  entry

       

       

      <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>

       

      and no where else is any entry for oracle.

       

      any idea what we could check ?