NullPointerException:无法为org.jbpm.persistence.jpa持久性单元创建容器实体管理器工厂 [英] NullPointerException: Unable to create the container entity manager factory for the org.jbpm.persistence.jpa persistence unit

查看:367
本文介绍了NullPointerException:无法为org.jbpm.persistence.jpa持久性单元创建容器实体管理器工厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我附加了persistence.xml和ormTasks.xml的前几行

I'm attaching the top few lines of my persistence.xml and ormTasks.xml

Persistence.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="cms" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>jdbc/MarkaDS</jta-data-source>
        <non-jta-data-source>jdbc/TestServiceDS</non-jta-data-source>
        <mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
        <mapping-file>META-INF/ormTasks.xml</mapping-file>

OrmTasks.xml

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">

日志

 [7/17/13 11:34:46:720 EDT] 00000046 SystemOut     O 4127 17/07 11:34:46,719[server.startup : 2] ERROR util.xml.ErrorLogger.parsingXmlError  - HHH00196:Error parsing XML (5) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'.
    [7/17/13 11:34:46:738 EDT] 00000046 SystemOut     O 4146 17/07 11:34:46,738[server.startup : 2] ERROR util.xml.ErrorLogger.parsingXmlError  - HHH00196:Error parsing XML (5) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'.
    [7/17/13 11:34:46:981 EDT] 00000046 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_24ab539c_13.07.17_11.34.46.8495384170661565376218.txt com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory 773
    [7/17/13 11:34:46:982 EDT] 00000046 JPAPUnitInfo  E   CWWJP0015E: An error occurred in the org.hibernate.ejb.HibernatePersistence persistence provider when it attempted to create the container entity manager factory for the org.jbpm.persistence.jpa persistence unit. The following error occurred: java.lang.NullPointerException
        at org.hibernate.engine.jdbc.internal.TypeInfoExtracter.extractTypeInfo(TypeInfoExtracter.java:85)
        at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:140)
        at org.hibernate.service.internal.BasicServiceRegistryImpl.configureService(BasicServiceRegistryImpl.java:80)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:145)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:118)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:70)
        at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2253)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2249)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1720)
        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:76)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:884)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
        at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1568)
        at com.ibm.ws.jpa.management.JPAPUnitInfo.createEntityManagerFactory(JPAPUnitInfo.java:1393)
        at com.ibm.ws.jpa.management.JPAPxmlInfo.extractPersistenceUnits(JPAPxmlInfo.java:246)
        at com.ibm.ws.jpa.management.JPAScopeInfo.processPersistenceUnit(JPAScopeInfo.java:119)
        at com.ibm.ws.jpa.management.JPAApplInfo.processModulePUs(JPAApplInfo.java:167)
        at com.ibm.ws.jpa.management.AbstractJPAComponent.startingModule(AbstractJPAComponent.java:435)
        at com.ibm.ws.jpa.management.JPAComponentImpl.startingDeployedModule(JPAComponentImpl.java:729)
        at com.ibm.ws.jpa.management.JPAComponentImpl.adjust(JPAComponentImpl.java:549)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.adjust(ApplicationMgrImpl.java:1067)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectAdjust(DeployedApplicationImpl.java:1394)
        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:627)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:772)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2175)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
        at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:496)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815)


推荐答案

我可以通过将 hibernate.temp.use_jdbc_metadata_defaults 设置为false来解决此错误。我不知道你发表在哪里你会设置它的摘录。对我来说,这是持久化单元的Spring配置。

I was able to fix this error by setting hibernate.temp.use_jdbc_metadata_defaults to false. I'm not sure from the excerpts you posted where you would set it. For me it was the Spring config of the persistence unit.

这篇关于NullPointerException:无法为org.jbpm.persistence.jpa持久性单元创建容器实体管理器工厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