NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Giving up on Hibernate (for now), trying EclipseLink...

Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message

Joined: 27 Dec 2010
Posts: 18

PostPosted: Mon Jan 10, 2011 8:25 pm    Post subject: Giving up on Hibernate (for now), trying EclipseLink... Reply with quote

Still no joy...

I get the following error:

WARNING [org.netbeans.ProxyClassLoader]: Will not load class javax.persistence.Persistence arbitrarily from one of ModuleCL@1f488f1[org.netbeans.modules.hibernatelib] and ModuleCL@5db5ae[org.ksh.eclipselink] starting from ModuleCL@6cef4[org.ksh.kslogbase]; see

Now, all I've done is follow the tutorial (mentioned elsewhere) using my own DB, and put the code, verbatim, into my TopComponent (well, except for changing the table names, and the persistence unit name to my versions of them) ...

First, I don't understand why it's trying to load anything from hibernatelib, and secondly, I actually did the program in the tutorial and could get it to work ... with the sample db, but not with mine! ARGH!

Just in case it matters, my persistence.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  <persistence-unit name="KSLogDataLayerPU" transaction-type="RESOURCE_LOCAL">
      <property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/kslog"/>
      <property name="javax.persistence.jdbc.password" value="*****"/>
      <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
      <property name="javax.persistence.jdbc.user" value="kslog"/>

I make all the wrappers, like the tutorial says and create all the dependencies. Can you say, "Frustration"? Surprised
Back to top

Joined: 17 Jan 2011
Posts: 2
Location: Ottawa

PostPosted: Mon Jan 17, 2011 5:55 pm    Post subject: JPA 2.0 using EclipseLink as the Persistence Provider Reply with quote

Try the following tutorial for WebLogic or almost any other server.

The latest release of Oracle WebLogic Server has been available on OTN at the following location since 20110115.

This release provides support for JSR-317 JPA 2.0 container managed applications using the QWG8 patch or a manual prepending classpath change.

In you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround as well as the persistence.xml renaming one is now fully deprecated and not required in for both application and container managed persistence contexts.
As of 20110115 the 5 outstanding issues below look to be fixed by applying the patch for QWG8 or manually prepending to the WebLogic server classpath.

>A JPA 2.0 EE application using EclipseLink as the JPA2 persistence provider on WebLogic is detailed in the analysis section below
1) JPA 2.0 XSD parsing - verified
2) New JPA 2.0 schema elements like <shared-cache-mode>NONE</shared-cache-mode> - verified
3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Stateless session bean - verified
4) JPA 2.0 weaving/instrumentation - this will require a more detailed lazy model and more debugging to fully verify
5) Dependency Injection of a container managed JPA 2.0 entityManager on a EJB component like a stateless session bean - verified

>OTN download
>Supported Oracle WebLogic Server Versions
>TopLink JPA 2.0 Specific documentation/patching
>EclipseLink Wiki: JPA 2.0 using EclipseLink on WebLogic analysis (XSD, Weaving, DI of @PersistenceContext)

thank you
/Michael O'Brien
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo