UFLO和DBf2集成 hibernate NoSuchMethodError 错误

集成dbf2和uflo,均使用hibernate3.6.10.Final。
dbf2没有问题。UFLO已经实现了各种配置和EnvironmentProvider接口,启动时候报错
严重: Exception sending context initialized event to listener instance of class com.bstek.dorado.web.servlet.SpringContextLoaderListener
 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uflo.instanceDetection' defined in class path resource [uflo-context-configs.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/Session;
 
从网上搜索一般是hibernate的包问题,不知道怎么配置这一块
 
 

Caused by: java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/Session;
at com.bstek.uflo.env.impl.ContextImpl.getSession(ContextImpl.java:44)
at com.bstek.uflo.command.impl.GetTaskReminderCommand.execute(GetTaskReminderCommand.java:38)
at com.bstek.uflo.command.impl.GetTaskReminderCommand.execute(GetTaskReminderCommand.java:31)
at com.bstek.uflo.command.impl.SpringTransactionCommandService$1.doInTransaction(SpringTransactionCommandService.java:53)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at com.bstek.uflo.command.impl.SpringTransactionCommandService.executeCommand(SpringTransactionCommandService.java:51)
at com.bstek.uflo.service.impl.DefaultTaskService.getAllTaskReminders(DefaultTaskService.java:358)
at com.bstek.uflo.service.impl.SchedulerServiceImpl.initTaskReminders(SchedulerServiceImpl.java:168)
at com.bstek.uflo.service.impl.SchedulerServiceImpl.resetScheduer(SchedulerServiceImpl.java:147)
at com.bstek.uflo.heartbeat.InstanceDetection.startDaemonJob(InstanceDetection.java:61)
at com.bstek.uflo.heartbeat.InstanceDetection.afterPropertiesSet(InstanceDetection.java:116)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 22 more
 
 
已邀请:

WilliamJiang

赞同来自:

应该是引入了hibernate4的包了。

houdianming14

赞同来自:

