users@glassfish.java.net

[gf-users] Re: Problems with Lookup of remote EJB from stand-alone Client

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Fri, 29 Aug 2014 17:06:49 -0400

  


> Date: Fri, 29 Aug 2014 22:18:41 +0200
> From: DealeyLama_at_gmx.de
> To: users_at_glassfish.java.net
> Subject: [gf-users] Problems with Lookup of remote EJB from stand-alone Client
>
> Good Evening
>
> Since two days I try to figure out what I'm doing wrong; two days
> without the slightest success...
>
> My Boss already started grinding the Cleaver and I'm beginnig to feel
> nervous when I think about my neck. I need it because it supports my Head.
>
> Anyway...
>
> All I wanted to do is to lookup a remote EJB - It's implementing an
> API-Interface from a another module - using a JNDI-Lookup in a
> stand-alone Client. I've to confess, that I'm completely out of ideas.
>
> Could please somebody look at this mess?
>
> Here's the Stacktrace the client prints:
>
> Exception in thread "main" javax.naming.NamingException: Lookup failed
> for 'java:global/LookupTest/LookupTest-ejb-1.0.0-SNAPSHOT/TestEJB' in
> SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=3700,
> java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory,
> org.omg.CORBA.ORBInitialHost=localhost,
> java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl,
> java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception
> is javax.naming.NamingException: ejb ref resolution error for remote
> business interfacecom.oneandone.qadevacc.lookuptest.api.TestEJBRemote
> [Root exception is java.lang.RuntimeException: Could not invoke
> defineClass!]]
 
MG>Alex
MG>this means corba was unable to resolve 'java:global/LookupTest/LookupTest-ejb-1.0.0-SNAPSHOT/TestEJB'
MG>Your best bet is to download a CORBA Test tool and use that for local corba lookup tests and remote corba MG>lookup tests
MG>http://sourceforge.net/projects/corbatester/

MG>BTW If your boss thinks someone will think faster by swinging a meat cleaver in front of them
MG>inform him a change in careers to butcher is in order
MG>Interesting "Think Faster" article located at:
MG>http://www.smithsonianmag.com/science-nature/does-thinking-fast-mean-youre-thinking-smarter-180950180/?no-ist
>
> at
> com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
> at
> com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
> at javax.naming.InitialContext.lookup(InitialContext.java:411)
> at
> com.oneandone.qadevacc.lookuptest.client.LookupTestClient.lookup(LookupTestClient.java:63)
> at
> com.oneandone.qadevacc.lookuptest.client.LookupTestClient.main(LookupTestClient.java:26)
> Caused by: javax.naming.NamingException: ejb ref resolution error for
> remote business interface org.alex.testRemote [Root exception is
> java.lang.RuntimeException: Could not invoke defineClass!]
> at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:433)
> at
> com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:75)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
> at
> com.sun.enterprise.naming.impl.SerialContext.getObjectInstance(SerialContext.java:527)
> at
> com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:487)
> ... 4 more
> Caused by: java.lang.RuntimeException: Could not invoke defineClass!
> at
> org.glassfish.pfl.dynamic.codegen.impl.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:
> at
> org.glassfish.pfl.dynamic.codegen.spi.Wrapper._generate(Wrapper.java:1102)
> at
> org.glassfish.pfl.dynamic.codegen.spi.Wrapper._generate(Wrapper.java:1086)
> at com.sun.ejb.EJBUtils.generateAndLoad(EJBUtils.java:593)
> at
> com.sun.ejb.EJBUtils.loadGeneratedRemoteBusinessClasses(EJBUtils.java:507)
> at
> com.sun.ejb.EJBUtils.loadGeneratedRemoteBusinessClasses(EJBUtils.java:465)
> at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:413)
> ... 8 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.glassfish.pfl.dynamic.codegen.impl.CodeGeneratorUtil.makeClass(CodeGeneratorUtil.java:99)
> ... 14 more
> Caused by: java.lang.NoClassDefFoundError:
> com/sun/ejb/containers/RemoteBusinessObject
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> ... 19 more
> Caused by: java.lang.ClassNotFoundException:
> com.sun.ejb.containers.RemoteBusinessObject
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> ... 21 more
>
>
> It would be great if somebody comes up with an idea...
>
>
> Thank you very much
>
>
>
> Best regards
>
> Alex
>