Skip to main content

EJB JNDI Lookup

7 replies [Last post]
vyche1
Offline
Joined: 2007-12-10

I am running into a problem where the root cause of the exception is:

Caused by: java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated
at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:129)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:104)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:683)
at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:72)
... 58 more

Can someone point me to the location that I can download the JAR I need for this class? I have Glassfish v2 (SJSAS 9) installed along with NetBeans 6. Please reply ASAP as this is due tomorrow night!!!

Message was edited by: vyche1

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anupam1708
Offline
Joined: 2008-12-04

Hi

I am getting similar errors.

Could you please post what was the exact resolution. Its quite urgent.

Many Thanks,
Anu

vyche1
Offline
Joined: 2007-12-10

I guess here's a more defined explanation of the problem (btw, my deadline got moved to Monday so I still have a bit of time...)

I have a stateless EJB with remote and local intefaces. I can see the EJB in my JNDI but everytime I try to lookup, I get:

"IOP01211405: (BAD_OPERATION) Exception in loadStub"
org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 1405 completed: No
at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:179)
at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:197)
at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:856)
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:248)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:343)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:51)
at edu.sjsu.supportnet.CommunitiesResource.getCommunities(CommunitiesResource.java:68)
at edu.sjsu.supportnet.CommunitiesResource.getCommunitiesAsJsonArray(CommunitiesResource.java:113)
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.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:110)
at com.sun.ws.rest.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:65)
at com.sun.ws.rest.impl.model.method.ResourceMethodMapDispatcher.dispatch(ResourceMethodMapDispatcher.java:93)
at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
at com.sun.ws.rest.impl.application.WebApplicationContext.dispatchTo(WebApplicationContext.java:105)
at com.sun.ws.rest.impl.model.ClassDispatcher.dispatch(ClassDispatcher.java:43)
at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
at com.sun.ws.rest.impl.model.RootResourceClass.dispatch(RootResourceClass.java:118)
at com.sun.ws.rest.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:175)
at com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 235 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.classNotFound3(ORBUtilSystemException.java:787)
at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:74)
at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:849)
... 57 more
Caused by: java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated
at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:129)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:104)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:683)
at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:72)
... 58 more
StandardWrapperValve[ServletAdaptor]: PWC1406: Servlet.service() for servlet ServletAdaptor threw exception
java.lang.RuntimeException: javax.naming.NamingException: ejb ref resolution error for remote business interfaceedu.sjsu.ejb.SupportNetRemote [Root exception is java.lang.NullPointerException]
at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:60)
at edu.sjsu.supportnet.CommunitiesResource.getCommunities(CommunitiesResource.java:68)
at edu.sjsu.supportnet.CommunitiesResource.getCommunitiesAsJsonArray(CommunitiesResource.java:113)
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.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:110)
at com.sun.ws.rest.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:65)
at com.sun.ws.rest.impl.model.method.ResourceMethodMapDispatcher.dispatch(ResourceMethodMapDispatcher.java:93)
at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
at com.sun.ws.rest.impl.application.WebApplicationContext.dispatchTo(WebApplicationContext.java:105)
at com.sun.ws.rest.impl.model.ClassDispatcher.dispatch(ClassDispatcher.java:43)
at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
at com.sun.ws.rest.impl.model.RootResourceClass.dispatch(RootResourceClass.java:118)
at com.sun.ws.rest.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:175)
at com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfaceedu.sjsu.ejb.SupportNetRemote [Root exception is java.lang.NullPointerException]
at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:367)
at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:51)
... 49 more
Caused by: java.lang.NullPointerException
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.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:359)
... 54 more

The server prints out the following lines as part of my deployment...

**RemoteBusinessJndiName: SupportNetRemote; remoteBusIntf: edu.sjsu.ejb.SupportNetRemote
LDR5010: All ejb(s) of [SupportNet-ejb] loaded successfully!
deployed with moduleid = SupportNet-war

Right before looking up the EJB, I see:

sumOfAllWeights = 10
NAM1001: No Endpoints selected in com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL iiop://localhost:3700 instead
list[i] ==> 127.0.0.1:3700
corbaloc url ==> iiop:1.2@127.0.0.1:3700

And when I printout the JNDI entries just before I lookup "SupportNetRemote" it prints out:

o - UserTransaction: com.sun.enterprise.distributedtx.UserTransactionImpl
o - jdbc: com.sun.enterprise.naming.TransientContext
o - SupportNetRemote#edu.sjsu.ejb.SupportNetRemote: javax.naming.Reference
o - ejb: com.sun.enterprise.naming.TransientContext
o - __SYSTEM: com.sun.enterprise.naming.TransientContext
o - SupportNetRemote__3_x_Internal_RemoteBusinessHome__: javax.naming.Reference
o - SupportNetRemote: javax.naming.Reference

