tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwaastad <he...@waastad.org>
Subject Applicationcomposer and Eclipselink
Date Tue, 20 May 2014 09:32:12 GMT
Hi,
got a small issue which I'm trying to figure out.

I have a collapsed war project which has an ejb module with
entities,sessionbeans etc.

Im running IT tests from the war project (Rest services) and using
Applicationcomposer.

Persistencecontext is configured like this:

@Module
    public Persistence persistence() {
        return ContainerConfiguration.getPersistence();
    }

and:
public static Persistence getPersistence() {
        final PersistenceUnit unit = new PersistenceUnit("DEFAULT_PU");
        unit.setProvider(PersistenceProvider.class);
        unit.setJtaDataSource("DEFAULTDS");
        unit.setNonJtaDataSource("DEFAULTDSUnmanaged");
        unit.setProperty("DEFAULTDS.UserName", "SA");
        unit.setProperty("DEFAULTDS.Password", "");
       
unit.setProperty("javax.persistence.schema-generation.database.action",
"drop-and-create");
        unit.setProperty("eclipselink.logging.level", "FINE");
        unit.getClazz().addAll(Arrays.asList(User.class.getName(),
Group.class.getName()));
        final Persistence persistence = new Persistence(unit);
        persistence.setVersion("2.0");
        return persistence;
    }

it fails complaining about:
org.eclipse.persistence.exceptions.EntityManagerSetupException
Ejb-jar/1.0-SNAPSHOT/Ejb-jar-1.0-SNAPSHOT.jar!/META-INF/persistence.xml (no
such file or directory)

This file do exists in the jar file.

removing provider (which i guess use openjpa) its ok

Any hints for me to try out?

using persistenceprovider and testing the file individually it also works
fine (mvn -Dtest=org.waastad.web.war.service.ServicesResourceIT
surefire:test)

example code:

https://github.com/hwaastad/AppComposerTest.git

Thanks,
br hw



--
View this message in context: http://openejb.979440.n4.nabble.com/Applicationcomposer-and-Eclipselink-tp4669447.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message