在WebSphereApplicationServer上部署时,OpenJPA不会创建DB2表

在WebSphereApplicationServer上部署时,OpenJPA不会创建DB2表,db2,websphere,openjpa,Db2,Websphere,Openjpa,我在WebSphereApplicationServerV7.0上部署了ear文件并启动了应用程序。但是,它不会自动创建数据库DB2的表,并且没有任何错误消息 请查看我的persistence.xml文件 <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java

我在WebSphereApplicationServerV7.0上部署了ear文件并启动了应用程序。但是,它不会自动创建数据库DB2的表,并且没有任何错误消息

请查看我的persistence.xml文件

<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="xcrm_ejb" >
<jta-data-source>jdbc/xcrm</jta-data-source>
<non-jta-data-source>jdbc/non_xcrm</non-jta-data-source>
<mapping-file>META-INF/orm.xml</mapping-file>
<class>ch.xpertline.xcrm.entity.base.BaseEntity</class>
<class>ch.xpertline.xcrm.entity.Address</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="openjpa.Log" value="DefaultLevel=INFO,SQL=TRACE,File=./dist/jpaEnhancerLog.log,Runtime=INFO,Tool=INFO"/>
<property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"/>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
</properties>
</persistence-unit>
</persistence>

jdbc/xcrm
jdbc/non_xcrm
META-INF/orm.xml
ch.xpertline.xcrm.entity.base.BaseEntity
ch.xpertline.xcrm.entity.Address
符合事实的
我的orm.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_1_0.xsd">
<persistence-unit-metadata>
<persistence-unit-defaults>
<schema>soreco</schema>
</persistence-unit-defaults>
</persistence-unit-metadata>
</entity-mappings>

索雷科

谢谢

尝试发送申请请求。我认为在创建第一个EntityManager之前不会触发同步映射