You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Pattabiraman Meenakshisundaram (JIRA)" <ji...@apache.org> on 2008/04/02 14:51:25 UTC

[jira] Created: (AXIS2-3694) ClassCastException while invoking ServiceClient

ClassCastException while invoking ServiceClient
-----------------------------------------------

                 Key: AXIS2-3694
                 URL: https://issues.apache.org/jira/browse/AXIS2-3694
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: client-api
         Environment: Rational Application Developer 7.5 (beta) with IBM Websphere 6.1 on Windows 
            Reporter: Pattabiraman Meenakshisundaram
            Priority: Minor


I am not sure whether it is a bug or problem with my code/environment. Here is my  original posting in the Nabble - http://www.nabble.com/ServiceClient-and-ClassCastException-tt16418344.html#a16442092

I am new to Axis/Axis2 and based on the documents I created a SoapClient to consume service from external site using Axis2 API . 
I tried creating anonymous ServiceClient as well as using the WSDL. I am getting classcastexception on both occassions.

The line that gives error:
		ServiceClient sender = new ServiceClient(null,new URL(WSDL_URL),new QName("MYSERVICE"),"MYOPERATION");		

Exception Stacktrace:

Caused by: java.lang.ClassCastException:
 org.apache.axiom.om.impl.llom.OMTextImpl incompatible with
 org.apache.axiom.om.impl.OMNodeEx
 at
 org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:275)
 at
 org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
 at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
 .........
 at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
 at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:228)
 ... 



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3694) ClassCastException while invoking ServiceClient

Posted by "Dustin Amrhein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586899#action_12586899 ] 

Dustin Amrhein commented on AXIS2-3694:
---------------------------------------

This looks similar to other problems we have seen in the past when using Axis2 in a WebSphere environment. Is this client running within the server? If so, have you changed the classloading policy of the application module containing this client? It would need to be updated such that the parent classloader was used last.

> ClassCastException while invoking ServiceClient
> -----------------------------------------------
>
>                 Key: AXIS2-3694
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3694
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>         Environment: Rational Application Developer 7.5 (beta) with IBM Websphere 6.1 on Windows 
>            Reporter: Pattabiraman Meenakshisundaram
>            Priority: Minor
>
> I am not sure whether it is a bug or problem with my code/environment. Here is my  original posting in the Nabble - http://www.nabble.com/ServiceClient-and-ClassCastException-tt16418344.html#a16442092
> I am new to Axis/Axis2 and based on the documents I created a SoapClient to consume service from external site using Axis2 API . 
> I tried creating anonymous ServiceClient as well as using the WSDL. I am getting classcastexception on both occassions.
> The line that gives error:
> 		ServiceClient sender = new ServiceClient(null,new URL(WSDL_URL),new QName("MYSERVICE"),"MYOPERATION");		
> Exception Stacktrace:
> Caused by: java.lang.ClassCastException:
>  org.apache.axiom.om.impl.llom.OMTextImpl incompatible with
>  org.apache.axiom.om.impl.OMNodeEx
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:275)
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
>  at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
>  .........
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:228)
>  ... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3694) ClassCastException while invoking ServiceClient

Posted by "Pattabiraman Meenakshisundaram (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586886#action_12586886 ] 

Pattabiraman Meenakshisundaram commented on AXIS2-3694:
-------------------------------------------------------

I am getting this error only when I deploy it on the Websphere App Server. It is the very first line of Axis2 code where I create a new ServiceClient.
The same code works fine when I run as a standalone in RAD IDE. I do not know why am I getting this Axiom specific error in  the server. 
I assumed that Axiom jar is specific to Axis2 and hence posted the query. If it is referred elsewhere, then I would check the classpath.

IDE: RAD 7.5 beta
App. Server: Websphere 6.1 with Fixpack 13. 


 

> ClassCastException while invoking ServiceClient
> -----------------------------------------------
>
>                 Key: AXIS2-3694
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3694
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>         Environment: Rational Application Developer 7.5 (beta) with IBM Websphere 6.1 on Windows 
>            Reporter: Pattabiraman Meenakshisundaram
>            Priority: Minor
>
> I am not sure whether it is a bug or problem with my code/environment. Here is my  original posting in the Nabble - http://www.nabble.com/ServiceClient-and-ClassCastException-tt16418344.html#a16442092
> I am new to Axis/Axis2 and based on the documents I created a SoapClient to consume service from external site using Axis2 API . 
> I tried creating anonymous ServiceClient as well as using the WSDL. I am getting classcastexception on both occassions.
> The line that gives error:
> 		ServiceClient sender = new ServiceClient(null,new URL(WSDL_URL),new QName("MYSERVICE"),"MYOPERATION");		
> Exception Stacktrace:
> Caused by: java.lang.ClassCastException:
>  org.apache.axiom.om.impl.llom.OMTextImpl incompatible with
>  org.apache.axiom.om.impl.OMNodeEx
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:275)
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
>  at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
>  .........
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:228)
>  ... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3694) ClassCastException while invoking ServiceClient

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585485#action_12585485 ] 

Deepal Jayasinghe commented on AXIS2-3694:
------------------------------------------

Can you please attach whatever necessary to recreate the issue.

Thank you!
Deepal

> ClassCastException while invoking ServiceClient
> -----------------------------------------------
>
>                 Key: AXIS2-3694
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3694
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>         Environment: Rational Application Developer 7.5 (beta) with IBM Websphere 6.1 on Windows 
>            Reporter: Pattabiraman Meenakshisundaram
>            Priority: Minor
>
> I am not sure whether it is a bug or problem with my code/environment. Here is my  original posting in the Nabble - http://www.nabble.com/ServiceClient-and-ClassCastException-tt16418344.html#a16442092
> I am new to Axis/Axis2 and based on the documents I created a SoapClient to consume service from external site using Axis2 API . 
> I tried creating anonymous ServiceClient as well as using the WSDL. I am getting classcastexception on both occassions.
> The line that gives error:
> 		ServiceClient sender = new ServiceClient(null,new URL(WSDL_URL),new QName("MYSERVICE"),"MYOPERATION");		
> Exception Stacktrace:
> Caused by: java.lang.ClassCastException:
>  org.apache.axiom.om.impl.llom.OMTextImpl incompatible with
>  org.apache.axiom.om.impl.OMNodeEx
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:275)
>  at
>  org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
>  at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
>  .........
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:139)
>  at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:228)
>  ... 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org