users@glassfish.java.net

Re: Java Web Start Client with -javaagent option

From: <glassfish_at_javadesktop.org>
Date: Fri, 12 Feb 2010 01:38:42 PST

Yes I know, I have looked into appclient specification and I have tried more combinations, but with no effect... I can run the client but it throws the same toplink ex (it's appended).

As I wrote, the client can be runned from the whole enterprise project or only client project. Running from the enterprise project means, I launch subcomponent of the enterprise app. URL: localhost:8080/EnterpriseApp/Client. This thorws the toplink ex , but everthing other works good.

When I run it from client project, the client is deployed as an application client module (before doing this there was no app client module, only enterprise app) URL: localhost:8080/Client. Running the client directly with this URL from browser thorws exception as if it cannot find the ejb jar (cassnotfound ex on my sesion bean) - the same one, which was thrown by my attempt to launch the Client.jar or ClientClient.jar. I don't know how netbeans runs this client without this exception...

I think the toplink exception has somethink with the javaagent, because I get the same exception, when I remove the -javaagent option from client project.

Hopeful are this infos helpful.

The exception from toplink by save (call em.merge(entity) in sessionbean) is:

EJB5018: An exception was thrown during an ejb invocation on [SessionBean]
javax.ejb.EJBException
        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3903)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3803)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3605)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1388)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1325)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
        at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
        at $Proxy99.save(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: Exception [TOPLINK-99] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The method [_toplink_getentity_vh] on the object [org.database.OtherEntity] triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Mapping: oracle.toplink.essentials.mappings.OneToOneMapping[entity]
Descriptor: RelationalDescriptor(org.database.OtherEntity --> [DatabaseTable(OtherEntity)])
        at oracle.toplink.essentials.exceptions.DescriptorException.targetInvocationWhileGettingValueThruMethodAccessor(DescriptorException.java:1598)
        at oracle.toplink.essentials.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:98)
        at oracle.toplink.essentials.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:372)
        at oracle.toplink.essentials.mappings.ForeignReferenceMapping.getAttributeValueFromObject(ForeignReferenceMapping.java:322)
        at oracle.toplink.essentials.mappings.ForeignReferenceMapping.isAttributeValueInstantiated(ForeignReferenceMapping.java:518)
        at oracle.toplink.essentials.mappings.ObjectReferenceMapping.mergeIntoObject(ObjectReferenceMapping.java:358)
        at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.mergeIntoObject(ObjectBuilder.java:2152)
        at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(MergeManager.java:442)
        at oracle.toplink.essentials.internal.sessions.MergeManager.mergeChanges(MergeManager.java:264)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.mergeCloneWithReferences(UnitOfWorkImpl.java:2734)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.mergeCloneWithReferences(RepeatableWriteUnitOfWork.java:311)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.mergeInternal(EntityManagerImpl.java:251)
        at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.merge(EntityManagerImpl.java:128)
        at com.sun.enterprise.util.EntityManagerWrapper.merge(EntityManagerWrapper.java:476)
        at org.sesessionbean.SessionBean.save(SessionBean.java:561)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
        ... 17 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.invokeMethod(PrivilegedAccessHelper.java:322)
        at oracle.toplink.essentials.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:91)
        ... 39 more
Caused by: java.lang.NullPointerException
        at org.database.OtherEntity._toplink_getentity_vh(OtherEntity.java)
        ... 44 more
[Message sent by forum member 'anaq' (anaque_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=386340