jbpm发布时的异常

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 代码
 
  1. <property name="hibernate.cache.use_second_level_cache">false</property>  
  2. <property name="hibernate.cache.use_query_cache">false</property>   


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


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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值