tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Ruff ...@marcelruff.info>
Subject JPA2.1 usage with openEJB in Java SE environment
Date Tue, 09 Aug 2016 11:17:53 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message