1 Reply Latest reply on May 19, 2005 5:25 PM by Evan Ruff

    Slight Naminng Problem implementing IIOP

    Evan Ruff Newbie

      Hello,

      Currently I have a J2EE app running with several EJBs. All of the EJBs deploy correctly and work without problems. (JBoss 4.0.1)

      I'm currently attempting to distribute this application using two servers and am having a little trouble getting jboss.xml to work correctly. Currently, there is no jboss.xml for any beans as they all are using the standard behavior.

      When I added in the jboss.xml file, working off some simple examples, it complains that it cannot find the JNDI name.

      In the application, I use the path: "java:comp/env/ejb/Order" to retrive the reference to the EJB, then I narrow to get the home object.

      Currently, the jboss.xml references look like this:
      <ejb-name>Order</ejb-name>
      <jndi-name>Order</jndi-name>
      And upon deployment, it say that it cannot find the JNDI name. I have tried every combination that I can think of to find this bean, but it always says the JNDI name is incorrect:

      [ServiceController] Problem creating service jboss.j2ee:jndiName=Order,service=EJB
      java.lang.NoClassDefFoundError: org/apache/struts/action/ActionMessage

      What exactly am I doing wrong here?

      When I run the application without any of the jboss.xml descriptors in it, then go to the JMX-Console and view the tree, it puts the OrderEJB directly under the Namespace for the application at the top of the tree, but still, I can't seem to get ahold of it.

      I really appreciate any help you could give me with this matter.

      Thanks,
      Evan Ruff




      ------------------ ejb-jar.xml -------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >
      Resource Mapping Information for OrderEJB
      <display-name>EJB-Jar.xml</display-name>

      <enterprise-beans>

      EJB returns Order Information>
      <display-name>Order EJB</display-name>
      <ejb-name>Order</ejb-name>
      orderEJB.ejb.interfaces.OrderHome
      orderEJB.ejb.interfaces.Order
      <ejb-class>orderEJB.ejb.bean.OrderService</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>

      <ejb-ref>
      EJB Reference to Inventory EJB
      <ejb-ref-name>ejb/Inventory</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      inventoryEJB.ejb.interfaces.InventoryHome
      inventoryEJB.ejb.interfaces.Inventory
      <ejb-link>Inventory</ejb-link>
      </ejb-ref>

      </enterprise-beans>
      <assembly-descriptor >
      </assembly-descriptor>
      </ejb-jar>



      ----------------------- jboss.xml ------------------------

      <enterprise-beans>

      <ejb-name>Order</ejb-name>
      <jndi-name>java/Order</jndi-name>
      <configuration-name>Standard Stateless SessionBean</configuration-name>
      <invoker-bindings>

      <invoker-proxy-binding-name>iiop</invoker-proxy-binding-name>

      </invoker-bindings>

      </enterprise-beans>

        • 1. Re: Slight Naminng Problem implementing IIOP
          Evan Ruff Newbie

          Upon further review, it may not be the JNDI name that is throwing the wrench in the works.

          I removed the section of the jboss.xml and redeployed the app. It runs as expected now and all EJB lookups/calls work.

          When I reintroduce the section I get the following stack trace when attempting to deploy the app:


          17:24:10,223 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=Order,service=EJB
          java.lang.NoClassDefFoundError: org/apache/struts/action/ActionMessage
          at java.lang.Class.getDeclaredMethods0(Native Method)
          at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
          at java.lang.Class.getDeclaredMethods(Class.java:1763)
          at org.jboss.iiop.rmi.ContainerAnalysis.analyzeMethods(ContainerAnalysis.java:435)
          at org.jboss.iiop.rmi.ContainerAnalysis.doAnalyze(ContainerAnalysis.java:183)
          at org.jboss.iiop.rmi.ValueAnalysis.doAnalyze(ValueAnalysis.java:87)
          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.jboss.iiop.rmi.WorkCacheManager.doTheWork(WorkCacheManager.java:183)
          at org.jboss.iiop.rmi.WorkCacheManager.getAnalysis(WorkCacheManager.java:106)
          at org.jboss.iiop.rmi.ValueAnalysis.getValueAnalysis(ValueAnalysis.java:62)
          at org.jboss.iiop.rmi.Util.getTypeIDLName(Util.java:134)
          at org.jboss.iiop.rmi.ParameterAnalysis.(ParameterAnalysis.java:43)
          at org.jboss.iiop.rmi.OperationAnalysis.(OperationAnalysis.java:81)
          at org.jboss.iiop.rmi.InterfaceAnalysis.analyzeOperations(InterfaceAnalysis.java:157)
          at org.jboss.iiop.rmi.ContainerAnalysis.doAnalyze(ContainerAnalysis.java:189)
          at org.jboss.iiop.rmi.InterfaceAnalysis.doAnalyze(InterfaceAnalysis.java:84)
          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.jboss.iiop.rmi.WorkCacheManager.doTheWork(WorkCacheManager.java:183)
          at org.jboss.iiop.rmi.WorkCacheManager.getAnalysis(WorkCacheManager.java:106)
          at org.jboss.iiop.rmi.InterfaceAnalysis.getInterfaceAnalysis(InterfaceAnalysis.java:70)
          at org.jboss.proxy.ejb.IORFactory.create(IORFactory.java:278)
          at org.jboss.ejb.SessionContainer.createInvokers(SessionContainer.java:349)
          at org.jboss.ejb.SessionContainer.createService(SessionContainer.java:158)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:238)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:220)
          at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
          at $Proxy0.create(Unknown Source)
          at org.jboss.system.ServiceController.create(ServiceController.java:328)
          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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy50.create(Unknown Source)
          at org.jboss.ejb.EjbModule.createService(EjbModule.java:364)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:238)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:220)
          at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
          at $Proxy0.create(Unknown Source)
          at org.jboss.system.ServiceController.create(ServiceController.java:328)
          at org.jboss.system.ServiceController.create(ServiceController.java:273)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy22.create(Unknown Source)
          at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:584)
          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
          at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
          at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy8.deploy(Unknown Source)
          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
          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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
          at $Proxy0.start(Unknown Source)
          at org.jboss.system.ServiceController.start(ServiceController.java:416)
          at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy4.start(Unknown Source)
          at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
          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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
          at $Proxy5.deploy(Unknown Source)
          at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
          at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
          at org.jboss.Main.boot(Main.java:162)
          at org.jboss.Main$1.run(Main.java:423)
          at java.lang.Thread.run(Thread.java:595)

          *phew* that's a big one...

          Is there something I'm missing that I need to migrate to IIOP? Does the class implementation have to change? What is the link that I'm missing here?

          Thanks,
          Evan Ruff