Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Help with static weaving on OC4J seeing ._toplink_setmyColumn

So, debuggint the agressive oc4j class loader, here's what I've found.
During start up the classloader closes. Then when I try to load up the
app, apparantly it can't create the EntityManager because the
classloader has already been destroyed. I don't understand why though,
here's the trace from the classloader:

10/07/02 16:07:49 ClassLoader closing: MyApp.web.MyApp:0.0.1 (ID #1ea817f)
    at oracle.classloader.util.ClassLoadTracing$LoaderListener.loaderClosing(ClassLoadTracing.java:821)
    at oracle.classloader.EventDispatcher.loaderClosing(EventDispatcher.java:238)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1109)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1069)
    at com.evermind.server.ejb.persistence.PersistenceUnitInfoImpl.destroy(PersistenceUnitInfoImpl.java:128)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:172)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:87)
    at com.evermind.server.http.HttpApplication.createDefaultPersistenceUnitManager(HttpApplication.java:875)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:844)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:701)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:308)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:280)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:180)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2541)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1058)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:595)

10/07/02 16:07:49 ClassLoader destroyed: MyApp.web.MyApp:0.0.1 (ID #1ea817f)
    at oracle.classloader.util.ClassLoadTracing$LoaderListener.loaderDestroyed(ClassLoadTracing.java:833)
    at oracle.classloader.EventDispatcher.loaderDestroyed(EventDispatcher.java:254)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1187)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1069)
    at com.evermind.server.ejb.persistence.PersistenceUnitInfoImpl.destroy(PersistenceUnitInfoImpl.java:128)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:172)
    at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initialize(PersistenceUnitManagerImpl.java:87)
    at com.evermind.server.http.HttpApplication.createDefaultPersistenceUnitManager(HttpApplication.java:875)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:844)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:701)
    at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:308)
    at com.evermind.server.http.HttpServer.setSites(HttpServer.java:280)
    at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:180)
    at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2541)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1058)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:595)
./tch



On Fri, Jul 2, 2010 at 3:33 PM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
> Thanks for your help Chris.
>
> So I'm trying to use Eclipselink as my provider and have been banging
> my head against the wall all day. I can't for the life of me get OC4J
> to deploy my app if I specifically tell it that EclipseLink is the
> persistence provider.
>
> It will fail with ClassLoader issues, I followed the wiki and set up
> the shared lib both ways, once with it's own, then overriding the
> oracle.persistence system library.
>
> Here's the error I get when oc4j tries to deploy the PU.
>
> Depoloyment of PersistenceUnit [myModel] failed.
>
> Internal Exception: java.lang.IllegalStateException: ClassLoader
> "myapp.web:0.0.1" (from (web-module) in ...path): This loader has been
> closed and should not be in use.
>
>
>
>
> ./tch
>
>
>
> On Fri, Jul 2, 2010 at 3:25 PM, Christopher Delahunt
> <christopher.delahunt@xxxxxxxxxx> wrote:
>> I'm not sure your options are correct.
>> The problem you are encountering is that you have specified that the jar
>> uses static weaving, but it has not been statically woven for TopLink
>> Essentials.  So the options are:
>> 1) Use EclipseLink, but you will need to add the EclipseLink.jar as a shared
>> library or add it to the Ear, and change the persistence.xml so that it
>> references it as the provider via the
>>   <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> tag.
>> With this, you can then use dynamic weaving or static weaving (be sure your
>> jar is statically woven though)
>> 2) Use TopLink Essentials.  Either change the persistence.xml so that it
>> uses dynamic weaving, or statically weave your jar.
>>
>> There is a demo showing EclipseLink being used in OC4J at:
>> http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial
>>
>> Best Regards,
>> Chris
>>
>> On 02/07/2010 2:08 PM, Tim Hollosy wrote:
>>
>> Ah, I think that's the issue. I was never actually _using_ static
>> weaving in the past. So when I was deploying since I had
>> eclipselink.jar in my WEB-INF/lib directory. Eclipselink was still
>> used, but now that eclipselink needs to use the weaved classes that
>> must happen at some deeper level.  So OC4J is trying to use toplink
>> essentials instead.
>>
>> So my options are:
>> -Don't weave (bad because all this eager fetching will kill me).
>> -Replace toplink with eclipselink on the server (bad because i have to
>> convince sysadmins to change something!)
>>
>>
>> ./tch
>>
>>
>>
>> On Fri, Jul 2, 2010 at 1:18 PM, Christopher Delahunt
>> <christopher.delahunt@xxxxxxxxxx> wrote:
>>
>>
>> Hello,
>>
>> If it is looking for a _toplink_methodName, then it is using TopLink
>> Essentials as the persistence provider rather than EclipseLink.  Have you
>> specified the provider name in your persistence.xml or are you relying on
>> the default?
>> TopLink Essentials was the default JPA provider in 10g OC4J releases.
>> Best Regards,
>> Chris
>>
>> On 02/07/2010 12:48 PM, Tim Hollosy wrote:
>>
>>
>> I have some statically weaved classes that are having issues when
>> deployed to my OC4J server. It's working fine in Jetty.
>>
>> I'm seeing errors like: java.lang.NoSuchMethoderror:
>> com.my.entity.Entity._toplink_setmyColumn
>>
>> The only thing I've changed was using lazy fetching, I could use some
>> help from the oracle guys debugging. My first thought is that I have a
>> bad library on the system and it's trying to use some toplink stuff
>> instead of the correct eclipselink.jar in my WEB-INF/lib. I'm using
>> OC4J 10.1.3.3 and Eclipselink 2.
>>
>> I have the eclipselink.weaving property set to static.
>>
>> Any direction on how to debug this would be helpful.
>>
>> Thanks
>>
>> ./tch
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>>
>>
>


Back to the top