XFire

Aegis Inheritance support doesn't work with Collection components

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2-RC
  • Fix Version/s: 1.2.1
  • Component/s: Aegis Module
  • Labels:
    None
  • Environment:
    Using Java5 annotations and thus Java5TypeCreator.
  • Number of attachments :
    1

Description

When attempting to provide concrete implementations of interfaces, as described in the last section of http://xfire.codehaus.org/Aegis+Binding, the service picked up the override types correctly. However, when it comes to writing out the types, a bean that contains a List (say) of the overridden interface wasn't overriding these types correctly. What happened was that the outer bean would call AegisBindingProvider.getWriteType(), passing in the List itself. Since this function doesn't inspect the component type of the list, it wasn't possible at this stage for it to notice the types that should be overridden. So off we go into CollectionType.writeObject(), and here it assumes that the Type of all the elements in the list is the same as the declared type.

This is incorrect; my bean had a List<IDataColumn>, so actual members of the List may be SQLColumns, DataAggregateColumns, etc. What was needed was to call AegisBindingProvider.getWriteType(), passing in each element of the list. As it turns out, the superclass ArrayType already did the right thing with its writeValue() method, so the solution seems to be to defer the actual write to this method. I attach a patch that does this, and worked perfectly for me.

Activity

Hide
Dan Diephouse added a comment -

I'm marking this as a duplicate of XFIRE-545, but I will be applying this patch. Thanks!

Show
Dan Diephouse added a comment - I'm marking this as a duplicate of XFIRE-545, but I will be applying this patch. Thanks!
Hide
Timo Rantalaiho added a comment -

I gather from the empty "Fix Version/s" field that this patch did not make it to the 1.2 final?

Show
Timo Rantalaiho added a comment - I gather from the empty "Fix Version/s" field that this patch did not make it to the 1.2 final?
Hide
Dan Diephouse added a comment -

This is fixed in SVN right now for 1.2.1. A build is here if you want to test:

http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20060904.045024-15.jar

Show
Dan Diephouse added a comment - This is fixed in SVN right now for 1.2.1. A build is here if you want to test: http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20060904.045024-15.jar
Hide
Timo Rantalaiho added a comment -

Thankyou! 8 minutes is what I'd call excellent response time

I tried the snapshot jar and something has changed, as the previous ClassCastException from CollectionType has changed to this:

2006-09-04 17:57:46,242 [http-8180-Processor4] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.handler.OutMessageSender i
n phase send
2006-09-04 17:57:46,266 [http-8180-Processor4] ERROR org.codehaus.xfire.service.binding.PostInvocationHandler - java.lang.NullPointerException
2006-09-04 17:57:46,269 [http-8180-Processor4] ERROR org.codehaus.xfire.handler.DefaultFaultHandler - Fault occurred!
java.lang.NullPointerException
        at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
        at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)
        at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293)
        at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103)
        at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413)
        at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:194)
        at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
        at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
        at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
Show
Timo Rantalaiho added a comment - Thankyou! 8 minutes is what I'd call excellent response time I tried the snapshot jar and something has changed, as the previous ClassCastException from CollectionType has changed to this:
2006-09-04 17:57:46,242 [http-8180-Processor4] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.handler.OutMessageSender i
n phase send
2006-09-04 17:57:46,266 [http-8180-Processor4] ERROR org.codehaus.xfire.service.binding.PostInvocationHandler - java.lang.NullPointerException
2006-09-04 17:57:46,269 [http-8180-Processor4] ERROR org.codehaus.xfire.handler.DefaultFaultHandler - Fault occurred!
java.lang.NullPointerException
        at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
        at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)
        at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293)
        at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103)
        at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413)
        at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:194)
        at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
        at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
        at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
Hide
Dan Diephouse added a comment -

Its your lucky day I guess - If you're using java 1.4 - did you configure your collections like the bottom of this page says:

http://xfire.codehaus.org/Mapping+collections

Or are you using Java 5? If they're java5 collections, xfire should figure them out autmotically.

