If this is still the issue, here is my config (Tomcat 6.0.13, Axis 1.3,
OpenJPA 1.2.0), very similar to what Jeremy posted earlier. The only
difference I see is <provider> tag in persistence.xml.
--- context.xml ---
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context docBase="axis2" debug="5" reloadable="true" allowLinking="true">
<Resource name="jdbc/dbserver" auth="Container"
type="javax.sql.DataSource"
maxActive="7"
maxIdle="3"
maxWait="10000"
testWhileIdle="true"
timeBetweenEvictionRunsMillis="10000"
minEvictableIdleTimeMillis="60000"
username="un" password="pw"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://db.company.com/dbname"/>
</Context>
---------------
--- persistence.xml ---
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="testPu">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>java:comp/env/jdbc/dbserver</jta-data-source>
<class>com.company.Entity1</class>
<!-- ... -->
</persistence-unit>
</persistence>
---------------
-Ognjen
Håkon Sagehaug wrote:
Thanks so much for the help, now it works for the serlvet, so just trying to
get it to work for the web service also and I'll be a happy guy