2 Replies Latest reply on Jan 7, 2008 1:44 AM by satish kumar

    Naming problem after upgrade

    Emil Nilimaa Newbie

      We have been using Tomcat 5.5 along with JBoss 4.0.3RC in the past. It has been working fine.

      Now we have updated JBoss to 4.2.2. The application works fine when connecting through EJB, but the webapp deployed in Tomcat gets a naming exception when it tries to fetch the EJBs.

      We have simply copied the ear into the new jboss deploy and set jboss to run with -b 0.0.0.0

      Is there anything else that must be done for tomcat to be able to get the access to the ejbs through jndi?

      I presume it is something in the new jboss configuration that needs to be fixed, since tomcat runs fine with the old jboss 4.0.3...

      Best regards

        • 1. Re: Naming problem after upgrade
          Peter Johnson Master

          You could check the jndi namespace using the JndiView mbean in the jmx-console. Perhaps the names are different.

          If that doesn't solve the issue, post the jndi namespace (as given by JndiView), the code you areu sing to do the name lookup, and the properties passed to jndi (code or properties file).

          • 2. Re: Naming problem after upgrade
            satish kumar Newbie

            I am also facing similar problem
            when deployed in jboss-3.2.8 my application is working fine.
            When upgraded to jboss-4.2.2 i am getting following exception



            11:39:28,625 INFO [testTopic] Bound to JNDI name: topic/testTopic
            11:39:28,625 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
            11:39:28,656 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
            11:39:28,656 INFO [testQueue] Bound to JNDI name: queue/testQueue
            11:39:28,828 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
            11:39:28,984 INFO [DLQ] Bound to JNDI name: queue/DLQ
            11:39:29,843 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
            11:39:29,968 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
            11:39:30,531 INFO [EARDeployer] Init J2EE application: file:/D:/CDM564/common/local/modules/dsm/deploy/dsm.ear/
            11:39:32,843 INFO [EjbModule] Deploying SM.beanManaged.WirelessDeviceProfileHome
            11:39:33,093 INFO [EjbModule] Deploying SM.beanManaged.WirelessDeviceProfileRWHome
            11:39:33,109 INFO [EjbModule] Deploying SM.device.CommEndPointHome
            11:39:33,109 INFO [EjbModule] Deploying SM.device.CommEndPointRWHome
            11:39:33,156 INFO [EjbModule] Deploying SM.user.UserHome
            11:39:33,171 INFO [EjbModule] Deploying SM.user.UserRWHome
            11:39:33,187 INFO [EjbModule] Deploying SM.Stateful.CustomServiceBean
            11:39:33,234 INFO [EjbModule] Deploying SM.chat.MessageHome
            11:39:33,250 INFO [EjbModule] Deploying SM.contactlist.ContactListHome
            11:39:33,250 INFO [EjbModule] Deploying SM.custom.CustomServiceNotifierHome
            11:39:33,281 INFO [EjbModule] Deploying SM.device.DeviceDirectoryHome
            11:39:33,281 INFO [EjbModule] Deploying SM.device.NetworkDirectoryHome
            11:39:33,296 INFO [EjbModule] Deploying SM.sequence.OIDGenerator
            11:39:33,296 INFO [EjbModule] Deploying SM.service.ServiceDirectoryHome
            11:39:33,312 INFO [EjbModule] Deploying SM.session.UserSessionHome
            11:39:33,328 INFO [EjbModule] Deploying SM.transfer.FileTransferHome
            11:39:33,343 INFO [EjbModule] Deploying SM.user.UserDirectoryHome
            11:39:33,359 INFO [EjbModule] Deploying SM.action.RefusableActionManagerHome
            11:39:33,359 INFO [EjbModule] Deploying SM.session.PublicAccessUserSessionHome
            11:39:33,375 INFO [EjbModule] Deploying SM.service.ServiceRouterHome
            11:39:34,562 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.mportal.provisioning.startup.PITestingServlet
            11:39:34,562 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.mportal.provisioning.startup.ProvisioningGatewayServlet
            11:39:34,578 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.mportal.contentinterface.startup.CIListnerServlet
            11:39:34,593 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.mportal.webapi.router.ContentRetrievalListener
            11:39:34,593 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: com.mportal.contentinterface.startup.CITesting
            11:39:34,640 INFO [ProxyFactory] Bound EJB Home 'SM.beanManaged.WirelessDeviceProfileHome' to jndi 'SM.beanManaged.WirelessDeviceProfileHome'
            11:39:35,109 INFO [ProxyFactory] Bound EJB Home 'SM.beanManaged.WirelessDeviceProfileRWHome' to jndi 'SM.beanManaged.WirelessDeviceProfileRWHome'
            11:39:35,140 INFO [ProxyFactory] Bound EJB Home 'SM.device.CommEndPointHome' to jndi 'SM.device.CommEndPointHome'
            11:39:35,156 INFO [ProxyFactory] Bound EJB Home 'SM.device.CommEndPointRWHome' to jndi 'SM.device.CommEndPointRWHome'
            11:39:35,187 INFO [ProxyFactory] Bound EJB Home 'SM.user.UserHome' to jndi 'SM.user.UserHome'
            11:39:35,187 INFO [ProxyFactory] Bound EJB Home 'SM.user.UserRWHome' to jndi 'SM.user.UserRWHome'
            11:39:35,203 INFO [ProxyFactory] Bound EJB Home 'SM.Stateful.CustomServiceBean' to jndi 'SM.Stateful.CustomServiceBean'
            11:39:35,234 INFO [ProxyFactory] Bound EJB Home 'SM.chat.MessageHome' to jndi 'SM.chat.MessageHome'
            11:39:35,250 INFO [ProxyFactory] Bound EJB Home 'SM.contactlist.ContactListHome' to jndi 'SM.contactlist.ContactListHome'
            11:39:35,281 INFO [ProxyFactory] Bound EJB Home 'SM.custom.CustomServiceNotifierHome' to jndi 'SM.custom.CustomServiceNotifierHome'
            11:39:35,296 INFO [ProxyFactory] Bound EJB Home 'SM.device.DeviceDirectoryHome' to jndi 'SM.device.DeviceDirectoryHome'
            11:39:35,312 INFO [ProxyFactory] Bound EJB Home 'SM.device.NetworkDirectoryHome' to jndi 'SM.device.NetworkDirectoryHome'
            11:39:35,328 INFO [ProxyFactory] Bound EJB Home 'SM.sequence.OIDGenerator' to jndi 'SM.sequence.OIDGenerator'
            11:39:35,390 INFO [ProxyFactory] Bound EJB Home 'SM.service.ServiceDirectoryHome' to jndi 'SM.service.ServiceDirectoryHome'
            11:39:35,406 INFO [ProxyFactory] Bound EJB Home 'SM.session.UserSessionHome' to jndi 'SM.session.UserSessionHome'
            11:39:35,421 INFO [ProxyFactory] Bound EJB Home 'SM.transfer.FileTransferHome' to jndi 'SM.transfer.FileTransferHome'
            11:39:35,484 INFO [ProxyFactory] Bound EJB Home 'SM.user.UserDirectoryHome' to jndi 'SM.user.UserDirectoryHome'
            11:39:35,812 INFO [ProxyFactory] Bound EJB Home 'SM.action.RefusableActionManagerHome' to jndi 'SM.action.RefusableActionManagerHome'
            11:39:35,843 INFO [ProxyFactory] Bound EJB Home 'SM.session.PublicAccessUserSessionHome' to jndi 'SM.session.PublicAccessUserSessionHome'
            11:39:35,859 INFO [ProxyFactory] Bound EJB Home 'SM.service.ServiceRouterHome' to jndi 'SM.service.ServiceRouterHome'
            11:39:35,859 INFO [EJBDeployer] Deployed: file:/D:/CDM564/common/local/modules/dsm/deploy/dsm.ear/dsm.jar
            11:39:36,093 INFO [TomcatDeployer] deploy, ctxPath=/dsm, warUrl=file:/D:/CDM564/common/local/modules/dsm/deploy/dsm.ear/web.war/
            11:39:36,687 INFO [STDOUT] Exception occured: java.lang.NullPointerException
            11:39:36,687 INFO [STDOUT] Exception occured: java.io.FileNotFoundException: D:\CDM564\common\local\modules\dsm\logs\spg\spg080107_113936.log (The system cannot find the path specified)
            11:39:36,687 INFO [STDOUT] Exception occured: java.lang.NullPointerException
            11:39:36,687 INFO [STDOUT] Exception occured: java.io.FileNotFoundException: D:\CDM564\common\local\modules\dsm\logs\edr\edr080107_113936.log (The system cannot find the path specified)
            11:39:36,687 INFO [STDOUT] Exception occured: java.lang.NullPointerException
            11:39:36,687 INFO [STDOUT] Exception occured: java.io.FileNotFoundException: D:\CDM564\common\local\modules\dsm\logs\edr\status080107_113936.log (The system cannot find the path specified)
            11:39:37,562 INFO [STDOUT] jndiHomeInterfaceName::::::::SM.service.ServiceDirectoryHome
            11:39:37,609 INFO [STDOUT] lookup::::::::SM.service.ServiceDirectoryHomeHome
            11:39:37,609 ERROR [STDERR] java.lang.ClassCastException: $Proxy97
            11:39:37,609 ERROR [STDERR] at com.mportal.api.home_factory.AbstractHomeInterfaceFactory.getHomeInterface(AbstractHomeInterfaceFactory.java:867)
            11:39:37,609 ERROR [STDERR] at com.mportal.api.home_factory.AbstractHomeInterfaceFactory.getServiceDirectoryHome(AbstractHomeInterfaceFactory.java:292)
            11:39:37,609 ERROR [STDERR] at com.mportal.server.startup.mPortalStartup.initializeServer(mPortalStartup.java:134)
            11:39:37,609 ERROR [STDERR] at com.mportal.server.startup.mPortalStartupServlet.init(mPortalStartupServlet.java:18)
            11:39:37,625 ERROR [STDERR] at javax.servlet.GenericServlet.init(GenericServlet.java:212)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
            11:39:37,625 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            11:39:37,625 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            11:39:37,625 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            11:39:37,625 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            11:39:37,625 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            11:39:37,625 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
            11:39:37,625 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            11:39:37,625 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            11:39:37,625 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            11:39:37,625 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            11:39:37,625 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            11:39:37,625 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
            11:39:37,625 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
            11:39:37,625 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
            11:39:37,625 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
            11:39:37,625 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
            11:39:37,625 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
            11:39:37,625 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
            11:39:37,625 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
            11:39:37,625 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            11:39:37,625 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            11:39:37,625 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            11:39:37,640 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            11:39:37,640 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            11:39:37,640 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            11:39:37,640 ERROR [STDERR] at $Proxy0.start(Unknown Source)
            11:39:37,640 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
            11:39:37,640 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            11:39:37,640 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            11:39:37,640 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)


            Here is the code , while typecast the above exception is coming
            home = (EJBHome)getInitialContext().lookup( "SM.service.ServiceDirectoryHome" );

            Please suggest on this.