glassfish
  1. glassfish
  2. GLASSFISH-17017

javax.naming.NameNotFoundException: UserManager not found er Glassfiror getting while migrating my ear application from Jboss to Glassfish

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: future release
    • Component/s: naming
    • Labels:
      None
    • Environment:

      Glassfish(Iam migrating my Jboss EAR application to Glassfish server

      Description

      Iam getting below error.
      javax.naming.NameNotFoundException: UserManager not found error while migrating my ear application from Jboss to Glassfish

      1. DAOConnectionManager.java
        1 kB
        gtulasidhar
      2. server.log
        35 kB
        gtulasidhar
      3. UserRemoteService.java
        7 kB
        gtulasidhar
      1. screenshot-1.jpg
        203 kB

        Activity

        Hide
        Cheng Fang added a comment -

        Your global jndi names are wrong. The easiest way is to copy from server.log after deploy:

              cachedRemoteHome = (UserManagerHome)lookupHome(null, "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerHome", UserManagerHome.class);
        
            return (UserManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerHome", UserManagerHome.class);
        
              cachedLocalHome = (UserManagerLocalHome)lookupHome(null, "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerLocalHome", UserManagerLocalHome.class);
        
        
        
              cachedRemoteHome = (TaskManagerHome)lookupHome(null, "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerHome", TaskManagerHome.class);
        
            return (TaskManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerHome", TaskManagerHome.class);
        
              cachedLocalHome = (TaskManagerLocalHome)lookupHome(null, "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerLocalHome", TaskManagerLocalHome.class);
        
        
        
              cachedRemoteHome = (WorklistManagerHome)lookupHome(null, "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerHome", WorklistManagerHome.class);
        
            return (WorklistManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerHome", WorklistManagerHome.class);
        
              cachedLocalHome = (WorklistManagerLocalHome)lookupHome(null, "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerLocalHome", WorklistManagerLocalHome.class);
        
        Show
        Cheng Fang added a comment - Your global jndi names are wrong. The easiest way is to copy from server.log after deploy: cachedRemoteHome = (UserManagerHome)lookupHome( null , "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerHome" , UserManagerHome.class); return (UserManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerHome" , UserManagerHome.class); cachedLocalHome = (UserManagerLocalHome)lookupHome( null , "java:global/sawfish/sawfishejb/UserManager!com.gehc.sf.user.ejb.UserManagerLocalHome" , UserManagerLocalHome.class); cachedRemoteHome = (TaskManagerHome)lookupHome( null , "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerHome" , TaskManagerHome.class); return (TaskManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerHome" , TaskManagerHome.class); cachedLocalHome = (TaskManagerLocalHome)lookupHome( null , "java:global/sawfish/sawfishejb/TaskManager!com.gehc.sf.task.ejb.TaskManagerLocalHome" , TaskManagerLocalHome.class); cachedRemoteHome = (WorklistManagerHome)lookupHome( null , "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerHome" , WorklistManagerHome.class); return (WorklistManagerHome)lookupHome(paramHashtable, "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerHome" , WorklistManagerHome.class); cachedLocalHome = (WorklistManagerLocalHome)lookupHome( null , "java:global/sawfish/sawfishejb/WorklistManager!com.gehc.sf.worklist.ejb.WorklistManagerLocalHome" , WorklistManagerLocalHome.class);
        Hide
        gtulasidhar added a comment -

        Hi,
        I have attached latest server log kindly help me on this issue.I guess iam doing some wrong in xml files.

        Thanks,
        Tulasidhar

        Show
        gtulasidhar added a comment - Hi, I have attached latest server log kindly help me on this issue.I guess iam doing some wrong in xml files. Thanks, Tulasidhar
        Hide
        gtulasidhar added a comment -

        Hi,
        Iam able to see in Jndi tree browsing UserManager bound i have attached same.Kindly help me on this where i need to correct please.

        Thanks,
        Tualsidha

        Show
        gtulasidhar added a comment - Hi, Iam able to see in Jndi tree browsing UserManager bound i have attached same.Kindly help me on this where i need to correct please. Thanks, Tualsidha
        Hide
        Cheng Fang added a comment -

        the portable global jndi names I used in these steps are available in GlassFish v3.x, not in v2.x.
        I'd suggest to upgrade to 3.1 or 3.1.1. To make the migration work w/ GlassFish v2.x, you will need to
        declare <ejb-ref> in web.xml and ejb-jar.xml, and look up the ejb-ref.

        Show
        Cheng Fang added a comment - the portable global jndi names I used in these steps are available in GlassFish v3.x, not in v2.x. I'd suggest to upgrade to 3.1 or 3.1.1. To make the migration work w/ GlassFish v2.x, you will need to declare <ejb-ref> in web.xml and ejb-jar.xml, and look up the ejb-ref.
        Hide
        gtulasidhar added a comment - - edited

        Thanks for update.Our's is shared environment, so I need to work on Glassfish v2.x only. Kindly give me for this version web.xml and ejb-jar.xml files (if possible accordingly my project).when iam trying getting below error.
        Thanks,
        Tulasidhar

        SEVERE: Exception occured in J2EEC Phasejava.io.IOException: Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar].
        com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [sawfish] – Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar].
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406)
        at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359)
        at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:226)
        at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
        at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390)
        at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373)
        at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
        at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
        at $Proxy1.invoke(Unknown Source)
        at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
        at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
        at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
        Caused by: java.io.IOException: Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar].
        at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:345)
        at com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:527)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:450)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:836)
        at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:794)
        at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:365)
        ... 32 more

        Show
        gtulasidhar added a comment - - edited Thanks for update.Our's is shared environment, so I need to work on Glassfish v2.x only. Kindly give me for this version web.xml and ejb-jar.xml files (if possible accordingly my project).when iam trying getting below error. Thanks, Tulasidhar SEVERE: Exception occured in J2EEC Phasejava.io.IOException: Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar] . com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [sawfish] – Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar] . at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:406) at com.sun.enterprise.deployment.backend.AppDeployerBase.loadDescriptors(AppDeployerBase.java:359) at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:226) at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:148) at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:208) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:390) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:373) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:170) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495) at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270) at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Caused by: java.io.IOException: Error parsing descriptor Deployment descriptor file META-INF/sun-ejb-jar.xml in archive [sawfish_EJB.jar] . at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:345) at com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:527) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:450) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:836) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:794) at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:365) ... 32 more

          People

          • Assignee:
            Cheng Fang
            Reporter:
            gtulasidhar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: