2011-07-13 9 views
1

Websphere Application Server V7.0にearファイルをデプロイしてアプリケーションを起動しました。ただし、データベースDB2にテーブルを自動作成するのではなく、エラーメッセージは表示されません。Websphere Application ServerにデプロイするときOpenJPAはDB2テーブルを作成しません

私persitence.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> 

マイ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> 

おかげ

答えて

0

をアプリケーション要求に送信してみてください。最初のEntityManagerが作成されるまで、マッピングの同期化が開始されるとは思いません。

関連する問題