Show
Dan Diephouse added a comment - Its your lucky day I guess - If you're using java 1.4 - did you configure your collections like the bottom of this page says: http://xfire.codehaus.org/Mapping+collections Or are you using Java 5? If they're java5 collections, xfire should figure them out autmotically.
Hide
Timo Rantalaiho added a comment -

I'm on Java 5 (Sun 1.5.0_07 on Debian Ubuntu), and basic collections mappings have worked all the time. I started with 1.1.1 and only now upgraded to 1.2 when the problem appeared with a new web service method.

Let's see if I can find out what is special about this failing case.

Show
Timo Rantalaiho added a comment - I'm on Java 5 (Sun 1.5.0_07 on Debian Ubuntu), and basic collections mappings have worked all the time. I started with 1.1.1 and only now upgraded to 1.2 when the problem appeared with a new web service method. Let's see if I can find out what is special about this failing case.
Hide
Dan Diephouse added a comment -

XFire might be getting confused if you aren't specificying the inner collection's component type. I.e. do you have Collection<Collection> instead of Collection<Collection<Foo>> ?

Show
Dan Diephouse added a comment - XFire might be getting confused if you aren't specificying the inner collection's component type. I.e. do you have Collection<Collection> instead of Collection<Collection<Foo>> ?
Hide
Behrang Javaherian added a comment -

When I try to use this patch I am getting the following excpetion:
Caused by: java.lang.NullPointerException
at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)
at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293)
at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103)
at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413)
at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201)
at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:313)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:251)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
... 7 more
I am using JDK 1.5 and my bean has definition like this: Collection<Entity> newEntities; with getter and setters. I define the service in spring xml file like this:
<bean name="Saver" class="org.codehaus.xfire.spring.BeanService">
<property name="properties">
<map>
<entry key="writeXsiType">
<value type="java.lang.Boolean">true</value>
</entry>
<entry key="overrideTypesList">
<list>
<value>com.innovit.ice.core.domain.Entity</value>
<value>com.innovit.ice.core.domain.Group</value>
<value>com.innovit.ice.core.domain.User</value>
<value>com.innovit.ice.core.domain.UserGroup</value>
</list>
</entry>
</map>
</property>
<property name="serviceBean" ref="saver"/>
<property name="serviceClass" value="com.innovit.ice.core.dao.ChangeSaver"/>
<property name="name" value="Saver"/>
</bean>

I thing the issue is not solved. As this functionality is necessary for us, please solve the issue ASAP.
Also It would be great if we have same feature for Arrays too.
Cheers
Behrang

Show
Behrang Javaherian added a comment - When I try to use this patch I am getting the following excpetion: Caused by: java.lang.NullPointerException at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192) at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165) at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293) at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103) at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413) at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201) at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273) at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89) at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80) at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56) at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:313) at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:251) at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75) ... 7 more I am using JDK 1.5 and my bean has definition like this: Collection<Entity> newEntities; with getter and setters. I define the service in spring xml file like this: <bean name="Saver" class="org.codehaus.xfire.spring.BeanService"> <property name="properties"> <map> <entry key="writeXsiType"> <value type="java.lang.Boolean">true</value> </entry> <entry key="overrideTypesList"> <list> <value>com.innovit.ice.core.domain.Entity</value> <value>com.innovit.ice.core.domain.Group</value> <value>com.innovit.ice.core.domain.User</value> <value>com.innovit.ice.core.domain.UserGroup</value> </list> </entry> </map> </property> <property name="serviceBean" ref="saver"/> <property name="serviceClass" value="com.innovit.ice.core.dao.ChangeSaver"/> <property name="name" value="Saver"/> </bean> I thing the issue is not solved. As this functionality is necessary for us, please solve the issue ASAP. Also It would be great if we have same feature for Arrays too. Cheers Behrang
Hide
realwangx added a comment -

I had the same problem as Behrang Javaherian;
I am using JDK 1.5 and xfire1.2.1;my bean has definition like this: Collection<Entity> newEntities;

