2 Replies Latest reply on Jun 27, 2011 9:33 AM by Tales Knechtel

    javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]

    Chaminda Amarasinghe Newbie

      Hi Friend

       

      My environment is as below

      OS: Ubuntu

      JDK: 1.6_21

      Jboss : 6.0.0 Final

       

      I have a simple remote SL session bean and standalone client. When I try to access the session bean from client I am getting following exception

       

      javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]

              at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824)

              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

              at javax.naming.InitialContext.lookup(InitialContext.java:392)

              at com.cns.estore.appclient.form.CategoryForm.addButtonMouseClicked(CategoryForm.java:142)

              at com.cns.estore.appclient.form.CategoryForm.access$000(CategoryForm.java:27)

              at com.cns.estore.appclient.form.CategoryForm$1.mouseClicked(CategoryForm.java:83)

              at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)

              at java.awt.Component.processMouseEvent(Component.java:6270)

              at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

              at java.awt.Component.processEvent(Component.java:6032)

              at java.awt.Container.processEvent(Container.java:2041)

              at java.awt.Component.dispatchEventImpl(Component.java:4630)

              at java.awt.Container.dispatchEventImpl(Container.java:2099)

              at java.awt.Component.dispatchEvent(Component.java:4460)

              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)

              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

              at java.awt.Container.dispatchEventImpl(Container.java:2085)

              at java.awt.Window.dispatchEventImpl(Window.java:2478)

              at java.awt.Component.dispatchEvent(Component.java:4460)

              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      Caused by: java.lang.reflect.UndeclaredThrowableException

              at $Proxy0.createProxyBusiness(Unknown Source)

              at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)

              at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)

              at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:161)

              at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

              at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1483)

              at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1500)

              ... 27 more

      Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor

              at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)

              at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)

       

      I could find few similar discussions but could not find exact fix in any. Some says that is a bug of jboss with jdk 6, but that thread is bit old. I think if this is a bug of jboss this should be fixed by now since this has a long history.

       

      If any one of know how to fix this it would be a great help.

       

      PS. I have added jbossall-client and other jars to classpath of client.

       

      Thanks