Wouhou i got the problem you were right it's about the database.
I was comparing the log between java app and web app.

I got this in the java app : INFO: Creating Resource(id=testDatabase)

but I don't get that for the web app.

Persistence.xml (under src/META-INF)

<persistence-unit name="jpaPOC">
                <jta-data-source>testDatabase</jta-data-source>
                <class>com.dassault_systemes.entity.Address</class>
                <class>com.dassault_systemes.entity.Customer</class>
                
                <properties>
                    <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)"/>
                    <property name="openejb.jmx.active" value="true"/>
            </properties>
        </persistence-unit>

-------------------

web.xml

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID"
version="3.0">
  <display-name>webJpaPoc</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>


I am missing something there ?





--
View this message in context: 
http://openejb.979440.n4.nabble.com/Adapt-ejb-run-on-java-app-to-web-app-tp4658420p4658441.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to