Why j2sdkee1.3.1 support JNDI lookup "java:comp/env" from  remote client?

Hi:
I have been puzzled by this function of j2sdkee1.3.1 support JNDI lookup "java:comp/env"
from client. I always think that "java:comp/env" namespace can only be access
by the application server self for it is a private namespace. The weblogic and
websphere doest support this.
Why?
Regards!
John

Hi:I'm unable to get JNDI reference object from remote application client with "java:comp/env/ejb/<lookupName>".
The exception says:
Application threw an exception:javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201 completed: No]
The J2EE server and client are run on different machines, and needs to be like this. There isn't any problem with JSP/Servlet (cause they run/execute on the server itself). How will the client find out the JNDI refernce my mere specification of "java:comp/env/..."?
Am I making a mistake anywhere?
BEA Weblogic & IBM Websphere allows explicitly specifying the server name, while doing JNDI lookup. Is there anything similary for J2EE?
I couldn't find reference for this anywhere in the J2EE tutorial or EJB books.
- Devashish

Similar Messages

  • Why only j2sdkee1.3 support JNDI lookup "java:comp/env" from remote client?

    Hi:
    I have been puzzled by this function of j2sdkee1.3.1 support JNDI lookup "java:comp/env" from client. I always think that "java:comp/env" namespace can only be access by the application server self for it is a private namespace. The weblogic and websphere doest support this.
    Why?
    Regards!
    John Lee

    Hi:I'm unable to get JNDI reference object from remote application client with "java:comp/env/ejb/<lookupName>".
    The exception says:
    Application threw an exception:javax.naming.CommunicationException: Cannot connect to ORB [Root exception is org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 201 completed: No]
    The J2EE server and client are run on different machines, and needs to be like this. There isn't any problem with JSP/Servlet (cause they run/execute on the server itself). How will the client find out the JNDI refernce my mere specification of "java:comp/env/..."?
    Am I making a mistake anywhere?
    BEA Weblogic & IBM Websphere allows explicitly specifying the server name, while doing JNDI lookup. Is there anything similary for J2EE?
    I couldn't find reference for this anywhere in the J2EE tutorial or EJB books.
    - Devashish

  • Access java:comp/env from standalone client

    Hi,
    I am using the j2ee applicationserver from Sun.
    I want to access the java:comp/env namespace from a standalone client. When I try to do this I get the following excepton:
    javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component
    How do I get around this?
    Is it possible?
    Regards
    /Stefan

    Thanks a lot for giving me an answer Bart,
    here is another question if you have the time.
    Since it is not possible to access the the java:comp/env namesapce from a standalone client, how do I access for example a "TopicConnectionFactory" from within a J2EE application when the TopicConnectionFactory is NOT in the java:comp/env namesapce?
    I have made this work but I get a warning like this:
    Warning : Illegal connection factory access to TopicConnectionFactory. J2EE Components should access JMS Connection Factories through a resource-ref in java:comp/env
    If this isn't possible either, then how should I use for example JMS with EJB to send messages to a standalone client?
    Regards
    Stefan

  • Application Deployment in Managed Node Failed with the error - ERROR   - Caught exception while looking up Connection Factory with JNDI Name: java:comp/env/eis/PRAdapterConnectionFactory, javax.naming.ServiceUnavailableException [Root exception is java.ne

    2013-06-24 21:16:28,551 [bxapp2.healthnet.com] [  STANDARD] [                    ] (l.access.RuleCandidateIterator) INFO    - Single candidate rule resolution optimization is enabled
    Error retrieving JNDI initial context:
    2013-06-24 21:16:28,952 [bxapp2.healthnet.com] [  STANDARD] [                    ] (    pegarules.resadap.RAClient) ERROR   - Caught exception while looking up Connection Factory with JNDI Name: java:comp/env/eis/PRAdapterConnectionFactory, javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'TCP']
    javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'TCP']
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:787)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:175)
    at com.pega.pegarules.priv.util.JNDIUtil.getInitialContext(JNDIUtil.java:106)
    at com.pega.pegarules.priv.util.JNDIUtil.lookupUsingRealContextClassLoader(JNDIUtil.java:128)
    at com.pega.pegarules.resadap.RAClient.init(RAClient.java:102)
    at com.pega.pegarules.resadap.RAClient.<init>(RAClient.java:84)
    at com.pega.pegarules.resadap.RAClientContainer.get(RAClientContainer.java:47)
    at com.pega.pegarules.session.internal.async.BatchUtils.callRAClient(BatchUtils.java:146)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.callRAClient(ListenerWrapper.java:358)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.launchListener(ListenerWrapper.java:233)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startOneListener(ListenerStateManagerImpl.java:713)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startServiceTypeListeners(ListenerStateManagerImpl.java:464)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startListenerType(ListenerStateManagerImpl.java:423)
    at com.pega.pegarules.integration.engine.internal.PRIntegrationEngineProviderImpl.initServices(PRIntegrationEngineProviderImpl.java:166)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.initServices(PREnvironment.java:620)
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.finishInit(PREnvironment.java:522)
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.getThreadAndInitialize(PREnvironment.java:379)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.getThreadAndInitialize(PRSessionProviderImpl.java:1516)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineStartup.initEngine(EngineStartup.java:619)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:165)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.doStartup(EngineImpl.java:138)
    at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.doStartup(EngineBean.java:120)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
    at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.doStartup(EngineBeanBoot.java:130)
    at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.doStartup(EngineBMT_h449u3_ELOImpl.java:124)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener._contextInitialized_privact(WebAppLifeCycleListener.java:259)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener.contextInitialized(WebAppLifeCycleListener.java:167)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
    at com.pega.pegarules.internal.web.servlet.WebAppLifeCycleListenerBoot.contextInitialized(WebAppLifeCycleListenerBoot.java:83)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.net.UnknownHostException: Unknown protocol: 'TCP'
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:216)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
    ... 94 more
    2013-06-24 21:16:28,952 [bxapp2.healthnet.com] [  STANDARD] [                    ] (tener.ListenerStateManagerImpl) ERROR   - Unexpected exception.
    java.lang.NullPointerException
    at com.pega.pegarules.session.internal.async.BatchUtils.callRAClient(BatchUtils.java:150)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.callRAClient(ListenerWrapper.java:358)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerWrapper.launchListener(ListenerWrapper.java:233)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startOneListener(ListenerStateManagerImpl.java:713)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startServiceTypeListeners(ListenerStateManagerImpl.java:464)
    at com.pega.pegarules.integration.engine.internal.services.listener.ListenerStateManagerImpl.startListenerType(ListenerStateManagerImpl.java:423)
    at com.pega.pegarules.integration.engine.internal.PRIntegrationEngineProviderImpl.initServices(PRIntegrationEngineProviderImpl.java:166)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.initServices(PREnvironment.java:620)
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.finishInit(PREnvironment.java:522)
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.getThreadAndInitialize(PREnvironment.java:379)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.getThreadAndInitialize(PRSessionProviderImpl.java:1516)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineStartup.initEngine(EngineStartup.java:619)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:165)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.doStartup(EngineImpl.java:138)
    at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.doStartup(EngineBean.java:120)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
    at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.doStartup(EngineBeanBoot.java:130)
    at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.doStartup(EngineBMT_h449u3_ELOImpl.java:124)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener._contextInitialized_privact(WebAppLifeCycleListener.java:259)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener.contextInitialized(WebAppLifeCycleListener.java:167)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
    at com.pega.pegarules.internal.web.servlet.WebAppLifeCycleListenerBoot.contextInitialized(WebAppLifeCycleListenerBoot.java:83)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    2013-06-24 21:16:28,956 [bxapp2.healthnet.com] [  STANDARD] [                    ] (          internal.async.Agent) INFO    - Agents will be executed via the enterprise tier.
    2013-06-24 21:16:28,956 [bxapp2.healthnet.com] [  STANDARD] [                    ] (          internal.async.Agent) INFO    - Passivation will be done on a per-page basis.
    2013-06-24 21:16:30,023 [bxapp2.healthnet.com] [  STANDARD] [                    ] (    pegarules.resadap.RAClient) ERROR   - Caught exception while looking up Connection Factory with JNDI Name: java:comp/env/eis/PRAdapterConnectionFactory, javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'TCP']
    javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: Unknown protocol: 'TCP']
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:787)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:368)
    at weblogic.jndi.Environment.getContext(Environment.java:315)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:175)
    at com.pega.pegarules.priv.util.JNDIUtil.getInitialContext(JNDIUtil.java:106)
    at com.pega.pegarules.priv.util.JNDIUtil.lookupUsingRealContextClassLoader(JNDIUtil.java:128)
    at com.pega.pegarules.resadap.RAClient.init(RAClient.java:102)
    at com.pega.pegarules.resadap.RAClient.<init>(RAClient.java:84)
    at com.pega.pegarules.resadap.RAClientContainer.get(RAClientContainer.java:47)
    at com.pega.pegarules.session.internal.async.BatchUtils.callRAClient(BatchUtils.java:146)
    at com.pega.pegarules.monitor.internal.UsageDaemonImpl.initialize(UsageDaemonImpl.java:546)
    at com.pega.pegarules.session.internal.async.Agent.start(Agent.java:1400)
    at com.pega.pegarules.session.internal.mgmt.PRNodeImpl.startNode(PRNodeImpl.java:1520)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.finishInit(PREnvironment.java:533)
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.getThreadAndInitialize(PREnvironment.java:379)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.getThreadAndInitialize(PRSessionProviderImpl.java:1516)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineStartup.initEngine(EngineStartup.java:619)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:165)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.doStartup(EngineImpl.java:138)
    at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.doStartup(EngineBean.java:120)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
    at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.doStartup(EngineBeanBoot.java:130)
    at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.doStartup(EngineBMT_h449u3_ELOImpl.java:124)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener._contextInitialized_privact(WebAppLifeCycleListener.java:259)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener.contextInitialized(WebAppLifeCycleListener.java:167)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
    at com.pega.pegarules.internal.web.servlet.WebAppLifeCycleListenerBoot.contextInitialized(WebAppLifeCycleListenerBoot.java:83)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.net.UnknownHostException: Unknown protocol: 'TCP'
    at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:216)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
    at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
    ... 84 more
    2013-06-24 21:16:30,038 [bxapp2.healthnet.com] [  STANDARD] [                    ] (      etier.impl.EngineStartup) ERROR   - PegaRULES initialization failed. Server: pg-sbxapp2.healthnet.com
    com.pega.pegarules.pub.context.InitializationFailedError: PRNodeImpl init failed
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.getThreadAndInitialize(PREnvironment.java:387)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.getThreadAndInitialize(PRSessionProviderImpl.java:1516)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineStartup.initEngine(EngineStartup.java:619)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._initEngine_privact(EngineImpl.java:165)
    at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.doStartup(EngineImpl.java:138)
    at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.doStartup(EngineBean.java:120)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingException(PRBootstrap.java:412)
    at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.doStartup(EngineBeanBoot.java:130)
    at com.pega.pegarules.internal.etier.ejb.EngineBMT_h449u3_ELOImpl.doStartup(EngineBMT_h449u3_ELOImpl.java:124)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener._contextInitialized_privact(WebAppLifeCycleListener.java:259)
    at com.pega.pegarules.web.servlet.WebAppLifeCycleListener.contextInitialized(WebAppLifeCycleListener.java:167)
    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.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:349)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:390)
    at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:439)
    at com.pega.pegarules.internal.web.servlet.WebAppLifeCycleListenerBoot.contextInitialized(WebAppLifeCycleListenerBoot.java:83)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1863)
    at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
    at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
    at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
    at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
    at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
    at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
    at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
    at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
    at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
    at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
    at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
    at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
    at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
    at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: com.pega.pegarules.pub.PRRuntimeException: Method Invocation exception
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1045)
    at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:765)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.getThreadAndInitialize(PREnvironment.java:379)
    ... 60 more
    Caused by: java.lang.reflect.InvocationTargetException
    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.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1043)
    ... 62 more
    Caused by: java.lang.NullPointerException
    at com.pega.pegarules.session.internal.async.BatchUtils.callRAClient(BatchUtils.java:150)
    at com.pega.pegarules.monitor.internal.UsageDaemonImpl.initialize(UsageDaemonImpl.java:546)
    at com.pega.pegarules.session.internal.async.Agent.start(Agent.java:1400)
    at com.pega.pegarules.session.internal.mgmt.PRNodeImpl.startNode(PRNodeImpl.java:1520)
    at com.pega.pegarules.session.internal.mgmt.PREnvironment.finishInit(PREnvironment.java:533)
    ... 67 more
    2013-06-24 21:16:30,051 [bxapp2.healthnet.com] [  STANDARD] [                    ] (      etier.impl.EngineStartup) INFO    - PegaRULES initialization failed. Server: pg-sbxapp2.healthnet.com
    2013-06-24 21:16:30,164 [bxapp2.healthnet.com] [  STANDARD] [                    ] (ervlet.WebAppLifeCycleListener) ERROR   - Enterprise tier failed to initialize properly, PegaRULES not available
    2013-06-24 21:16:30,190 [bxapp2.healthnet.com] [  STANDARD] [                    ] (ervlet.WebAppLifeCycleListener) INFO    - Web Tier initialization is complete.
    <Jun 24, 2013 9:16:30 PM PDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Jun 24, 2013 9:16:30 PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Jun 24, 2013 9:16:30 PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Jun 24, 2013 9:16:30 PM PDT> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 167.238.162.41:8008 for protocols iiop, t3, ldap, snmp, http.>
    <Jun 24, 2013 9:16:30 PM PDT> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "pegamanaged2" for domain "sbxdomain8" running in Production Mode>
    <Jun 24, 2013 9:16:31 PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Jun 24, 2013 9:16:31 PM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

    Greetings,
    javax.naming.NameNotFoundException. Root exception is
    org.omg.CosNaming.NamingContextPackage.NotFound
    =================
    Below is the line of my LoginServlet class which is
    referred to in the stack trace - Object object =
    context.lookup
                        ( "java:comp/env/ejb/WarehouseClerk" );The root of the naming context is 'java:comp/env' and this is where lookup automatically begins for EJBs and resources. IOW, by specifying "java:comp/env/ejb/WarehouseClerk" as the EJB lookup name the server is actually treating this as "java:comp/env/java:comp/env/ejb/WarehouseClerk". Specify only the ejb context ("ejb/WarehouseClerk") in your lookup and you should be fine.
    Any help would be most appreciated.
    SeanRegards,
    Tony "Vee Schade" Cook

  • Problems with JNDI lookup for java:comp/env/ejb

    Hi all,
    I'm using OC4J 9.0.3 and I have problems when looking up for the local
    EJB context.
    I have a SLSB which refers to another SLSB via a JNDI mapping like
    shown below. Both services are deployed within one EAR file.
    (snippets of ejb-jar.xml and orion-ejb-jar.xml)
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>ServiceABean</ejb-name>
    <home>com.coi.ServiceAHome</home>
    <remote>com.coi.ServiceA</remote>
    <ejb-class>com.coi.ServiceABean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-ref>
    <ejb-ref-name>ejb/some/sub/packages/ServiceB</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.coi.ServiceBHome</home>
    <remote>com.coi.ServiceB</remote>
    </ejb-ref>
    </session>
    </enterprise-beans>
    </ejb-jar>
    <orion-ejb-jar>
    <enterprise-beans>
    <session-deployment location="global/some/sub/packages/ServiceA" name="ServiceABean">
    <ejb-ref-mapping name="ejb/some/sub/packages/ServiceB" location="global/some/sub/packages/ServiceB" />
    </session-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    The ApplicationInitialContextFactory will be used (prepared by the container),
    so the lookup for ServiceB within a method of ServiceA should work as follows:
    public class ServiceABean implements SessionBean
    public void someMethod()
    InitialContext con = new InitialContext(); // will be of class ApplicationContext
    Context localEjbContext = (Context)con.lookup( "java:comp/env/ejb" );
    ServiceBHome serviceBHome = (ServiceBHome) PortableRemoteObject.narrow(
    localEjbContext.lookup( "some/sub/packages/ServiceB" ),
    ServiceBHome.class );
    The problem is now, that the lookup for "java:comp/env/ejb" doesn't work
    and throws a NameNotFoundException.
    To figure out what's actually happening during lookup I debugged a little bit and
    tried a few things:
    1. A lookup for "java:comp" works fine. It returns an instance of class FlatMapContext
    which consists of a hash map which itself contains an entry for "env".
    2. So a lookup for "env" on that FlatMapContext also works and returns an instance of SubContext.
    3. A lookup for "ejb" using this SubContext causes a NameNotFoundException
    with message "java:comp/env/ejb not found".
    4. A lookup like con.lookup( "java:comp/env" ) throws also a NameNotFoundException
    with message "java:comp/env not found (not inside a J2EE module, for instance a Web-App,
    EJB, or Application-Client)".
    Does anyone know something about this?
    Regards
    --thomas

    Hi Debu,
    Great! 9.0.4 will be released in june/july this year, right? Sorry for my ironical reaction, but does that mean, that I don't have any chance to get my whole stuff running in 9.0.3? I cannot believe that. Isn't there a wordaround I could apply? A setting or whatever to substitute the daft FlatCtx by something else that is implemented according to the spec?
    Regards
    --thomas

  • Problem in JNDI Lookup of Deployable Proxy from the logon par file

    Hi,
    I have customized the Logon par file and have a functionality to call a webservice when the Password Reset happens.
    <b>from the ResetPassword.jsp , SAPMLogonLogic.java is getting called ,and  there is a method called performResetPassword().</b>
    I am calling a Deployable Proxy in that method by using the below code,
    <b>Gateway objGateway=(SMSGateway)ctx.lookup("java:comp/env/MailProxy");                    
    MailGatewayViDocument objSMSGatewayViDocument=(MailGatewayViDocument )objGateway.getLogicalPort("wsPort_Document",MailGatewayViDocument.class);
    objMailGatewayViDocument.sendMail(...);</b>
    I am getting the Exception,
    <b>com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:comp, the whole lookup name is java:comp/env/MailProxy.</b>
    I have deployed the Deployable Proxy in the J2EE Engine and add this API Jar as the External Library (Project >Properties>Java Build Path ---> Add External jars...Added the .jar file generated in the Proxy Project).
    <b>Please let me know the possible solutions where i can call a deployable proxy inside the logon par file</b>.
    Thanks and Regards,
    Sekar

    Hi,
    I have fixed this error by changing the lookup as follows.
    InitialContext ctx=new InitialContext();
    Gateway objGateway=(Gateway)ctx.lookup("wsclients/proxies/sap.com/GatewayProxy/com.ms.sap..GatewayProxy");
    Just open Visual Administrator and look for the path under wsclients for proper naming.
    Thanks and Regards,
    Sekar
    Edited by: Sekar M on Jan 16, 2008 6:10 PM

  • Javax.naming.NameNotFoundException: No object bound for java:comp/env/...

    Help, help! I have a problem:
    javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
    at javax.naming.InitialContext.lookup(InitialContext.java:355)
    at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
    at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
    at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
    at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
    at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
    at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
    at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
    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:585)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:595)
    code:
    initialContext = new InitialContext();
    LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
    in web.xml:
    <ejb-local-ref>
    <ejb-ref-name>StatelessREBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
    <local>com.re.stateless.ejb.LocalStatelessRE</local>
    <ejb-link>StatelessREBean</ejb-link>
    </ejb-local-ref>
    Any help will be appreciated! Thanks in advance.

    Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
    It worked for me when i used to get a similar exception.

  • Unable to resolve 'java:comp.env'

    Hi,
    I am getting javax.naming.NameNotFoundException: Unable to resolve 'java:comp.env'
    Resolved: '' Unresolved:'java:comp' ; remaining name 'java:comp.env' inside a
    stateless session bean using wl7 sp2. Does anyone know what the problem could
    be?
    here is my c
    p = new Properties();
    p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context      envCtx = new InitialContext(p);     
    envCtx = (Context)localContext.lookup("java:comp/env");
    Eric
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:17
    4)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:263)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:230)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)

    "Eric Ho" <[email protected]> wrote:
    >
    Hi,
    I am getting javax.naming.NameNotFoundException: Unable to resolve 'java:comp.env'
    Resolved: '' Unresolved:'java:comp' ; remaining name 'java:comp.env'
    inside a
    stateless session bean using wl7 sp2. Does anyone know what the problem
    could
    be?
    here is my c
    p = new Properties();
    p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context      envCtx = new InitialContext(p);     
    envCtx = (Context)localContext.lookup("java:comp/env");
    Eric
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:17
    4)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:263)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
    ef.java:230)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
    Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
    at javax.naming.InitialContext.lookup(InitialContext.java:345)hi
    The name "java:comp/env" is just addressesing a Context and not any object.
    Suppose your bean name is "mybean". So your lookup name should be "java:comp/env/mybean".
    bye
    Ahtesham

  • Getting java:comp/env context in init()

    Hi,
              I started to write web application using servlets 2.2.
              Here is the code in my init() method:
              Context jndi_context = new InitialContext();
              Context env_context = (Context)jndi_context.lookup("java:comp/env");
              Object result = env_context.lookup("ejb/RatesCacheHome");
              It fails on the second line with the following exception:
              javax.naming.NoInitialContextException: Cannot create context for 'null'
              outside the scope of an application.
              at
              weblogic.jndi.factories.java.javaURLContextFactory.getObjectInstance(javaURL
              ContextFactory.java:61)
              at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:588)
              at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:537)
              at
              javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:274)
              at javax.naming.InitialContext.lookup(InitialContext.java:349)
              at servlts.FXSpotRatesServlet.init(FXSpotRatesServlet.java:27)
              at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              at
              weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
              :474)
              at
              weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
              va, Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
              a:422)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:760)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:707)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              Is "java:comp/env" accessible during servlet init method? I just need to
              lookup EJBHome
              interface described in web.xml file. With EJBs it works. Am I missing
              something with
              webapp?
              Thanks in advance
              Andrew
              

    Here is the link:
              http://www.weblogic.com/docs51/classdocs/webappguide.html
              "Jen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > You are right. Where can you find documentaion about develp, deploy web
              application on wls?
              > I only can find the old way to register servlet in weblogic.properties.
              > Thanks
              >
              > "Andrew Sinitsyn" <[email protected]> wrote:
              > >Actually, it's not true. According to Servlet specs 2.2 it is recommended
              to
              > >use
              > >java:comp/env in servlets/web applications.
              > >
              > >
              > >"Jen" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> "Andrew Sinitsyn" <[email protected]> wrote:
              > >> >Hi,
              > >> >
              > >> >I started to write web application using servlets 2.2.
              > >> >Here is the code in my init() method:
              > >> >
              > >> >Context jndi_context = new InitialContext();
              > >> >Context env_context = (Context)jndi_context.lookup("java:comp/env");
              > >> >Object result = env_context.lookup("ejb/RatesCacheHome");
              > >> >.....
              > >> >
              > >> >It fails on the second line with the following exception:
              > >> >
              > >> >javax.naming.NoInitialContextException: Cannot create context for
              'null'
              > >> >outside the scope of an application.
              > >> > at
              > >>
              >
              >>weblogic.jndi.factories.java.javaURLContextFactory.getObjectInstance(javaU
              R
              > >L
              > >> >ContextFactory.java:61)
              > >> > at
              javax.naming.spi.NamingManager.getURLObject(NamingManager.java:588)
              > >> > at
              javax.naming.spi.NamingManager.getURLContext(NamingManager.java:537)
              > >> > at
              > >>
              >
              >>javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:274
              > >> > at javax.naming.InitialContext.lookup(InitialContext.java:349)
              > >> > at servlts.FXSpotRatesServlet.init(FXSpotRatesServlet.java:27)
              > >> > at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.ja
              v
              > >a
              > >> >:474)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.
              j
              > >a
              > >> >va, Compiled Code)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.j
              a
              > >v
              > >> >a:422)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:
              1
              > >8
              > >> >7)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.ja
              v
              > >a
              > >> >:118)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextI
              m
              > >p
              > >> >l.java:760)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextI
              m
              > >p
              > >> >l.java:707)
              > >> > at
              > >>
              >
              >>weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletConte
              x
              > >t
              > >> >Manager.java:251)
              > >> > at
              > >>
              >
              >>weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:369
              > >> > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
              > >> > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              > >> >
              > >> >Is "java:comp/env" accessible during servlet init method? I just need
              to
              > >> >lookup EJBHome
              > >> >interface described in web.xml file. With EJBs it works. Am I missing
              > >> >something with
              > >> >webapp?
              > >>
              > >> "java:comp/env" is for EJB enviroment. In servlet, you need to lookup
              home
              > >interface
              > >>
              > >>
              > >> >
              > >> >Thanks in advance
              > >> >Andrew
              > >> >
              > >> >
              > >>
              > >
              > >
              >
              

  • Java:comp/env bound and unbound at the same time

    I have a ServiceLocator class which has a method that looks up and caches EJB remote home objects. I am occasionally getting a NameNotFoundException from this method telling me that env is not bound when I try doing a lookup using a JNDI name such as "java:comp/env/ejb/MyEjb". What is so odd is that this lookup is working for other JNDI names under java:comp/env, as well as in other cases when using the same JNDI name which causes the exception. It appears that env is bound in some cases but not in others.
    This only occurs when I restart my JBoss server after a client has opened an HttpSession. If I also restart the client then the error doesn't occur. The client is a VB application which calls my JBoss web application's Servlets. I'm using JBoss 4.0.1.
    Can anyone give me a suggestion as to where I should look for the problem? Thanks in advance.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    A little more information:
    The ServiceLocator is a Singleton object which runs as part of the server, and has its InitalContext bound the first time it's used (this happens in the ServiceLocator Singleton's constructor). The weirdness I'm experiencing is that it completes several lookups successfully before bombing on a lookup which uses the same JNDI name of a lookup that previously worked -- it literally works on one call and then fails on the next. The difference between the times it works and the time it doesn't is that the successful ServiceLocator method invocations originate within Servlets or EJBs and the unsuccessful invokation is made from within a JMX component. Still it's the same ServiceLocator Singleton, with the same internal InitialContext, so it would follow that the InitialContext would never lose a binding, regardless of the type of component that calls the method which does a lookup.
    To further illustrate here's the scenario I'm dealing with:
    1. The server is started.
    2. The client is started.
    3. All is well -- the client calls the servlets, which either (a) call the ServiceLocator to get EJBs or (b) invoke JMX services (MBean methods) which call the ServiceLocator to get EJBs.
    4. The server is restarted.
    5. The client makes a call to a servlet.
    6. The servlet makes a call to the ServiceLocator method to get an EJB, and within that EJB the ServiceLocator is again called to get another EJB:
    a. Lookup of java:comp/env/ejb/EJBOne is successful
    b. Lookup of java:comp/env/ejb/EJBTwo is successful
    7. The client calls a method on a JMX service (MBean) which internally uses the ServiceLocator to get an EJB. In this case the lookup fails:
    c. Lookup of java:comp/env/ejb/EJBThree fails with the following exception stack trace:
    javax.naming.NameNotFoundException: env not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:658)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at com.mycom.util.ServiceLocator.getRemoteHome(ServiceLocator.java:119)
    etc...
    7. The client receives the error and calls another servlet to refresh itself. This servlet looks up the same EJB which the JMX service was trying to lookup, and this time the ServiceLocator has no trouble finding it:
    b. Lookup of java:comp/env/ejb/EJBThree is successful
    In the ServiceLocator's lookup method I have added debug code to show the HashCode of the InitialContext being used, and in fact it is the same InitialContext being used each time.
    What I think is happening is that normally in my application when the JMX components invoke ServiceLocator methods these methods are never doing lookups and are always getting objects previously cached by lookups made by previous ServiceLocator method calls made the Servlets or EJBs. In other words the above scenario is the only time a JMX component is invoking a ServiceLocator method in which the requested object isn't already cached and the lookup actually needs to happen. The "java:comp/env" name is somehow not available within the context of JMX, and hence the lookup fails.
    So it appears that within the context of normal (non-JMX) components the JNDI name "java:comp/env" is bound to the InitialContext, but within the context of a JMX component the InitialContext temporarily loses this binding. Is this the really case? If so can someone point me to a reference in which this behavior explained?
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to bind a String object to java:comp/env name space?

    Hi, does anybody know how to declare a String as a JNDI object in OC4J V904. I want to register a String named 'Foo' with the value 'val' with JNDI. Eventually I want to get the value of this by referencing this JNDI name:
    java:comp/env/ejb/Foo
    I don't really care how this is done either by declaring it by way of ejb-jar.xml or a global setting at the application server level.
    Please assist!
    Thanks
    J

    There are many possible ways.
    - (BEST) Use the J2EE resource environment variable mechanism (ie resource-env-ref in ejb-jar.xml).
    - (MEDIUM) Use OC4J startup classes.
    - (IF ELSE FAILS) Use the InitialContext.rebind method.

  • Could not lookup PortalManagerHome in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager

    Hi
    I am just a starter on WLPortal.
    I have created a barebone Application from scratch. I have synchronized it properly
    from EBCC to WLP. But When I am trying to access the home page of my application,
    I am getting from stack trace -
    <Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup PortalManagerHome
    in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
    javax.naming.NameNotFoundException: Unable to resolve comp/env/ejb/PortalManager
    Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:802)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:209)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:173)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:181)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:36)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at com.bea.p13n.util.JndiHelper.lookupNarrow(JndiHelper.java:96)
    at com.bea.portal.appflow.PortalAppflowHelper.<clinit>(PortalAppflowHelper.java:64)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.init(PortalWebflowServlet.java:78)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:700)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:643)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:588)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:368)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:242)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
    at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
    at jsp_servlet.__index._jspService(__index.java:92)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    >
    <Nov 6, 2002 5:37:59 PM IST> <Error> <HTTP> <[WebAppServletContext(19695286,FirstWebApp,/FirstWebApp)]
    Servlet failed with Exception
    java.lang.NullPointerException:
    at com.bea.portal.appflow.PortalAppflowHelper.createPortalManager(PortalAppflowHelper.java:82)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.setupPortalRequest(PortalWebflowServlet.java:187)
    at com.bea.portal.appflow.servlets.internal.PortalWebflowServlet.doGet(PortalWebflowServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
    at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
    at jsp_servlet.__index._jspService(__index.java:92)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2459)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    When I decompiled the class PortalAppflowHelper, I found a static block in it,
    which was as under-
    static
    debug = Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
    try
    if(debug.ON)
    debug.out("Looking up PortalManagerHome using EJB reference java:comp/env/ejb/PortalManager");
    portalManagerHome = (PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
    com.bea.portal.manager.ejb.PortalManagerHome.class);
    if(debug.ON)
    debug.out("Successfully retrieved PortalManagerHome " + portalManagerHome);
    catch(Exception e)
    PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
    e);
    I have checked the PortalManager's JNDI name on WLConsole. Its ${APPNAME}.BEA_portal.PortalManager.
    Should I change it?
    When I tried to change it, I started getting other weird errors.
    Thanks
    Neeraj Hans

    Neeraj -
    The Portal framework code (including PortalAppflowHelper) uses ejb
    references to find the PortalManager (and other EJBs) from servlets and
    taglibs; that is what is signified by the java:comp/env/... name.
    Since you built your webapp from scratch (instead of using the portal
    wizard), you will need to make sure the you have the appropriate
    <ejb-ref> entries in your web.xml, and the corresponding
    <ejb-reference-description> entries in your weblogic.xml. By default,
    you will need at least mappings for:
    - ejb/PortalManager
    - ejb/UserManager
    - ejb/GroupManager
    - ejb/PipelineExecutor
    - ejb/EventService
    See either the resulting webapp from using the portal wizard or
    BEA_HOME/weblogic700/samples/portal/sampleportalDomain/beaApps/sampleportal/sampleportal/WEB-INF
    for example syntax.
    Greg
    Neeraj Hans wrote:
    Hi
    I am just a starter on WLPortal.
    I have created a barebone Application from scratch. I have
    synchronized it properly
    from EBCC to WLP. But When I am trying to access the home page of my
    application,
    I am getting from stack trace -
    <Nov 6, 2002 5:37:59 PM IST> <Error> <PortalAppflow> <Could not lookup
    PortalManagerHome
    in the JNDI tree using EJB reference java:comp/env/ejb/PortalManager.
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/PortalManager
    Resolved: 'comp/env' Unresolved:'ejb' ; remaining name 'PortalManager'
    at <stack trace lines snipped>
    When I decompiled the class PortalAppflowHelper, I found a static
    block in it,
    which was as under-
    static
    debug =
    Debug.getInstance(com.bea.portal.appflow.PortalAppflowHelper.class);
    try
    if(debug.ON)
    debug.out("Looking up PortalManagerHome using EJB
    reference java:comp/env/ejb/PortalManager");
    portalManagerHome =
    (PortalManagerHome)JndiHelper.lookupNarrow("java:comp/env/ejb/PortalManager",
    com.bea.portal.manager.ejb.PortalManagerHome.class);
    if(debug.ON)
    debug.out("Successfully retrieved PortalManagerHome "
    + portalManagerHome);
    catch(Exception e)
    PortalAppflowLogger.errorFindingPortalManagerHome("java:comp/env/ejb/PortalManager",
    e);
    I have checked the PortalManager's JNDI name on WLConsole. Its
    ${APPNAME}.BEA_portal.PortalManager.
    Should I change it?
    When I tried to change it, I started getting other weird errors.
    Thanks
    Neeraj Hans

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • Java:comp/env namespace is only available from within J2EE component

    HI
    I am writing a standalone application program to access the bean using jdk1.3.1 and it's giving me the namespace error.
    I deployed the bean and included the .jar file in CLASSPATH. In the program, I specify the correct namespace to lookup since it's already registered through deployment
    When I run the application, I get the exception error with namespace only available withing j2ee component.
    Does anyone know what's the problem?

    Hi,
    When you deploy your bean ( im assuming you are using deploytool ) have you added your client application as a component in deploytool ?
    If you haven't done this then the client app code won't be able to lookup the java:comp/env name space. The reason is, that to access this namespace ( at least with j2sdkee1.3 ) you need a "client container". This client container is generated by the deploytool automatically if you add the client application into deploytool. Sun's sample application "Dukes Bank App" is a good place to see an example of this

  • What is the meaning of java:comp/env in (?java:comp/env/jdbc/mssql?) ?

    I know that we are suppose to give jndi names starting with jdbc/
    But i have a sun book in which they created a jndi with jdbc/ejbUserAccount and later referred it with "java:comp/env/jdbc/UserAccountDB"
    also in this blog this guy has done the same ..
    http://vchaithanya.wordpress.com/category/java/
    please help !!

    DogsAreBarking wrote:
    I know that we are suppose to give jndi names starting with jdbc/
    no we're not!
    But i have a sun book in which they created a jndi with jdbc/ejbUserAccount and later referred it with "java:comp/env/jdbc/UserAccountDB"
    That's how he defined it, apparently. Or rather the application(server) that provides the resource through JNDI.
    please help !!It's just a name. It could be anything, but usually they are descriptive.

Maybe you are looking for

  • How to handle ™ sign in servlet?

    Hi, I am using a textarea for take input from client side. in server side i print the line. When i give ™ sign in text area and submit the form the print line prints ¿ sign. form submit use post method. How can i handle this? Thanks in Adv. A

  • Remove New Link Menu Option

    Hello, all! I am looking to remove the New > Link option in the Portal Favorites iView.  From looking through the forum posts, it looks like I have to create my own Layout Set and define commands.  I have done all of that, but in my copied command gr

  • Configure IDE Installation

    Hi There, I'm an old style database designer, new to Java, who is having a major headache getting through my first basic tutorials as I cannot get the IDE to successfully compile and generate my basic code. I suspect this may be due to an unmounted f

  • What will it be tomorrow?

    An update for A/Reader? Or F/Player? Honestly, Adobe is making Microsoft look stable...but they have learned certainly how to make nearly impossible posting any such concern.

  • TS2755 i cannot download message in my 3GS iphone

    Whenever I want to download a large file, a message indicate that safari cannot download this file. What can I do? Somebody to help me please.