1 Reply Latest reply on Jan 22, 2006 3:41 PM by thomas.diesler

    Problem accessing a referenced web service from an ejb

      Hello,

      I am using JBoss-4.0.3sp1 and Jdk 1.5.
      I created the hello web service following the example in the Admin Guide. All is working and I can access to this wbe service from the two Clients described in the example at page 421 and 422.
      At this point I developed an EJB to access to my web service using the Service reference as described at pag. 423. I wrote my code and I deployed it. But at runtime I have the following exception: (I checked the file Hello.xml, this is the mapping file, and all is ok. Is there someone that has tried this example and is able to explain me the problem?

      Many thanks and bye,
      Giordano

      2006-01-17 09:19:18,093 INFO [STDOUT] javax.naming.NamingException: Could not dereference object [Root exception is java.lang.IllegalStateException: Cannot find resource: /META-INF/Hello.xml]
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1135)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:690)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      2006-01-17 09:19:18,093 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:351)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.HelloClientBean.callSaluto(HelloClientBean.java:37)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-01-17 09:19:18,093 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-01-17 09:19:18,093 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-01-17 09:19:18,093 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.rmi.transport.Transport$1.run(Transport.java:153)
      2006-01-17 09:19:18,093 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      2006-01-17 09:19:18,093 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      2006-01-17 09:19:18,093 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
      2006-01-17 09:19:18,093 INFO [STDOUT] Caused by: java.lang.IllegalStateException: Cannot find resource: /META-INF/Hello.xml
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.webservice.metadata.serviceref.ServiceRefMetaData.getJavaWsdlMappingURL(ServiceRefMetaData.java:111)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.webservice.metadata.serviceref.ServiceRefMetaData.getJavaWsdlMapping(ServiceRefMetaData.java:118)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.webservice.client.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:133)
      2006-01-17 09:19:18,093 INFO [STDOUT] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1110)
      2006-01-17 09:19:18,093 INFO [STDOUT] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1127)
      2006-01-17 09:19:18,093 INFO [STDOUT] ... 45 more

        • 1. Re: Problem accessing a referenced web service from an ejb
          thomas.diesler

           

          2006-01-17 09:19:18,093 INFO [STDOUT] Caused by: java.lang.IllegalStateException: Cannot find resource: /META-INF/Hello.xml
          2006-01-17 09:19:18,093 INFO [STDOUT] at org.jboss.webservice.metadata.serviceref.ServiceRefMetaData.getJavaWsdlMappingURL(ServiceRefMetaData.java:111)
          


          The mapping file is probably missing from the ejb deployment