As the bellow:

http://xfire.codehaus.org/Mapping+collections

Java5 collections, xfire should figure them out autmotically.

but error as bellow:
Caused by: java.lang.NullPointerException
at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)

Now , I have Solved the problem:

like using java 1.4 ,configure collections like:
<mappings>
<mapping>
<method name="getCollection">
<return-type componentType="MyType"/>
</method>
<method name="setList">
<parameter index="1" componentType="MyType"/>
</method>
</mapping>
</mappings>

just do it , then ok;

reference by:
http://xfire.codehaus.org/Mapping+collections

so , i think xfire-aegis is not good supporting for jdk1.5,
not only 1.4 but also 1.5 is need for Mapping configration for collections

Show
realwangx added a comment - I had the same problem as Behrang Javaherian; I am using JDK 1.5 and xfire1.2.1;my bean has definition like this: Collection<Entity> newEntities; As the bellow: http://xfire.codehaus.org/Mapping+collections Java5 collections, xfire should figure them out autmotically. but error as bellow: Caused by: java.lang.NullPointerException at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192) at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165) Now , I have Solved the problem: like using java 1.4 ,configure collections like: <mappings> <mapping> <method name="getCollection"> <return-type componentType="MyType"/> </method> <method name="setList"> <parameter index="1" componentType="MyType"/> </method> </mapping> </mappings> just do it , then ok; reference by: http://xfire.codehaus.org/Mapping+collections so , i think xfire-aegis is not good supporting for jdk1.5, not only 1.4 but also 1.5 is need for Mapping configration for collections
Hide
James Burton added a comment -

I have the same error with 1.2.1 when returning a List from a method with this interface...

@WebMethod
@WebResult(name = "divisions")
public List<Division> getAllDivisions();

I am using java 1.5.0_07, spring 1.2.8 and the jsr181 annotations.

I do not have this error with 1.1.2, which works fine.

Thus I cannot upgrade until this issue is resolved.

Show
James Burton added a comment - I have the same error with 1.2.1 when returning a List from a method with this interface... @WebMethod @WebResult(name = "divisions") public List<Division> getAllDivisions(); I am using java 1.5.0_07, spring 1.2.8 and the jsr181 annotations. I do not have this error with 1.1.2, which works fine. Thus I cannot upgrade until this issue is resolved.
Hide
James Burton added a comment -

Actually, my stack trace is not identical. Here it is, running in tomcat 5.5.17...

[2006-09-28 10:07:01,164] : ERROR : [http-8080-Processor25] : binding.PostInvocationHandler : java.lang.NullPointerException
[2006-09-28 10:07:01,196] : ERROR : [http-8080-Processor25] : handler.DefaultFaultHandler : Fault occurred!
java.lang.NullPointerException
at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)
at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293)
at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103)
at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201)
at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at org.codehaus.xfire.transport.http.XFireServletChannel.sendViaServlet(XFireServletChannel.java:84)
at org.codehaus.xfire.transport.http.XFireServletChannel.send(XFireServletChannel.java:43)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.service.binding.PostInvocationHandler.invoke(PostInvocationHandler.java:36)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:287)
at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

Show
James Burton added a comment - Actually, my stack trace is not identical. Here it is, running in tomcat 5.5.17... [2006-09-28 10:07:01,164] : ERROR : [http-8080-Processor25] : binding.PostInvocationHandler : java.lang.NullPointerException [2006-09-28 10:07:01,196] : ERROR : [http-8080-Processor25] : handler.DefaultFaultHandler : Fault occurred! java.lang.NullPointerException at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192) at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165) at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293) at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103) at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201) at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273) at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89) at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80) at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56) at org.codehaus.xfire.transport.http.XFireServletChannel.sendViaServlet(XFireServletChannel.java:84) at org.codehaus.xfire.transport.http.XFireServletChannel.send(XFireServletChannel.java:43) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.service.binding.PostInvocationHandler.invoke(PostInvocationHandler.java:36) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64) at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:287) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130) at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)
Hide
Prashanth Galisukumar added a comment -

