Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipse 1.1.2 JPA extensions on Sun Glassfish v2.1.1
icon5.gif  Eclipse 1.1.2 JPA extensions on Sun Glassfish v2.1.1 [message #530048] Wed, 28 April 2010 10:28 Go to next message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Hello

I'm trying to use Eclipse 1.1.2 JPA extensions on Sun Glassfish v2.1.1

I've been following these documentations:
http://wiki.eclipse.org/EclipseLink/Examples/JPA/EclipseLink -ORM.XML
http://wiki.eclipse.org/Integrating_EclipseLink_with_an_Appl ication_Server_(ELUG)#Integrating_EclipseLink_with_Sun_Application_Server
http://wiki.glassfish.java.net/Wiki.jsp?page=FaqEclipseLinkG lassFishV2

But when deploying my EclipseLink persistence units on Glassfish v2.1.1 I have the following problem:

--------------
FAILED TESTS :
--------------

Test Name : tests.persistence.DefaultProviderVerification
Test Assertion : Test validity of EJB 3.0 persistence unit. This test tests validity using a portable persistence provider. Please refer to EJB 3.0 Persistence API Specification for further information.
Test Description : For [ fundDserver#lib/fundD-persistence.jar#FundD ]
Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.EntityManagerSetupExcep tion
Exception Description: predeploy for PersistenceUnit [FundD] failed.
Internal Exception: Exception [TOPLINK-7201] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: An exception occurred parsing the entity-mappings file: file:/C:/Documents%20and%20Settings/conrotte/Local%20Setting s/Temp/exploded20100428111005/fundDserver/lib/fundD-persiste nce.jar!/META-INF/eclipselink-orm.xml.
Internal Exception:
(1. cvc-elt.1: Cannot find the declaration of element 'entity-mappings'.)

This is my setup:

persistence.xml:

<persistence-unit name="myPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider >
<jta-data-source>jdbc/myDS</jta-data-source>
<mapping-file>META-INF/eclipselink-orm.xml</mapping-file>


eclipselink-orm.xml :

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings
xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.1">

<object-type-converter name="booleanToNumber" object-type="java.lang.Boolean"
data-type="java.lang.Short">
<conversion-value object-value="false" data-value="0" />
<conversion-value object-value="true" data-value="1" />
</object-type-converter>

</entity-mappings>

My environment is:
JDK 1.6.0_18
Glassfish v2.1.1 with Toplink-essentials.jar still present in {glassfish}/lib folder
EclipseLink 1.1.2.v20090612-r4475 deployed in {glassfish domain}/lib/ext

I'm really lost on this one.

How could the Glassfish deployment verifier know about EclipseLink extensions schemas ?

Or maybe Eclipse JPA extensions are not available on Glassfish ?

Thank you

Fred

[Updated on: Wed, 28 April 2010 10:54]

Report message to a moderator

Re: Eclipse 1.1.2 JPA extensions on Sun Glassfish v2.1.1 [message #530348 is a reply to message #530048] Thu, 29 April 2010 13:16 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Hello,

Looks like the validation is using TopLink Essentials as the provider, and I am not sure how to get it to use EclipseLink instead. What you can do to avoid the error though is remove the <mapping-file>META-INF/eclipselink-orm.xml</mapping-file> line from your persistence.xml. EclipseLink will still find the file and use it if is named eclipselink-orm.xml and is in the meta-inf directory just like any JPA provider would for an orm.xml file.

Best Regards,
Chris

[Updated on: Thu, 29 April 2010 13:33]

Report message to a moderator

Re: Eclipse 1.1.2 JPA extensions on Sun Glassfish v2.1.1 [message #530378 is a reply to message #530048] Thu, 29 April 2010 14:27 Go to previous message
Frederic Conrotte is currently offline Frederic ConrotteFriend
Messages: 125
Registered: July 2009
Senior Member
Okay, many thanks I'll try that out.
Previous Topic:Persistence.xml problem
Next Topic:NoClassDefFoundError: javax/transaction/Synchronization on Glassfish v2.1.1
Goto Forum:
  


Current Time: Sat Apr 27 01:39:24 GMT 2024

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

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

Back to the top