Topic
  • 5 replies
  • Latest Post - ‏2013-06-26T13:49:50Z by e_yuen
Jimbono05
Jimbono05
6 Posts

Pinned topic EJB Application Deployment through eclipse and WAS8.5 plug in not working

‏2013-06-25T13:12:24Z |

 

Hi,
 
I am tryinjg to deply an EJB application through eclipse using the WAS 8.5 Developer Tools Plug In. I have a local version of WAS8.5 installed on my PC and have pointed eclipse at it.
 
Everytime I do "run on server" i get the following stack trace.
 
I am able to "Export as Ear" my EJB project directly from eclipse and install it on my local WAS8.5 server without any issues. 
 
I eventually have pinned it down to the selection of "Deploy enterprise beans" during a manual ear installation. It is already preselected, so I don't actually have to choose it, but if I deselect it during manual ear installation I get the below stack trace as I would during an eclipse "run on server" deployment.
 
So basically it looks like the eclipse "run on server" is no selecting this option for me automatically. Is the somewhere in the deployment .xmi files that I can set this option?
 
Kind regards in advance,
 
Jim
 
[25/06/13 13:09:39:041 BST] 00000039 webapp        E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally SRVE0266E: Error occured while initializing servlets: {0}
                                 javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:398)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1341)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:588)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:559)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:424)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1170)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:638)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:769)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1364)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2169)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5429)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5555)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1482)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1371)
