tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Applicationcomposer and Eclipselink
Date Tue, 20 May 2014 09:59:18 GMT
Hi

linked to https://issues.apache.org/jira/browse/TOMEE-1217

BTW if you run your test with surefire and not failsafe it will work then




Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-05-20 11:32 GMT+02:00 hwaastad <helge@waastad.org>:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message