Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » java 10 with jpa eclipselink and tomcat 9(persistence.xml is not loaded)
java 10 with jpa eclipselink and tomcat 9 [message #1784911] Thu, 05 April 2018 15:28 Go to next message
Riccardo Cohen is currently offline Riccardo CohenFriend
Messages: 2
Registered: April 2018
Junior Member
Hello
I'm using Tomcat 9.0.6 with java 1.8 and EclipseLink org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.1

This works fine !

I try to migrate to java 10 without changing anything else :
JAVA_VERSION="10"
JAVA_VERSION_DATE="2018-03-20"
downloaded into my mac from https : / / download.java.net/java/GA/jdk10/10/binaries/openjdk-10_osx-x64_bin.tar.gz

I had to add 2 libraries in maven depandencies :
javax.activation:activation:1.1.1
javax.xml.bind:jaxb-api:2.3.0

The server succeded to launch. But at launch time I have the info :

[EL Warning]: metamodel: 2018-03-28 13:55:44.159--The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units. Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element

With java 10, the persistence.xml seems to be ignored. This is the content of the file :

<persistence 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"
version="2.0">
<persistence-unit name="maindb" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>Data.E5User</class>
<class>Data.E5Witem</class>
<properties>
<property name="javax.persistence.nonJtaDataSource" value="java:comp/env/jdbc/wfdb"/>
<!--http : / / www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm-->
<property name="eclipselink.logging.level" value="INFO"/>
</properties>
</persistence-unit>
</persistence>

I tried googling but found very few information about java 9 or 10 for eclipselink.
I asked twice on the Tomcat mailing list but had no answer.
Adding javax.persistence library did not help.
Maybe this is related to new "module" organization of java 9 ? But I wouldn't know how to fix this.

Thanks for your help
Re: java 10 with jpa eclipselink and tomcat 9 [message #1785002 is a reply to message #1784911] Fri, 06 April 2018 19:26 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 36
Registered: November 2013
Location: Prague, Czech Republic
Member
I believe this has been fixed yesterday through https://bugs.eclipse.org/bugs/show_bug.cgi?id=532882

thanks,
--lukas
Re: java 10 with jpa eclipselink and tomcat 9 [message #1785197 is a reply to message #1785002] Tue, 10 April 2018 15:40 Go to previous message
Riccardo Cohen is currently offline Riccardo CohenFriend
Messages: 2
Registered: April 2018
Junior Member
Yes, it works with the 2.7.2-snapshot !
Thanks a lot
Previous Topic:No conversion value provided for the attribute [CO]
Next Topic:REST Path("/") conflicts with app
Goto Forum:
  


Current Time: Tue Mar 19 02:56:13 GMT 2024

Powered by FUDForum. Page generated in 0.02227 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top