ITeye博客

jbpm发布时的异常

fourfire · 2007-03-16 14:50 · Markdown

1 Q
13:54:14,453 [main] ERROR ErrorCounter : *** ERROR: line 3:43: expecting "set", found 't'
13:54:14,468 [main] ERROR ErrorCounter : *** ERROR: line 3:43: expecting "set", found 't'
13:54:14,484 [main] ERROR ErrorCounter : *** ERROR: line 3:48: unexpected token: t
13:54:14,546 [main] ERROR SessionFactoryImpl : Error in named query: SchedulerSession.deleteTimersForProcessInstance
org.hibernate.hql.ast.QuerySyntaxError: unexpected token: t near line 3, column 48 [
   
      delete from org.jbpm.scheduler.exe.Timer t
      where t.processInstance = :processInstance
   
  ]
    at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
    at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
    at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
    at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:375)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:278)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
    at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
    at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
    at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
    at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:216)
    at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:427)
    at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:166)
    at com.firebow.jbpm.test.DeployProcessTest.testDeployProcessDefinition(DeployProcessTest.java:46)
    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:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
A:
使用hibernate 3.2以上版本
2 Q:
</init>

org.hibernate.HibernateException: Could not instantiate cache implementation
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
        at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
        at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
        at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
        at org.jbpm.persistence.db.DbPersistenceService.getMessagingSession(DbPersistenceService.java:235)
        at org.jbpm.JbpmContext.getMessagingSession(JbpmContext.java:521)
        at org.jbpm.msg.db.DbMessageService.<init>(DbMessageService.java:49)
        at org.jbpm.msg.db.DbMessageServiceFactory.openService(DbMessageServiceFactory.java:32)
        at org.jbpm.svc.Services.getService(Services.java:136)
        at org.jbpm.svc.Services.getMessageService(Services.java:172)
        at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:112)
        at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
        at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
        at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)</init></init>

A:
hibernate.hbm.xml中加入

<property highlightedsearchterm="" name="&amp;lt;span class=">
xml 代码

 <property name="hibernate.cache.use_second_level_cache">false</property>  <property name="hibernate.cache.use_query_cache">false</property>   
或
<property highlightedsearchterm="" name="&amp;lt;span class=">
xml 代码

 <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>  
或
<property highlightedsearchterm="" name="&amp;lt;span class=">
xml 代码

 <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>  

评论(4)

  1. #4 楼 · clasp · 2008-01-31 13:00

    老兄!我跟你一样的问题,把hibernate换成hibernate-3.2,使用c3p0-0.9.1.jar池就行了.

  2. #3 楼 · fourfire · 2007-07-02 08:52

    是不是版本不对啊,怎么会访问不了方法呢

  3. #2 楼 · lyo · 2007-07-01 17:57

    java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager.()V from class org.hibernate.cache.EhCacheProvider at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:183) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78) at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:217) at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537) at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173) at lyo.hotmail.test.DeployProcessUtil.main(DeployProcessUtil.java:40) Exception in thread "main"

  4. #1 楼 · wf_7758520 · 2007-03-17 15:49

    Hibernate要用3.1其及以上版

评论功能维护中,当前仅展示历史评论。