`

Named query not known: GraphSession.findLatestProc

阅读更多
org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery
at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:150)
at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
at org.darkness.oa.service.impl.WorkflowService.deployProcessDefinition(WorkflowService.java:98)
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:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy18.deployProcessDefinition(Unknown Source)
at org.darkness.oa.web.actions.WorkflowAction.add(WorkflowAction.java:57)
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:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.darkness.oa.web.actions.BaseAction.execute(BaseAction.java:36)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.darkness.commons.page.PageFilter.doFilter(PageFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
23:20:53,260 ERROR GraphSession:164 - org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery
23:20:53,260 DEBUG SystemExceptionHandler:48 - 出现异常
org.jbpm.JbpmException: couldn't find process definition '测试流程'
at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:170)
at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
at org.darkness.oa.service.impl.WorkflowService.deployProcessDefinition(WorkflowService.java:98)
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:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
at $Proxy18.deployProcessDefinition(Unknown Source)
at org.darkness.oa.web.actions.WorkflowAction.add(WorkflowAction.java:57)
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:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.darkness.oa.web.actions.BaseAction.execute(BaseAction.java:36)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.darkness.commons.page.PageFilter.doFilter(PageFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery
at org.hibernate.impl.AbstractSessionImpl.getNamedQuery(AbstractSessionImpl.java:70)
at org.hibernate.impl.SessionImpl.getNamedQuery(SessionImpl.java:1260)
at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:150)
... 52 more



原来在整合jbpm时,忘了在hbm中加上jbpm的相关配置了,加上如下配置就可以了:
<!-- DataSource properties (begin) ===
    <property name="hibernate.connection.datasource">java:/JbpmDS</property>
    ==== DataSource properties (end) -->
    
    <!-- JTA transaction properties (begin) ===
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
    <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
    ==== JTA transaction properties (end) -->

    <!-- CMT transaction properties (begin) ===
    <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
    <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
    ==== CMT transaction properties (end) -->

    <!-- logging properties (begin) ===
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.format_sql">true</property>
    <property name="hibernate.use_sql_comments">true</property>
    ==== logging properties (end) -->
    
    <!-- ############################################ -->
    <!-- # mapping files with external dependencies # -->
    <!-- ############################################ -->

    <!-- following mapping file has a dependendy on   -->
    <!-- 'bsh-{version}.jar'.                         -->
    <!-- uncomment this if you don't have bsh on your -->
    <!-- classpath.  you won't be able to use the     -->
    <!-- script element in process definition files   -->
    <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>

    <!-- following mapping files have a dependendy on  -->
    <!-- 'jbpm-identity.jar', mapping files            -->
    <!-- of the pluggable jbpm identity component.     -->
    <!-- Uncomment the following 3 lines if you        -->
    <!-- want to use the jBPM identity mgmgt           -->
    <!-- component.                                    -->
    <!-- identity mappings (begin) -->
    <mapping resource="org/jbpm/identity/User.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
    <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
    <!-- identity mappings (end) -->
    
    <!-- following mapping files have a dependendy on  -->
    <!-- the JCR API                                   -->
    <!-- jcr mappings (begin) ===
    <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
    ==== jcr mappings (end) -->


    <!-- ###################### -->
    <!-- # jbpm mapping files # -->
    <!-- ###################### -->

    <!-- hql queries and type defs -->
    <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
    
    <!-- graph.def mapping files -->
    <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
    <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>

    <!-- graph.node mapping files -->
    <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
    <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>

    <!-- context.def mapping files -->
    <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>

    <!-- taskmgmt.def mapping files -->
    <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>

    <!-- module.def mapping files -->
    <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>

    <!-- bytes mapping files -->
    <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>

    <!-- file.def mapping files -->
    <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>

    <!-- scheduler.def mapping files -->
    <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
    <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>

    <!-- graph.exe mapping files -->
    <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
    <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>

    <!-- module.exe mapping files -->
    <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
        
    <!-- context.exe mapping files -->
    <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
    <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>

    <!-- job mapping files -->
    <mapping resource="org/jbpm/job/Job.hbm.xml"/>
    <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
    <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>

    <!-- taskmgmt.exe mapping files -->
    <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>

    <!-- logging mapping files -->
    <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
    <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
    <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>


加上以上配置后,又出现了如下异常:
23:14:47,394 ERROR ContextLoader:205 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/login' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-actions.xml]: Cannot resolve reference to bean 'userService' while setting bean property 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-service.xml]: Cannot resolve reference to bean 'userDAO' while setting bean property 'userDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-service.xml]: Cannot resolve reference to bean 'userDAO' while setting bean property 'userDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: 
org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
	at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
	at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
	at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
	at org.hibernate.cfg.Configuration.configure(Configuration.java:1367)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:623)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.DuplicateMappingException: duplicate import: User refers to both org.jbpm.identity.User and org.darkness.oa.model.User (try using auto-import="false")
	at org.hibernate.cfg.Mappings.addImport(Mappings.java:141)
	at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:614)
	at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:527)
	at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:271)
	at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
	at org.hibernate.cfg.Configuration.add(Configuration.java:424)
	at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
	at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
	... 80 more
2009-3-24 23:14:47 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/login' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-actions.xml]: Cannot resolve reference to bean 'userService' while setting bean property 'userService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-service.xml]: Cannot resolve reference to bean 'userDAO' while setting bean property 'userDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-service.xml]: Cannot resolve reference to bean 'userDAO' while setting bean property 'userDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-dao.xml]: Cannot resolve reference to bean 'hibernateTemplate' while setting bean property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\java\apache-tomcat-6.0.18\webapps\OA_System_01\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource org/jbpm/identity/User.hbm.xml
	at org.hibernate.cfg.Configuration.addResource(Configuration.java:523)
	at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1511)
	at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
	at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
	at org.hibernate.cfg.Configuration.configure(Configuration.java:1367)
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:623)
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:290)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:516)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.DuplicateMappingException: duplicate import: User refers to both org.jbpm.identity.User and org.darkness.oa.model.User (try using auto-import="false")
	at org.hibernate.cfg.Mappings.addImport(Mappings.java:141)
	at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:614)
	at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:527)
	at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:271)
	at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144)
	at org.hibernate.cfg.Configuration.add(Configuration.java:424)
	at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:465)
	at org.hibernate.cfg.Configuration.addResource(Configuration.java:520)
	... 80 more

说是User类冲突了,原来自己写了一个User类,jbpm也有一个User类,hibernate中有一个自动导入功能,现在出现了两个User类,那么hibernate就不知道到底在什么时候该用那个User了,所以你需要将你自己写的那个User类的自动导入功能取消。解决方法也很简单,
只需在自己写的User.hbm.xml中加上auto-import="false"就可以了:
<hibernate-mapping auto-import="false">
  <class table="T_User" name="org.darkness.oa.model.User">
分享到:
评论
2 楼 depravedangel 2009-10-23  
放在自己写的类的配置后面,
例如:
<property name="hibernate.show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<mapping resource="org/darkness/jbpmtest/Document.hbm.xml"/>

JBPM的配置就接着这个后面
1 楼 liuu 2009-10-23  
我也遇到了楼主的第1个问题
但是我已经有了楼主贴出的配置
所以想请楼主明示配置的具体地方
谢谢了

相关推荐

    八年级英语下册第八单元基础知识--复习.doc

    的大肚猪:a pot-bellied pig named... 10. 用不同的方法:in different ways 11. 来自全中国:from all over China 或 from across China 12. 女子比赛获胜者:the winner of the women's competition 13. 鼓励某人...

    No module named ‘transformers.models.auto.tokenization-auto‘

    在Python编程环境中,我们经常遇到导入模块时遇到错误,如"No module named ‘transformers.models.auto.tokenization-auto‘"。这个错误表明系统无法找到名为`transformers.models.auto.tokenization-auto`的模块,...

    问题解决:ImportError: No module named paddle.v2

    问题描述 在使用paddlepaddle进行深度学习过程中...ModuleNotFoundError: No module named 'paddle.v2' 解决思路 更新到python3之后,这个包里的画图工具改变了,使用python2的可以使用,但实验python3就不行了,缺

    Linux服务器搭建之九:DNS服务器.docx

    其中,`named.conf`文件是主配置文件,它包含了对整个DNS服务的全局设置。而`named.conf.local`则用于配置本地域名的解析。 打开`named.conf.local`文件,例如使用vim编辑器: ```bash sudo vim /etc/bind/named....

    DNS配置文件named.conf详解

    ### DNS配置文件named.conf详解 #### 11.3 安全配置DNS服务器 ##### 11.3.1 DNS服务器配置文件类型 在配置DNS服务器之前,理解相关的配置文件至关重要。以下是几个主要的DNS配置文件及其作用: 1. **`/etc/named...

    关于springboot我出过的那些错误.docx

    错误六:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'convertServiceBean' available 错误原因:没有读取到 bean 特定的对象,没有配置名为 convertServiceBean 的 bean ...

    Code Like a Pythonista: Idiomatic Python.txt

    These are the guiding principles of Python, but are open to interpretation. A sense of humor is required for their proper interpretation.

    Ubuntu-Server-DNS服务器的配置方法.doc

    1 配置环境  一台服务器和若干PC组成的简单局域网。 服务器安装Ubuntu Server,开启DNS服务。 服务器的IP:192.168.1.2  ...  其中named.conf是主配置文件,里面包含了named.conf.options和named.conf.local。

    Linux POI easyExcel解决方案.zip

    解决在Linux系统下,POI、easyExcel 报错 java.lang.IllegalArgumentException: The workbook already contains a sheet named。原因是缺少了字体文件,如果是Docker部署使用本资源即可。内部提供字体资源以及代码...

    Python库 | plone.namedfile-5.0.4-py2.py3-none-any.whl

    **Python库 | plone.namedfile-5.0.4-py2.py3-none-any.whl** 在Python开发中,库是至关重要的组成部分,它们提供了丰富的功能,帮助开发者更高效地编写代码。`plone.namedfile`是一个特定的Python库,主要用于处理...

    dns服务器基本配置

    首先,将`/etc/named.conf`复制到伪根环境中,并在此环境中进行后续的所有配置工作。 ```bash # 复制named.conf到伪根环境 cp /etc/named.conf /var/named/chroot/etc # 进入伪根环境 cd /etc/named/chroot ``` 在`...

    安装 Twisted 解决ImportError No module named zope.interface错误

    安装 Twisted 解决 ImportError No module named zope.interface 错误 在安装 Twisted 的过程中,可能会出现 ImportError No module named zope.interface 错误,这是因为 Twisted 依赖于 zope.interface 模块。...

    CycleScrollView:无限循环图片展示-swift

    使用方法本地图片 var localImages = NSArray(objects: UIImage(named: "1.jpg")!, UIImage(named: "2.jpg")!, UIImage(named: "3.jpg")!, UIImage(named: "4.jpg")!, UIImage(named: "5.jpg")!, UIImage(named: "6....

    Linux下DNS服务器的配置.pdf

    4. `/etc/named.conf`:bind 的主配置文件,比较复杂,需要逐段解释。 /etc/named.conf 配置文件 在 `/etc/named.conf` 文件中,我们需要定义 DNS 服务器的配置信息,例如: * 定义域名:domain ringkee.com * ...

    Linux搭建服务

    在`/var/named/chroot/etc/named.conf`中定义了DNS服务器的基本配置,包括目录路径、视图(view)等。 ```bash [root@ns1 ~]# vim /var/named/chroot/etc/named.conf ``` 其中关键配置包括: - `directory "/var/named...

    水印图片文字简单使用

    let originalImage = UIImage(named: "your_image") let watermarkText = "水印文字" let watermarkLogo = UIImage(named: "your_logo") let textWatermarkedImage = WaterMaskTools.addTextWatermark(to: original...

    linux下提示bash-command not found.docx

    Linux 中解决 "bash: command not found" 问题的方法 在 Linux 系统中,经常会遇到 "bash: command not found" 的错误提示,这是因为系统无法找到相应的命令所致。解决这个问题的关键就在于理解 Linux 系统中的 ...

    PyPI 官网下载 | plone.namedfile-5.4.0-py2.py3-none-any.whl

    资源来自pypi官网。 资源全名:plone.namedfile-5.4.0-py2.py3-none-any.whl

    PyPI 官网下载 | plone.namedfile-5.0.4-py2.py3-none-any.whl

    资源来自pypi官网。 资源全名:plone.namedfile-5.0.4-py2.py3-none-any.whl

Global site tag (gtag.js) - Google Analytics