geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Collins <Collins-Soluti...@austin.rr.com>
Subject Re: JNDI Lookup
Date Sun, 18 Nov 2012 01:21:55 GMT
Is there anybody out there that can point me in the right direction?

On 11/16/2012 07:26 AM, Russell Collins wrote:
> I am having problems looking up an ejb remotely.  In Geronimo 2.x, 
> this worked perfectly.  Now I am having issues.  First, when I deploy 
> the ear, this is the JNDI entries that are created.
>
>
> 7556:  2012-11-14 22:11:33,271 INFO [startup] Assembling app: 
> /home/opt/Geronimo3.0/bin/com.cs/base-business/1.0/car
> 7557:  2012-11-14 22:11:33,278 INFO [startup] 
> Jndi(name=CompositionLocal) --> 
> Ejb(deployment-id=cs-base-business.jar/Composition)
> 7558:  2012-11-14 22:11:33,279 INFO [startup] 
> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/Composition!com.cs.base.interfaces.ICompositionLocal)

> --> Ejb(deployment-id=cs-base-business.jar/Composition)
> 7559:  2012-11-14 22:11:33,279 INFO [startup] 
> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/Composition) --> 
> Ejb(deployment-id=cs-base-business.jar/Composition)
> 7560:  2012-11-14 22:11:33,279 INFO [startup] 
> Jndi(name=EmailManagerRemote) --> 
> Ejb(deployment-id=cs-base-business.jar/EmailManager)
> 7561:  2012-11-14 22:11:33,279 INFO [startup] 
> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager!com.cs.base.remote.interfaces.IEmailManagerRemote)

> --> Ejb(deployment-id=cs-base-business.jar/EmailManager)
> 7562:  2012-11-14 22:11:33,279 INFO [startup] 
> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager) 
> --> Ejb(deployment-id=cs-base-business.jar/EmailManager)
>
>
>
> I try to use this code to access the ejb's.
>
> InitialContext context;
> // Configure Initial context
>         try {
>             this.m_emailManager = 
> (IEmailManagerRemote)context.lookup("EmailManagerRemote");
> // Other statements
>
> I get this error upon lookup:
>
> java.lang.ClassFormatError: javax/ejb/EJBException : Missing Code 
> attribute
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>     at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>     at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>     at 
> org.apache.openejb.client.JNDIContext.createBusinessObject(JNDIContext.java:202)
>     at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:244)
>     at javax.naming.InitialContext.lookup(InitialContext.java:392)
>     at com.acc.base.ejb.Emailer.sendContactUs(Emailer.java:68)
>     at 
> com.acc.base.ejb.EmailerTest.emailerSuccessTest(EmailerTest.java:30)
>     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 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>     at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>     at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>     at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
>     at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>     at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>     at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>     at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>     at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>     at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>
>
> please tell me what I am doing wrong because this technique worked in 
> previous versions of Geronimo.
> -- 
>
> Russell Collins
> Collins-Solutions@austin.rr.com


-- 

Russell Collins
Collins-Solutions@austin.rr.com


Mime
View raw message