at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1320)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.remote.AdminServiceForwarder.invoke(AdminServiceForwarder.java:346)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1438)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:83)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1276)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1371)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:799)
at javax.management.remote.rmi._RMIConnectionImpl_Tie.invoke(_RMIConnectionImpl_Tie.java:751)
at javax.management.remote.rmi._RMIConnectionImpl_Tie._invoke(_RMIConnectionImpl_Tie.java:158)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:669)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:523)
at com.ibm.rmi.iiop.ORB.process(ORB.java:523)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1575)
at com.ibm.rmi.iiop.Connection.doRequestWork(Connection.java:2992)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2875)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:64)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)
Caused by: java.lang.RuntimeException: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ejs.container.ContainerEJBException: Could not get EJBLocalHome; nested exception is: com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded]]
at com.ag.ec.sas.web.support.Access.getResourceConfigs(Access.java:89)
at com.ag.ec.sas.web.controller.CustomActionServlet.init(CustomActionServlet.java:129)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:336)
... 81 more
Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ejs.container.ContainerEJBException: Could not get EJBLocalHome; nested exception is: com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded]]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1103)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:181)
at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:850)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1454)
at com.ibm.ws.naming.java.javaURLContextImpl.lookupExt(javaURLContextImpl.java:477)
at com.ibm.ws.naming.java.javaURLContextRoot.lookupExt(javaURLContextRoot.java:485)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:370)
at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
at javax.naming.InitialContext.lookup(InitialContext.java:436)
at com.ag.ec.sas.dataaccess.EJBHelper.getEJBLocalHome(EJBHelper.java:31)
at com.ag.ec.sas.dataaccess.EJBManagerHelper.getSystemLocal(EJBManagerHelper.java:23)
at com.ag.ec.sas.usecases.system.GetResourcesUC.execute(GetResourcesUC.java:46)
at com.ag.ec.sas.usecases.CacheableUseCase.perform(CacheableUseCase.java:46)
at com.ag.ec.sas.web.support.Access.getResourceConfigs(Access.java:80)
... 84 more
Caused by: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is com.ibm.ejs.container.ContainerEJBException: Could not get EJBLocalHome; nested exception is: com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded]
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:1103)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:181)
at com.ibm.ws.naming.urlbase.UrlContextImpl.processBoundObjectForLookup(UrlContextImpl.java:2008)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookupExt(UrlContextImpl.java:1454)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1425)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1475)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:388)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:227)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:990)
... 97 more
Caused by: com.ibm.ejs.container.ContainerEJBException: Could not get EJBLocalHome; nested exception is: com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded
at com.ibm.ejs.container.EJSContainer.getEJBLocalHome(EJSContainer.java:5948)
at com.ibm.ejs.container.util.EJBInterfaceObjectFactory.getObjectInstance(EJBInterfaceObjectFactory.java:189)
at org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactoryBuilders(ObjectFactoryHelper.java:324)
at org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:87)
at org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:57)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:346)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:993)
... 106 more
Caused by: com.ibm.ejs.container.ContainerEJBException: Unable to initialize deferred EJB.; nested exception is: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime$1.run(AbstractEJBRuntime.java:2427)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime$1.run(AbstractEJBRuntime.java:2357)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.initializeDeferredEJB(AbstractEJBRuntime.java:2356)
at com.ibm.ejs.container.HomeRecord.getHomeAndInitialize(HomeRecord.java:405)
at com.ibm.ejs.container.EJSContainer.getStartedHome(EJSContainer.java:1339)
at com.ibm.ejs.container.EJSContainer.getHomeWrapperCommon(EJSContainer.java:1398)
at com.ibm.ejs.container.EJSContainer.getEJBLocalHome(EJSContainer.java:5943)
... 112 more
Caused by: com.ibm.ejs.container.EJBConfigurationException: Bean class could not be found or loaded
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedImplementationClasses(EJBMDOrchestrator.java:5644)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInitWithReferenceContext(EJBMDOrchestrator.java:1288)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.finishBMDInit(AbstractEJBRuntime.java:2590)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.initializeDeferredEJBImpl(AbstractEJBRuntime.java:2490)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.access$300(AbstractEJBRuntime.java:234)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime$1$1.run(AbstractEJBRuntime.java:2390)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime$1$1.run(AbstractEJBRuntime.java:2384)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5429)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5555)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime$1.run(AbstractEJBRuntime.java:2383)
... 119 more
Caused by: java.lang.ClassNotFoundException: com.ag.ec.sas.ejbs.system.EJSLocalStatelessSystem_651e5917
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:198)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:665)
at java.lang.ClassLoader.loadClass(ClassLoader.java:644)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:583)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedClass(EJBMDOrchestrator.java:5772)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedImplementationClasses(EJBMDOrchestrator.java:5477)
... 129 more
  • e_yuen
    e_yuen
    27 Posts

    Re: EJB Application Deployment through eclipse and WAS8.5 plug in not working

    ‏2013-06-25T13:44:18Z  

    WDT does not support EJB deploy for EJB 2.x.  You can refer to this posting for details: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014884982

    Elson

  • Jimbono05
    Jimbono05
    6 Posts

    Re: EJB Application Deployment through eclipse and WAS8.5 plug in not working

    ‏2013-06-25T14:35:21Z  
    • e_yuen
    • ‏2013-06-25T13:44:18Z

    WDT does not support EJB deploy for EJB 2.x.  You can refer to this posting for details: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014884982

    Elson

    Thanks Elson, that would make sense.

    This used to work with RAD running over WAS6.1....I'm guessing the older version of RAD WDT plug in did support legacy EJBs?

    Jim

  • e_yuen
    e_yuen
    27 Posts

    Re: EJB Application Deployment through eclipse and WAS8.5 plug in not working

    ‏2013-06-25T14:48:03Z  
    • Jimbono05
    • ‏2013-06-25T14:35:21Z

    Thanks Elson, that would make sense.

    This used to work with RAD running over WAS6.1....I'm guessing the older version of RAD WDT plug in did support legacy EJBs?

    Jim

    It is only WDT (including older versions of WDT) that doesn't support older versions of EJB.  RAD still supports it.  Therefore, the described scenario should still work with RAD. 

    Elson

  • Jimbono05
    Jimbono05
    6 Posts

    Re: EJB Application Deployment through eclipse and WAS8.5 plug in not working

    ‏2013-06-26T07:30:25Z  
    • e_yuen
    • ‏2013-06-25T14:48:03Z

    It is only WDT (including older versions of WDT) that doesn't support older versions of EJB.  RAD still supports it.  Therefore, the described scenario should still work with RAD. 

    Elson

    Makes perfect sense Elson. Just one final question....if we upgraded to use EJBs 3.0 or greater would WDT plug in be up for the task?

    (We are unlikely to do this as it's a legacy system, but would be interesting to know).

    Jim 

  • e_yuen
    e_yuen
    27 Posts

    Re: EJB Application Deployment through eclipse and WAS8.5 plug in not working

    ‏2013-06-26T13:49:50Z  
    • Jimbono05
    • ‏2013-06-26T07:30:25Z

    Makes perfect sense Elson. Just one final question....if we upgraded to use EJBs 3.0 or greater would WDT plug in be up for the task?

    (We are unlikely to do this as it's a legacy system, but would be interesting to know).

    Jim 

    Yes, WDT supports it in that case.  Note that if you happens to be using the Liberty profile instead of the full profile, Liberty profile support EJBLite.  You can refer to the information center for details.

    Elson