This leads me to believe that my EJB is recorded. I tried to lookup (for testing) UserTransaction (not sure what bound this to the JNDI) and that is fine, it is only when I lookup "SupportNetRemote".

In the EJB I have:

@Stateless
public class SupportNetBean implements edu.sjsu.ejb.SupportNetRemote, edu.sjsu.ejb.SupportNetLocal {
...

My sun-ejb-jar.xml is:






SupportNetBean
SupportNetRemote


My client lookup is:

public static SupportNetRemote lookupSupportNetBean() {
try {

Context ic = new InitialContext();
javax.naming.NamingEnumeration nume = ic.list(""); // list all EJBs
while(nume.hasMore())
System.out.println("o - "+nume.next());

SupportNetRemote supportNet =
(SupportNetRemote) ic.lookup("SupportNetRemote");

return supportNet;

} catch (NamingException ne) {
/*java.util.logging.Logger.getLogger(getClass().getName())
.log(java.util.logging.Level.SEVERE,
"exception caught", ne);*/
throw new RuntimeException(ne);
}

I think I followed all the recommendations in https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB and yet I am still stuck. Can someone make some sense of what is going on and what I may be doing wrong? :(

I forgot to mention that I am using Netbeans 6.0 and Glassfish 9.1 build b58g-fcs.

Message was edited by: vyche1

Binod

at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:51)

Is it possible that jar that contain this class is in the AS_HOME/lib directory of the
appserver and not in domains/domain1/lib?

thanks,
Binod.

glassfish@javadesktop.org wrote:
> I guess here's a more defined explanation of the problem (btw, my deadline got moved to Monday so I still have a bit of time...)
>
> I have a stateless EJB with remote and local intefaces. I can see the EJB in my JNDI but everytime I try to lookup, I get:
>
> "IOP01211405: (BAD_OPERATION) Exception in loadStub"
> org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 1405 completed: No
> at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:179)
> at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:197)
> at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:856)
> at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:248)
> at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
> at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:343)
> at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:51)
> at edu.sjsu.supportnet.CommunitiesResource.getCommunities(CommunitiesResource.java:68)
> at edu.sjsu.supportnet.CommunitiesResource.getCommunitiesAsJsonArray(CommunitiesResource.java:113)
> 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.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:110)
> at com.sun.ws.rest.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:65)
> at com.sun.ws.rest.impl.model.method.ResourceMethodMapDispatcher.dispatch(ResourceMethodMapDispatcher.java:93)
> at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
> at com.sun.ws.rest.impl.application.WebApplicationContext.dispatchTo(WebApplicationContext.java:105)
> at com.sun.ws.rest.impl.model.ClassDispatcher.dispatch(ClassDispatcher.java:43)
> at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
> at com.sun.ws.rest.impl.model.RootResourceClass.dispatch(RootResourceClass.java:118)
> at com.sun.ws.rest.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:175)
> at com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:116)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
> at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 235 completed: Maybe
> at com.sun.corba.ee.impl.logging.ORBUtilSystemException.classNotFound3(ORBUtilSystemException.java:787)
> at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:74)
> at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:849)
> ... 57 more
> Caused by: java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated
> at com.sun.appserv.server.util.ASURLClassLoader.loadClass(ASURLClassLoader.java:129)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:104)
> at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:683)
> at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:72)
> ... 58 more
> StandardWrapperValve[ServletAdaptor]: PWC1406: Servlet.service() for servlet ServletAdaptor threw exception
> java.lang.RuntimeException: javax.naming.NamingException: ejb ref resolution error for remote business interfaceedu.sjsu.ejb.SupportNetRemote [Root exception is java.lang.NullPointerException]
> at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:60)
> at edu.sjsu.supportnet.CommunitiesResource.getCommunities(CommunitiesResource.java:68)
> at edu.sjsu.supportnet.CommunitiesResource.getCommunitiesAsJsonArray(CommunitiesResource.java:113)
> 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.ws.rest.impl.model.method.dispatch.EntityParamDispatchProvider$TypeOutInvoker._dispatch(EntityParamDispatchProvider.java:110)
> at com.sun.ws.rest.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:65)
> at com.sun.ws.rest.impl.model.method.ResourceMethodMapDispatcher.dispatch(ResourceMethodMapDispatcher.java:93)
> at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
> at com.sun.ws.rest.impl.application.WebApplicationContext.dispatchTo(WebApplicationContext.java:105)
> at com.sun.ws.rest.impl.model.ClassDispatcher.dispatch(ClassDispatcher.java:43)
> at com.sun.ws.rest.impl.model.BaseResourceClass.dispatch(BaseResourceClass.java:69)
> at com.sun.ws.rest.impl.model.RootResourceClass.dispatch(RootResourceClass.java:118)
> at com.sun.ws.rest.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:175)
> at com.sun.ws.rest.spi.container.servlet.ServletContainer.service(ServletContainer.java:116)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
> at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> Caused by: javax.naming.NamingException: ejb ref resolution error for remote business interfaceedu.sjsu.ejb.SupportNetRemote [Root exception is java.lang.NullPointerException]
> at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:367)
> at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74)
> at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at edu.sjsu.supportnet.CommunitiesResource.lookupSupportNetBean(CommunitiesResource.java:51)
> ... 49 more
> Caused by: java.lang.NullPointerException
> 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.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:359)
> ... 54 more
>
> The server prints out the following lines as part of my deployment...
>
> **RemoteBusinessJndiName: SupportNetRemote; remoteBusIntf: edu.sjsu.ejb.SupportNetRemote
> LDR5010: All ejb(s) of [SupportNet-ejb] loaded successfully!
> deployed with moduleid = SupportNet-war
>
> Right before looking up the EJB, I see:
>
> sumOfAllWeights = 10
> NAM1001: No Endpoints selected in com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL iiop://localhost:3700 instead
> list[i] ==> 127.0.0.1:3700
> corbaloc url ==> iiop:1.2@127.0.0.1:3700
>
> And when I printout the JNDI entries just before I lookup "SupportNetRemote" it prints out:
>
> o - UserTransaction: com.sun.enterprise.distributedtx.UserTransactionImpl
> o - jdbc: com.sun.enterprise.naming.TransientContext
> o - SupportNetRemote#edu.sjsu.ejb.SupportNetRemote: javax.naming.Reference
> o - ejb: com.sun.enterprise.naming.TransientContext
> o - __SYSTEM: com.sun.enterprise.naming.TransientContext
> o - SupportNetRemote__3_x_Internal_RemoteBusinessHome__: javax.naming.Reference
> o - SupportNetRemote: javax.naming.Reference
>
> This leads me to believe that my EJB is recorded. I tried to lookup (for testing) UserTransaction (not sure what bound this to the JNDI) and that is fine, it is only when I lookup "SupportNetRemote".
>
> In the EJB I have:
>
> @Stateless
> public class SupportNetBean implements edu.sjsu.ejb.SupportNetRemote, edu.sjsu.ejb.SupportNetLocal {
> ...
>
> My sun-ejb-jar.xml is:
>
>
>
>
>
>
> SupportNetBean
> SupportNetRemote
>

>

>

>
> My client lookup is:
>
> public static SupportNetRemote lookupSupportNetBean() {
> try {
>
> Context ic = new InitialContext();
> javax.naming.NamingEnumeration nume = ic.list(""); // list all EJBs
> while(nume.hasMore())
> System.out.println("o - "+nume.next());
>
> SupportNetRemote supportNet =
> (SupportNetRemote) ic.lookup("SupportNetRemote");
>
> return supportNet;
>
> } catch (NamingException ne) {
> /*java.util.logging.Logger.getLogger(getClass().getName())
> .log(java.util.logging.Level.SEVERE,
> "exception caught", ne);*/
> throw new RuntimeException(ne);
> }
>
> I think I followed all the recommendations in https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB and yet I am still stuck. Can someone make some sense of what is going on and what I may be doing wrong? :(
> [Message sent by forum member 'vyche1' (vyche1)]
>
> http://forums.java.net/jive/thread.jspa?messageID=250321
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

vyche1
Offline
Joined: 2007-12-10

It is not in either. I just configured a local call and it seems to be working. Thanks for the response.

vurte
Offline
Joined: 2007-08-21

I reported a Bug with the same error, which ony apears when ejbs are called from netbeans platform 6.0 application the same application with nb5.5 or non netbeans application works fine.

http://www.netbeans.org/issues/show_bug.cgi?id=125107

Message was edited by: vurte

cf126330
Offline
Joined: 2005-03-29

Are you using JDK or JRE to run glassfish? Looks like some generated code cannot be compiled, probably due to missing tools.jar. Check AS_JAVA in glassfish.home/config/asenv.bat.

-cheng

lwhite
Offline
Joined: 2005-05-17

Hi:

Sorry you're having problems - and are on a tight schedule.

I looked in GlassFish sources under com.sun.ejb.codegen and
there is no class like that. This together with the name I believe
mean that this is a code-generated class.

It's not clear what set of steps led you to this issue but apparently,
this class (and others?) were not yet generated when you reached
this point.

If you explain the steps you did perhaps others can provide you with
more assistance.