Thomas, Can you check or post your persistence.xml? Maybe you configured your ExampleJPA persistence unit to use JTA transactions instead of entity manager (RESOURCE_LOCAL) transactions.
Greetings, Milosz > I am not running this from an IDE. Command line using ant for > compiles and enhancement but not to run the main doing that by hand > > Thanks for looking at my issue > Thomas > > Sent from my iPhone > > On Jan 19, 2010, at 5:20, Jean-Baptiste BRIAUD -- Novlog > <j-b.bri...@novlog.com > > wrote: > > > Maybe a classpath issue in the IDE project's config ? > > > > On Jan 18, 2010, at 02:15 , Thomas Polliard wrote: > > > >> Doing an example trying to learn OpenJPA and JPA I ran into a > >> strange problem. > >> > >> java.lang.ClassNotFoundException: > >> com.arjuna.jta.JTA_TransactionManager > >> java.lang.ClassNotFoundException: > >> com.bluestone.jta.SaTransactionManagerFactory > >> java.lang.ClassNotFoundException: org.openejb.OpenEJB > >> java.lang.ClassNotFoundException: > >> com.sun.jts.jta.TransactionManagerImpl > >> java.lang.ClassNotFoundException: > >> com.inprise.visitransact.jta.TransactionManagerImpl > >> > >> > >> I am not using "Any of these yet for some reason, I am getting this > >> error" > >> > >> The problem is Only when I run the main program: > >> > >> Main.java > >> package com.trukoda.examples.jpa; > >> > >> import javax.persistence.EntityManager; > >> import javax.persistence.EntityManagerFactory; > >> import javax.persistence.Persistence; > >> > >> public class Main { > >> public static void main(String[] args) { > >> EntityManagerFactory factory = > >> Persistence.createEntityManagerFactory("ExampleJPA"); > >> Account user1 = new Account("polliard"); > >> Account user2 = new Account("mcclung"); > >> > >> Host host1 = new Host("uranium"); > >> Host host2 = new Host("thorium"); > >> > >> EntityManager em = factory.createEntityManager(); > >> > >> em.getTransaction().begin(); > >> em.persist(host1); > >> em.persist(host2); > >> em.getTransaction().commit(); > >> } > >> } > >> > >> Any idea why this this would causes classes I am not referencing > >> from being loaded. > >> > >> I am including the following in my classpath: > >> > >> .:/Users/polliard/Library/Java/Derby/10.5.3.0/derby.jar:/Users/ > >> polliard/Library/Java/Openjpa/2.0-M3/openjpa-all-2.0.0-M3.jar > >> > >> The two accounts (Account and Host) are basic Entities and the > >> database gets created without issue using the mappingtool. > >> > >> Thanks for any assistance, > >> > >> Thomas > > >