1 Reply Latest reply on Mar 10, 2006 8:09 AM by r y

    Exception creating jBPM database

    r y Newbie

      Hi

      I'm just preparing the migration from jBPM 3.0.1 to 3.1
      We have a lot of work developed, and after doing everything necessary (I think ...) and reconfig, when I run the Ant task "create.db", it starts to work, but always, it fails at the same point (mapping org/jbpm/scheduler/def/CreateTimerAction.hbm.xml):

      .
      .
      .

      [jbpmschema] 12:21:35,049 INFO Configuration : Mapping resource: org/jbpm/taskmgmt/exe/PooledActor.hbm.xml
      [jbpmschema] 12:21:35,049 INFO HbmBinder : Mapping class: org.jbpm.taskmgmt.exe.PooledActor -> JBPM_POOLEDACTOR
      [jbpmschema] 12:21:35,064 INFO HbmBinder : Mapping collection: org.jbpm.taskmgmt.exe.PooledActor.taskInstances -> JBPM_TASKACTORPOOL
      [jbpmschema] 12:21:35,064 INFO Configuration : Mapping resource: org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml
      [jbpmschema] 12:21:35,064 INFO HbmBinder : Mapping class: org.jbpm.taskmgmt.exe.SwimlaneInstance -> JBPM_SWIMLANEINSTANCE
      [jbpmschema] 12:21:35,064 INFO Configuration : Mapping resource: org/jbpm/scheduler/exe/Timer.hbm.xml
      [jbpmschema] 12:21:35,174 INFO HbmBinder : Mapping class: org.jbpm.scheduler.exe.Timer -> JBPM_TIMER
      [jbpmschema] 12:21:35,174 INFO Configuration : Mapping resource: org/jbpm/scheduler/def/CreateTimerAction.hbm.xml
      [jbpmschema] 12:21:35,189 INFO HbmBinder : Mapping subclass: org.jbpm.scheduler.def.CreateTimerAction -> JBPM_ACTION
      [jbpmschema] 12:21:35,205 INFO JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'

      BUILD FAILED
      java.lang.ExceptionInInitializerError

      .
      .
      .

      If I remove that resource, the next one (org/jbpm/scheduler/def/CancelTimerAction.hbm.xml) fails too.
      If I remove both xxxTimerAction.hbm.xml, it continues, but fails again at the point of hibernate.queries.hbm.xml processing. I think this error is due to the previous mapping task removing.

      Anyone have the same problem? ... I'm getting demoralized
      Thanks you all

        • 1. Re: Exception creating jBPM database
          r y Newbie

          Hi again ...

          I've just resolve the first problem "java.lang.ExceptionInInitializeError". In my 'jbpm.cfg.xmml' I have included a new line, and between attribute 'name' and 'value' there was a comma:

          .... name="resource.bas", value="org..." ....

          But the second problem still continue. At the "hibernate.queries.hbm.xml" processing I got the next output:

          .
          .
          .
          [loadidentities] 13:48:03,018 WARN EhCacheProvider : Could not find configuration [org.jbpm.taskmgmt.def.Task.exceptionHandlers]; using defaults.
          [loadidentities] 13:48:03,033 WARN EhCacheProvider : Could not find configuration [org.jbpm.graph.def.Node.exceptionHandlers]; using defaults.
          [loadidentities] 13:48:03,033 WARN EhCacheProvider : Could not find configuration [org.jbpm.graph.def.Transition.events]; using defaults.
          [loadidentities] 13:48:03,361 INFO SessionFactoryObjectFactory : Not binding factory to JNDI, no JNDI name configured
          [loadidentities] 13:48:03,377 INFO SessionFactoryImpl : Checking 25 named queries
          [loadidentities] 13:48:03,689 ERROR ErrorCounter : *** ERROR: line 3:43: expecting "set", found 't'
          [loadidentities] 13:48:03,705 ERROR ErrorCounter : *** ERROR: line 3:43: expecting "set", found 't'
          [loadidentities] 13:48:03,721 ERROR ErrorCounter : *** ERROR: line 3:48: unexpected token: t
          [loadidentities] 13:48:03,752 ERROR SessionFactoryImpl : Error in named query: SchedulerSession.deleteTimersForProcessInstance
          [loadidentities] org.hibernate.hql.ast.QuerySyntaxError: unexpected token: t near line 3, column 48 [
          [loadidentities] delete from org.jbpm.scheduler.exe.Timer t
          [loadidentities] where t.processInstance = :processInstance
          [loadidentities] ]
          [loadidentities] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:291)
          [loadidentities] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
          [loadidentities] at org.jbpm.JbpmContext.getSession(JbpmContext.java:354)
          [loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(LoadIdentitiesTask.java:62)
          [loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
          [loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
          [loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
          [loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:369)
          [loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
          [loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
          [loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
          [loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
          [loadidentities] Caused by: line 3:48: unexpected token: t
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.deleteStatement(HqlBaseParser.java:242)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:139)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
          [loadidentities] ... 22 more
          [loadidentities] 13:48:03,768 ERROR SessionFactoryImpl : Error in named query: SchedulerSession.suspendTimersForToken
          [loadidentities] org.hibernate.hql.ast.QuerySyntaxError: expecting "set", found 't' near line 3, column 43 [
          [loadidentities] update org.jbpm.scheduler.exe.Timer t
          [loadidentities] set t.isSuspended = true
          [loadidentities] where t.token = :token
          [loadidentities] ]
          [loadidentities] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:291)
          [loadidentities] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
          [loadidentities] at org.jbpm.JbpmContext.getSession(JbpmContext.java:354)
          [loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(LoadIdentitiesTask.java:62)
          [loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
          [loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
          [loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
          [loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:369)
          [loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
          [loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
          [loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
          [loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
          [loadidentities] Caused by: line 3:43: expecting "set", found 't'
          [loadidentities] at antlr.Parser.match(Parser.java:211)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.setClause(HqlBaseParser.java:337)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.updateStatement(HqlBaseParser.java:183)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:133)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
          [loadidentities] ... 22 more
          [loadidentities] 13:48:03,768 ERROR SessionFactoryImpl : Error in named query: SchedulerSession.resumeTimersForToken
          [loadidentities] org.hibernate.hql.ast.QuerySyntaxError: expecting "set", found 't' near line 3, column 43 [
          [loadidentities] update org.jbpm.scheduler.exe.Timer t
          [loadidentities] set t.isSuspended = false
          [loadidentities] where t.token = :token
          [loadidentities] ]
          [loadidentities] at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)
          [loadidentities] at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:291)
          [loadidentities] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
          [loadidentities] at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
          [loadidentities] at org.jbpm.JbpmContext.getSession(JbpmContext.java:354)
          [loadidentities] at org.jbpm.identity.ant.LoadIdentitiesTask.execute(LoadIdentitiesTask.java:62)
          [loadidentities] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
          [loadidentities] at org.apache.tools.ant.Task.perform(Task.java:364)
          [loadidentities] at org.apache.tools.ant.Target.execute(Target.java:341)
          [loadidentities] at org.apache.tools.ant.Target.performTasks(Target.java:369)
          [loadidentities] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
          [loadidentities] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
          [loadidentities] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
          [loadidentities] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
          [loadidentities] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
          [loadidentities] Caused by: line 3:43: expecting "set", found 't'
          [loadidentities] at antlr.Parser.match(Parser.java:211)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.setClause(HqlBaseParser.java:337)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.updateStatement(HqlBaseParser.java:183)
          [loadidentities] at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:133)
          [loadidentities] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
          [loadidentities] ... 22 more
          [loadidentities] 13:48:03,783 DEBUG JbpmContext : closing JbpmContext
          [loadidentities] 13:48:03,783 DEBUG Services : closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@c3358b

          BUILD FAILED

          I suppose that this file is correct, because I have not made changes on it and it's a xml from jBPM people ...

          Thx boys. Still at work. :D