[jboss-dev-forums] [JBoss ESB Development] - org.apache.ws.scout.transport.TransportException: java.lang.IllegalArgumentException: object is not an instance of declaring class

Rajnish Kumar do-not-reply at jboss.com
Fri Mar 16 13:04:07 EDT 2012


Rajnish Kumar [https://community.jboss.org/people/rajnish.kumar.76] created the discussion

"org.apache.ws.scout.transport.TransportException: java.lang.IllegalArgumentException: object is not an instance of declaring class"

To view the discussion, visit: https://community.jboss.org/message/724385#724385

--------------------------------------------------------------
Hi,
I am trying to call a ESB service from a client. I get below error, any help would be appreciated.

Client side code :-

private void sendMessage() throws Exception{
  System.setProperty("javax.xml.registry.ConnectionFactoryClass",
                "org.apache.ws.scout.registry.ConnectionFactoryImpl");
  ServiceInvoker invoker = new ServiceInvoker("JBOSSESBTest.FirstServiceESB","Simple Test Service");
  System.out.println("ServiceInvoker obtained: "+invoker);
  Message message = MessageFactory.getInstance().getMessage();
  message.getBody().add(" Hi there - Message from Transport Agnostic Service Client");
  invoker.deliverAsync(message);
 }

Client side configuration :-

<properties name="registry">
     <!-- property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService#inquire" /-->
*<property name="org.jboss.soa.esb.registry.queryManagerURI" value="jnp://localhost:1099/juddiv3/UDDIInquiryService?org.apache.juddi.v3.client.transport.wrapper.UDDIInquiryService#inquire" />*
     <!-- property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService#publish" /-->
     <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
     <!-- property name="org.jboss.soa.esb.registry.securityManagerURI" value="org.apache.juddi.v3.client.transport.wrapper.UDDISecurityService#secure" /-->
  <property name="org.jboss.soa.esb.registry.securityManagerURI" value="jnp://localhost:1099/SecurityService?org.apache.juddi.registry.rmi.Security#secure" />
     <property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl" />
     <property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl" />
     <property name="org.jboss.soa.esb.registry.user" value="****" />
     <property name="org.jboss.soa.esb.registry.password" value="******" />

     <!-- property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport" /-->
     <property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.RMITransport" />

 <property name="org.jboss.soa.esb.scout.proxy.uddiVersion" value="3.0" />
 <property name="org.jboss.soa.esb.scout.proxy.uddiNameSpace" value="urn:uddi-org:api_v3" />
        <property name="org.jboss.soa.esb.registry.interceptors" value="org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor, org.jboss.internal.soa.esb.services.registry.CachingRegistryInterceptor" />
        <property name="org.jboss.soa.esb.registry.cache.maxSize" value="100" />
        <property name="org.jboss.soa.esb.registry.orgCategory" value="org.jboss.soa.esb.:category" />
</properties>

Error :-
Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.IllegalArgumentException: object is not an instance of declaring class
 at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:535)
 at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:795)
 at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:327)
 ... 7 more


If I change the above line as below then I get a diff error.
<property name="org.jboss.soa.esb.registry.queryManagerURI" value="jnp://localhost:1099/juddiv3/UDDIInquiryService?org.apache.juddi.rmi.UDDIInquiryService#inquire" />

Error changes to :-
Caused by: javax.xml.registry.JAXRException: org.apache.ws.scout.transport.TransportException: java.lang.NoSuchMethodException: org.apache.juddi.rmi.UDDIInquiryService.inquire(org.w3c.dom.Element)
 at org.apache.ws.scout.registry.BusinessQueryManagerV3Impl.findConcepts(BusinessQueryManagerV3Impl.java:535)
 at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.getJBossESBTModel(JAXRRegistryImpl.java:795)
 at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:327)
 ... 7 more

Same service works when called from the same server instance from a jsp. JSP code snippet as below :-
<%
    try {
      ServiceInvoker invoker = new ServiceInvoker("JBOSSESBTest.FirstServiceESB","Simple Test Service");
   Message message = MessageFactory.getInstance().getMessage();
 
   message.getBody().add(" Hi there - Message from Transport Agnostic Service Client");
   invoker.deliverAsync(message);
        } catch (Exception e) {
        out.println("Caught Exception: " + e);
    }
%>


Any thoughts from JBOSS ESB Gurus what could be wrong... Please dont suggest me to use WS to call the service, I want to try the RMI before trying for WS.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/724385#724385]

Start a new discussion in JBoss ESB Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120316/1304dac7/attachment.html 


More information about the jboss-dev-forums mailing list