spring jbpm整合出错 ?
在看了多位高手的帖子后,
决定自己整合spring+jbpm
但出错了。
环境如下:
eclipse 3.2 +myeclipse 5.0 +hibernate3.0/3.2+jbpm3.1.4
junit 测试 出错 ,错误信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.DuplicateMappingException: Duplicate collection role mapping org.jbpm.identity.Group.children
org.hibernate.DuplicateMappingException: Duplicate collection role mapping org.jbpm.identity.Group.children
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:123)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1965)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1940)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:324)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:238)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:109)
at org.hibernate.cfg.Configuration.add(Configuration.java:385)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:426)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:679)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
at com.ltong.tax.common.AppContext.<init>(AppContext.java:19)
at com.ltong.tax.common.AppContext.getInstance(AppContext.java:12)
at com.ltong.tax.common.AppContextTest.testGetInstance(AppContextTest.java:9)
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:324)
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)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
hibernate 3.0 /3.2 都用过,
都不行 ,
请高手指教!