persistence@glassfish.java.net

Re: NullPointerException javaagent WebSphere 6.1

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 27 Oct 2006 09:42:15 -0700

Don,

One more bug that can affect you is this:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=857

The problem with your case is that in Java SE mode the code expects that
it can find all PUs up-front. If you deploy a new application after at
least 1 app with a PU has been already loaded, that new app won't be
processed correctly. Server restart should solve this problem.

thanks,
-marina

DonBrady wrote:
> Definitely it exists because it works ok 98% of the time if I omit the
> javaagent.
>
> But Sahoo suggests that it may not be accessible on the classpath when
> javagent is used.
>
> I will try some experiments with classpaths and report back...
>
> Thanks to both of you!
>
> Don
>
>
> Wonseok Kim-2 wrote:
>
>>Hi, Don
>>Can you check if the persistence unit name provided by
>>createEntityManagerFactory() exists in META-INF/persistence.xml?
>>
>>This occurs if it could not find the persistence unit of the given
>>name(issue 854).
>>https://glassfish.dev.java.net/issues/show_bug.cgi?id=854
>>
>>Thanks
>>-Wonseok
>>
>>On 10/27/06, DonBrady <dbrady_at_pobox.com> wrote:
>>
>>>
>>>I am using toplink-essentials under WebSphere 6.1 (which is based on Java
>>>5)
>>>
>>>If I try to use the the toplink-essentials-agent.jar via the jvm
>>>javaagent
>>>argument that starts WebSphere, I get the following exception:
>>>
>>>java.lang.NullPointerException
>>> at
>>>
>>>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory
>>>(EntityManagerFactoryProvider.java:120)
>>> at
>>>javax.persistence.Persistence.createEntityManagerFactory(Persistence.java
>>>:83)
>>> at
>>>com.ncfbins.services.mship.implementations.FetchHRController.fetchhr(
>>>FetchHRController.java:94)
>>> at
>>>
>>>com.ncfbins.services.mship.implementations.MembershipImplementation.fetchhr
>>>(MembershipImplementation.java:141)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>>>:64)
>>> at
>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>DelegatingMethodAccessorImpl.java:43)
>>> at java.lang.reflect.Method.invoke(Method.java:615)
>>> at
>>>com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMethod
>>>(JavaDispatcher.java:178)
>>> at
>>>com.ibm.ws.webservices.dispatchers.ejb.J2ee14EJBDispatcher.invokeMethod(
>>>J2ee14EJBDispatcher.java:173)
>>> at
>>>
>>>com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOperation
>>>(JavaDispatcher.java:141)
>>> at
>>>
>>>com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequestResponse
>>>(SoapRPCProcessor.java:447)
>>> at
>>>com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMessage(
>>>SoapRPCProcessor.java:412)
>>> at
>>>com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessage(
>>>BasicDispatcher.java:134)
>>> at
>>>com.ibm.ws.webservices.dispatchers.ejb.J2ee14EJBDispatcher.invoke(
>>>J2ee14EJBDispatcher.java:154)
>>> ... 31 more
>>>
>>>I realixe that it is not essential to specify the javaagent.
>>>
>>>However, even when I leave it off, I sometimes get the same exception.
>>>
>>>Any suggestions would be appreciated....
>>>
>>>Thanks,
>>>
>>>Don
>>>--
>>>View this message in context:
>>>http://www.nabble.com/NullPointerException-javaagent-WebSphere-6.1-tf2519877.html#a7028182
>>>Sent from the java.net - glassfish persistence mailing list archive at
>>>Nabble.com.
>>>
>>
>>
>