I have the same stack trace as that of James Burton's.

2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.SoapActionOutHandler in phase transport
2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking phase send
2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking handler org.codehaus.xfire.handler.OutMessageSender in phase send
2006-09-28 18:21:43,223 [TP-Processor3] ERROR PostInvocationHandler - java.lang.NullPointerException
2006-09-28 18:21:43,227 [TP-Processor3] ERROR DefaultFaultHandler - Fault occurred!
java.lang.NullPointerException
at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192)
at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165)
at org.codehaus.xfire.aegis.type.collection.MapType.writeObject(MapType.java:165)
at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413)
at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293)
at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103)
at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201)
at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273)
at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89)
at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80)
at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)
at org.codehaus.xfire.transport.http.XFireServletChannel.sendViaServlet(XFireServletChannel.java:84)
at org.codehaus.xfire.transport.http.XFireServletChannel.send(XFireServletChannel.java:43)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.service.binding.PostInvocationHandler.invoke(PostInvocationHandler.java:36)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:287)
at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

I tried defining the mapping explicitly for collection, but that doesnt seem to fix the issue.
Any other alternatives? Do you guys need futher information on my interface and the webservice?

Show
Prashanth Galisukumar added a comment - I have the same stack trace as that of James Burton's. 2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.SoapActionOutHandler in phase transport 2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking phase send 2006-09-28 18:21:43,180 [TP-Processor3] DEBUG HandlerPipeline - Invoking handler org.codehaus.xfire.handler.OutMessageSender in phase send 2006-09-28 18:21:43,223 [TP-Processor3] ERROR PostInvocationHandler - java.lang.NullPointerException 2006-09-28 18:21:43,227 [TP-Processor3] ERROR DefaultFaultHandler - Fault occurred! java.lang.NullPointerException at org.codehaus.xfire.aegis.type.basic.ObjectType.determineType(ObjectType.java:192) at org.codehaus.xfire.aegis.type.basic.ObjectType.writeObject(ObjectType.java:165) at org.codehaus.xfire.aegis.type.collection.MapType.writeObject(MapType.java:165) at org.codehaus.xfire.aegis.type.basic.BeanType.writeObject(BeanType.java:413) at org.codehaus.xfire.aegis.type.basic.ArrayType.writeValue(ArrayType.java:293) at org.codehaus.xfire.aegis.type.collection.CollectionType.writeObject(CollectionType.java:103) at org.codehaus.xfire.aegis.AegisBindingProvider.writeParameter(AegisBindingProvider.java:201) at org.codehaus.xfire.service.binding.AbstractBinding.writeParameter(AbstractBinding.java:273) at org.codehaus.xfire.service.binding.WrappedBinding.writeMessage(WrappedBinding.java:89) at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:80) at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56) at org.codehaus.xfire.transport.http.XFireServletChannel.sendViaServlet(XFireServletChannel.java:84) at org.codehaus.xfire.transport.http.XFireServletChannel.send(XFireServletChannel.java:43) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.service.binding.PostInvocationHandler.invoke(PostInvocationHandler.java:36) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64) at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:287) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130) at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) I tried defining the mapping explicitly for collection, but that doesnt seem to fix the issue. Any other alternatives? Do you guys need futher information on my interface and the webservice?
Hide
James Burton added a comment -

The 1.2.2 release fixed this problem for me.

Thanks!

Show
James Burton added a comment - The 1.2.2 release fixed this problem for me. Thanks!
Hide
Prashanth Galisukumar added a comment -

James Burton,
Did you have to provide mapping file or just swapping the jars fixed your problem. Can you explain the changes you made inorder to get the collections component working

Show
Prashanth Galisukumar added a comment - James Burton, Did you have to provide mapping file or just swapping the jars fixed your problem. Can you explain the changes you made inorder to get the collections component working

People

Vote (3)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: