Switch openejb to version 7 ( groupid org.apache.tomee)

Issue is you used openejb 4 = tomee 1 dependencies

Le 9 août 2016 13:18, "Marcel Ruff" <[email protected]> a écrit :

> Hi,
>
> need to run the openEJB (EJB 3.2 JSR 345) container with hibernate 5.2.1
> (JPA 2.1 JSR 338) in a Java
> SE 8 environment with
>
>  javax.ejb.embeddable.EJBContainer.createEJBContainer();
>
>
> Using openEJB 4.7.4 directly with maven
>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>openejb-core</artifactId>
>   <version>4.7.4</version>
>
> runs fine with a persistence.xml JPA "<b>2.0</b>"
>
>   <persistence version="2.0"
>         xmlns="http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";>
>
> but fails with a persistence.xml JPA "<b>2.1</b>"
>
>   <persistence version="2.1" xmlns="http://xmlns.jcp.org/
> xml/ns/persistence"
>              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
> http://www.oracle.com/webfolder/technetwork/jsc/xml/
> ns/persistence/persistence_2_1.xsd">
>
> with a SAX parser error.
>
> Downloading apache-tomee-7.0.1-plume.tar.gz and adding all
>
>   <i>apache-tomee-plume-7.0.1/lib/*.jar</i>
>
> to CLASSPATH fixes this and I can use JPA 2.1!
>
> 1) Can somebody shed some light on why openEJB natively does not support
> JPA-2.1 but inside TomEE
> does run f fine?
> 2) Is there a maven repository for openEJB jars with JPA-2.1 support to
> avoid too many jars?
>
> thank you
> Marcel
>
>

Reply via email to