生成的是Dynamic Web Proect。没有hibernate4的包。下边列式一下自己的包。
2017/10/30  07:54    <DIR>          .
2017/10/30 07:54 <DIR> ..
2017/10/27 15:55 62,983 activation-1.1.jar
2017/10/27 15:55 1,933,743 ant-1.8.2.jar
2017/10/27 15:55 12,322 ant-launcher-1.8.2.jar
2017/10/27 15:55 443,432 antlr-2.7.6.jar
2017/10/27 15:55 4,467 aopalliance-1.0.jar
2017/10/27 15:55 95,536 apache-mime4j-core-0.7.2.jar
2017/10/27 15:55 43,581 asm-3.3.1.jar
2017/10/27 15:55 420,860 axiom-api-1.2.13.jar
2017/10/27 15:55 158,091 axiom-impl-1.2.13.jar
2017/10/27 15:55 49,664 bdf2-authoritydelegation-2.0.4.jar
2017/10/27 15:55 39,136 bdf2-componentprofile-2.0.6.jar
2017/10/27 17:50 862,995 bdf2-core-2.0.9.jar
2017/10/27 15:55 87,084 bdf2-export-2.0.8.jar
2017/10/27 15:55 86,647 bdf2-import-2.0.8.jar
2017/10/27 15:55 69,486 bdf2-job-2.0.5.jar
2017/10/27 18:30 21,736 bdf2-job-daemon-2.0.4-hibernate3.jar
2017/10/27 17:50 21,736 bdf2-job-daemon-2.0.4.jar
2017/10/27 15:55 156,451 bdf2-orm-hibernate3-2.1.0.jar
2017/10/27 15:55 67,338 bdf2-profile-2.0.4.jar
2017/10/27 18:15 1,514,324 bdf2-swfviewer-2.0.5.jar
2017/10/27 15:55 23,436 bdf2-webservice-2.0.2.jar
2017/10/27 15:55 5,389 bdf2-webservice-client-2.0.2.jar
2017/10/27 15:55 608,376 c3p0-0.9.1.1.jar
2017/10/27 15:55 86,227 cas-client-core-3.1.12.jar
2017/10/27 15:55 287,192 cglib-2.2.2.jar
2017/10/27 15:55 232,019 commons-beanutils-1.8.3.jar
2017/10/27 17:50 259,600 commons-codec-1.7.jar
2017/10/27 15:55 559,366 commons-collections-3.1.jar
2017/10/27 15:55 160,519 commons-dbcp-1.4.jar
2017/10/27 15:55 196,768 commons-digester-2.1.jar
2017/10/27 15:55 69,002 commons-fileupload-1.3.1.jar
2017/10/27 15:55 163,151 commons-io-2.1.jar
2017/10/27 15:55 267,634 commons-jexl-2.1.1.jar
2017/10/27 15:55 284,220 commons-lang-2.6.jar
2017/10/27 15:55 60,686 commons-logging-1.1.1.jar
2017/10/27 17:50 52,915 commons-logging-1.1.jar
2017/10/27 15:55 96,221 commons-pool-1.5.4.jar
2017/10/27 15:55 313,898 dom4j-1.6.1.jar
2017/10/27 18:16 4,514,123 dorado-core-7.5.1.jar
2017/10/27 15:55 27,291 dorado-intro-0.2.1.jar
2017/10/27 18:17 217,084 dorado-uploader-1.0.20.jar
2017/10/27 15:55 1,301,198 ehcache-core-2.6.3.jar
2017/10/27 15:55 293,863 FastInfoset-1.2.12.jar
2017/10/27 15:55 47,465 geronimo-activation_1.1_spec-1.1.jar
2017/10/27 15:55 223,298 geronimo-javamail_1.4_spec-1.7.1.jar
2017/10/27 15:55 28,804 geronimo-stax-api_1.0_spec-1.0.1.jar
2017/10/27 15:55 71,283 hibernate-commons-annotations-3.2.0.Final.jar
2017/10/27 15:55 3,123,360 hibernate-core-3.6.10.Final.jar
2017/10/27 15:55 102,661 hibernate-jpa-2.0-api-1.0.1.Final.jar
2017/10/27 15:55 1,256,297 hsqldb-2.0.0.jar
2017/10/27 15:55 428,353 httpclient-4.2.2.jar
2017/10/27 15:55 223,571 httpcore-4.2.2.jar
2017/10/27 15:55 22,666 istack-commons-runtime-2.14.jar
2017/10/27 15:55 2,166,560 itext-asian-5.2.0.jar
2017/10/27 15:55 1,889,486 itextpdf-5.4.0.jar
2017/10/27 15:55 35,058 jackson-annotations-2.3.0.jar
2017/10/27 15:55 197,981 jackson-core-2.3.0.jar
2017/10/27 15:55 232,131 jackson-core-asl-1.9.11.jar
2017/10/27 15:55 914,028 jackson-databind-2.3.0.jar
2017/10/27 15:55 780,421 jackson-mapper-asl-1.9.11.jar
2017/10/27 14:16 711,972 javassist-3.17.1-GA.jar
2017/10/27 15:55 100,146 jaxb-api-2.2.7.jar
2017/10/27 15:55 221,679 jaxb-core-2.2.7-b60.jar
2017/10/27 15:55 919,968 jaxb-impl-2.2.7-b60.jar
2017/10/27 15:55 223,395 jaxen-1.1.3.jar
2017/10/27 15:55 543,044 joda-time-1.6.2.jar
2017/10/27 15:55 49,672 jsr173_api-1.0.jar
2017/10/27 15:55 15,071 jta-1.1.jar
2017/10/27 15:55 431,542 kaptcha-2.3.2.jar
2017/10/30 07:54 0 list.txt
2017/10/27 15:55 489,884 log4j-1.2.17.jar
2017/10/27 15:55 447,676 mail-1.4.1.jar
2017/10/27 14:16 999,632 mysql-connector-java-5.1.44.jar
2017/10/27 15:55 1,352,924 opensaml-2.5.1-1.jar
2017/10/27 15:55 565,330 openws-1.4.2-1.jar
2017/10/27 15:55 29,555 paranamer-2.3.jar
2017/10/27 15:55 1,869,113 poi-3.9.jar
2017/10/27 15:55 30,446 poi-excelant-3.9.jar
2017/10/27 15:55 936,648 poi-ooxml-3.9.jar
2017/10/27 15:55 4,802,621 poi-ooxml-schemas-3.9.jar
2017/10/27 15:55 563,873 quartz-2.1.7.jar
2017/10/27 15:55 278,281 serializer-2.7.1.jar
2017/10/27 15:55 105,112 servlet-api-2.5.jar
2017/10/27 15:55 336,742 sjsxp-1.0.2.jar
2017/10/27 15:55 25,496 slf4j-api-1.6.1.jar
2017/10/27 15:55 7,033 slf4j-jcl-1.7.2.jar
2017/10/27 15:55 7,845 slf4j-jdk14-1.7.2.jar
2017/10/27 17:50 8,819 slf4j-log4j12-1.7.2.jar
2017/10/27 15:55 351,240 spring-aop-4.0.0.RELEASE.jar
2017/10/27 15:55 669,267 spring-beans-4.0.0.RELEASE.jar
2017/10/27 15:55 950,606 spring-context-4.0.0.RELEASE.jar
2017/10/27 15:55 134,122 spring-context-support-4.0.0.RELEASE.jar
2017/10/27 15:55 955,328 spring-core-4.0.0.RELEASE.jar
2017/10/27 15:55 206,507 spring-expression-4.0.0.RELEASE.jar
2017/10/27 15:55 419,872 spring-jdbc-4.0.0.RELEASE.jar
2017/10/27 15:55 316,834 spring-orm-4.0.0.RELEASE.jar
2017/10/27 15:55 79,165 spring-oxm-4.0.0.RELEASE.jar
2017/10/27 15:55 24,193 spring-security-cas-3.1.4.RELEASE.jar
2017/10/27 15:55 203,691 spring-security-config-3.1.4.RELEASE.jar
2017/10/27 15:55 340,298 spring-security-core-3.1.4.RELEASE.jar
2017/10/27 15:55 253,827 spring-security-web-3.1.4.RELEASE.jar
2017/10/27 15:55 248,001 spring-tx-4.0.0.RELEASE.jar
2017/10/27 15:55 8,355 spring-useragentutils-1.1.1.jar
2017/10/27 15:55 661,567 spring-web-4.0.0.RELEASE.jar
2017/10/27 15:55 660,682 spring-webmvc-4.0.0.RELEASE.jar
2017/10/27 15:55 501,814 spring-ws-core-2.1.4.RELEASE.jar
2017/10/27 15:55 99,867 spring-ws-security-2.1.4.RELEASE.jar
2017/10/27 15:55 63,211 spring-xml-2.1.4.RELEASE.jar
2017/10/27 15:55 26,310 stax-api-1.0.jar
2017/10/27 16:57 1,395,371 uflo-console-2.0.3.jar
2017/10/27 16:57 1,395,441 uflo-console-hibernate3-2.0.3.jar
2017/10/27 17:06 437,000 uflo-core-2.0.3.jar
2017/10/27 17:14 437,076 uflo-core-hibernate3-2.0.3.jar
2017/10/27 15:55 34,326 UserAgentUtils-1.15.jar
2017/10/27 15:55 449,505 velocity-1.7.jar
2017/10/27 15:55 148,522 wsdl4j-1.6.1.jar
2017/10/27 15:55 1,497,787 wsit-rt-1.1.jar
2017/10/27 15:55 411,502 wss4j-1.6.5.jar
2017/10/27 15:55 524,224 wstx-asl-3.2.9.jar
2017/10/27 15:55 3,176,148 xalan-2.7.1.jar
2017/10/27 15:55 1,212,965 xercesImpl-2.8.1.jar
2017/10/27 15:55 195,119 xml-apis-1.3.03.jar
2017/10/27 15:55 2,666,695 xmlbeans-2.3.0.jar
2017/10/27 15:55 607,192 xmlsec-1.5.1.jar
2017/10/27 15:55 610,865 xmltooling-1.3.2-1.jar
2017/10/27 15:55 2,464,488 xws-security-1.3.1.jar
我的UFLO包内既有
uflo-console-2.0.3.jar还有uflo-console-hibernate3-2.0.3.jar,把uflo-console-2.0.3.jar和uflo-core-2.0.3.jar去掉就好使了。谢谢


要回复问题请先登录注册