[JBoss Web Services] - ClassCastException in JAXWS-Handler
by Bernd Franke
Bernd Franke [http://community.jboss.org/people/franbekh] created the discussion
"ClassCastException in JAXWS-Handler"
To view the discussion, visit: http://community.jboss.org/message/550513#550513
--------------------------------------------------------------
Hello,
I'm using JBoss 5.1.0 and JBossWS-Metro 3.2.2. In our application we have deployed Web Services in
the EJB container and the web container. Within the SOAPHandler I put a Java class in the SOAPMessageContext in
order to read it in my business logic implementation. We are using the same jaxws handlers for the web services
deployed in the ejb container and the web container. Everything works fine in the ejb container. Within the handler
deployed in the web container I get a strange ClassCastException:
07:34:33,541 SEVERE [EndpointMethodHandler] aaa.aa.types.User cannot be aaa.aa.types.User
It seems that the handler has another class loader as the implementation at the web container! Within the debugger
the two classes have different IDs.
Does anybody know what went wrong? If it is a class loader problem how can I configure the JBoss Web Class Loader?
Thanks for your help in advance,
Bernd
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550513#550513]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 9 months
[JBoss Microcontainer] - How to handle character arrays in xml
by Ben Schofield
Ben Schofield [http://community.jboss.org/people/dbschofield] created the discussion
"How to handle character arrays in xml"
To view the discussion, visit: http://community.jboss.org/message/550497#550497
--------------------------------------------------------------
<bean name="ValueBean">
<constructor>
<parameter>someValue</parameter>
</constructor>
</bean>
<bean name="StringBean" class="java.lang.String">
<constructor>
<parameter>
<value-factory bean="ValueBean" method="toCharArray"/>
</parameter>
</constructor>
</bean>
I am trying to create String named StringBean that gets created using the toCharArray method of the ValueBean. The toCharArray method returns a char[] with value "someValue". When I start JBoss I get the following error.
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.lang.String] actual=[[C]
at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)
at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)
at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)
at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.createTarget(AOPConstructorJoinpoint.java:295)
at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:116)
...
How do I properly handle a character array to initialize a string object in xml? I am using version 2.0.9.GA shipped with JBoss EAP 5.0.1.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550497#550497]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 9 months