cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: CXF Premature End Of File ?
Date Fri, 05 Nov 2010 01:37:20 GMT

On 2010-11-4, at 上午5:26, Alistair wrote:

>
> Hi All,
>
> I hope anyone can help me with the following issue:
>
> I apologize upfront for all the information posted, but I guess it  
> is needed
> to understand what I am doing.
>
> - I am developing a web application using distributed OSGI with a cxf
> webclient. Also, my OSGI package is accessing the data via a second  
> OSGI
> package that uses Eclipselink - JPA. (The connection within OSGI works
> wonderfully and the data is retrieved correctly on the console.)
> - So far so good.
>
>
> When I execute the wsdl2java I get the following console message  
> (The client
> is generated, but seems to work incorrectly):
>
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -client -d D:\Hagen_Thesis\04 workspace3\ClientTest 
> \.cxftmp/src
> -classdir D:\Hagen_Thesis\04 workspace3\ClientTest\build\classes -p
> http://export.webservice.expertfinder.org/=org.expertfinder.webservice.export
> -impl -validate -exsh false -dns true -dex true -wsdlLocation
> http://localhost:9090/expertFinder?wsdl -verbose -defaultValues -fe  
> jaxws
> -db jaxb -wv 1.1 http://localhost:9090/expertFinder?wsdl
> wsdl2java - Apache CXF 2.3.0
>
>
> WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException
>
> org.apache.cxf.tools.common.ToolException:
> java.lang.reflect.UndeclaredThrowableException
> 	at
> org 
> .apache 
> .cxf 
> .tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java: 
> 279)
> 	at
> org 
> .apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java: 
> 103)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
> 	at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy38.required(Unknown Source)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator 
> .bean.field.AbstractField.annotateReference(AbstractField.java:187)
> 	at
> com 
> .sun 
> .tools 
> .xjc.generator.bean.field.AbstractField.annotate(AbstractField.java: 
> 156)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator 
> .bean 
> .field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:75)
> 	at
> com 
> .sun 
> .tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java: 
> 89)
> 	at
> com 
> .sun 
> .tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java: 
> 76)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native  
> Method)
> 	at
> sun 
> .reflect 
> .NativeConstructorAccessorImpl 
> .newInstance(NativeConstructorAccessorImpl.java:39)
> 	at
> sun 
> .reflect 
> .DelegatingConstructorAccessorImpl 
> .newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator 
> .bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java: 
> 64)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator 
> .bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java: 
> 79)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java: 
> 759)
> 	at
> com 
> .sun 
> .tools 
> .xjc 
> .generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java: 
> 540)
> 	at
> com 
> .sun 
> .tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:243)
> 	at
> com 
> .sun 
> .tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java: 
> 161)
> 	at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)
> 	at
> com 
> .sun 
> .tools 
> .xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:252)
> 	at
> com 
> .sun 
> .tools 
> .xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
> 	at
> org 
> .apache 
> .cxf 
> .tools 
> .wsdlto 
> .databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:381)
> 	at
> org 
> .apache 
> .cxf 
> .tools 
> .wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java: 
> 573)
> 	at
> org 
> .apache 
> .cxf 
> .tools 
> .wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:228)
> 	at
> org 
> .apache 
> .cxf 
> .tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java: 
> 128)
> 	at
> org 
> .apache 
> .cxf 
> .tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java: 
> 271)
> 	... 4 more
> Caused by: java.lang.NoSuchMethodException:
> javax.xml.bind.annotation.XmlElementRef.required()
> 	at java.lang.Class.getDeclaredMethod(Class.java:1937)
> 	at
> com 
> .sun 
> .codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java: 
> 108)
> 	... 28 more
>

Hi,

This error generally means you're mixing jaxb2.2 implementation with  
JDK 6 (which includes
2.1).

You can use endorse dir to work around this issue.

You can get more details from the cxf 2.3 release notes[1]

[1]http://cxf.apache.org/docs/23-migration-guide.html

Freeman
>
>
>
>
> My wsdl filw looks like this:
>
>
> <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions
> name="ExpertFinderIFC"
> targetNamespace="http://export.webservice.expertfinder.org/"
> xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://export.webservice.expertfinder.org/"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <wsdl:types>
> <xsd:schema attributeFormDefault="qualified"  
> elementFormDefault="qualified"
> targetNamespace="http://export.ifc.expertfinder.org"
> xmlns:tns="http://export.ifc.expertfinder.org"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:complexType name="ProjectIFC">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="creationDate" nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="description" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="dueDate" nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="dueDateNull" type="xsd:int" />
>      <xsd:element minOccurs="0" name="efTeams" nillable="true"
> type="tns:ArrayOfTeamIFC" />
>      <xsd:element minOccurs="0" name="modificationDate"  
> nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="name" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="parentObjectID" nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="parentObjectType"  
> type="xsd:int" />
>      <xsd:element minOccurs="0" name="projectID" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="userID" nillable="true"
> type="xsd:integer" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="TeamIFC">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="description" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="efMembers" nillable="true"
> type="tns:ArrayOfMemberIFC" />
>      <xsd:element minOccurs="0" name="jiveproject" nillable="true"
> type="tns:ProjectIFC" />
>      <xsd:element minOccurs="0" name="name" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="teamID" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="userID" nillable="true"
> type="xsd:integer" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="ArrayOfTeamIFC">
>    <xsd:sequence>
>      <xsd:element maxOccurs="unbounded" minOccurs="0" name="TeamIFC"
> nillable="true" type="tns:TeamIFC" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="ArrayOfMemberIFC">
>    <xsd:sequence>
>      <xsd:element maxOccurs="unbounded" minOccurs="0" name="MemberIFC"
> nillable="true" type="tns:MemberIFC" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="MemberIFC">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="description" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="efTeam" nillable="true"
> type="tns:TeamIFC" />
>      <xsd:element minOccurs="0" name="jiveuser" nillable="true"
> type="tns:UserIFC" />
>      <xsd:element minOccurs="0" name="tmID" type="xsd:int" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:complexType name="UserIFC">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="creationDate" nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="efMembers" nillable="true"
> type="tns:ArrayOfMemberIFC" />
>      <xsd:element minOccurs="0" name="email" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="emailVisible" type="xsd:int" />
>      <xsd:element minOccurs="0" name="federated" type="xsd:int" />
>      <xsd:element minOccurs="0" name="firstName" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="isExternal" type="xsd:int" />
>      <xsd:element minOccurs="0" name="lastLoggedIn" nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="lastName" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="modificationDate"  
> nillable="true"
> type="xsd:integer" />
>      <xsd:element minOccurs="0" name="name" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="nameVisible" type="xsd:int" />
>      <xsd:element minOccurs="0" name="passwordHash" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="status" type="xsd:int" />
>      <xsd:element minOccurs="0" name="userEnabled" type="xsd:int" />
>      <xsd:element minOccurs="0" name="userID" type="xsd:int" />
>      <xsd:element minOccurs="0" name="username" nillable="true"
> type="xsd:string" />
>      <xsd:element minOccurs="0" name="visible" type="xsd:int" />
>    </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
> <xsd:schema attributeFormDefault="unqualified"
> elementFormDefault="qualified"
> targetNamespace="http://export.webservice.expertfinder.org/"
> xmlns:ns0="http://export.ifc.expertfinder.org"
> xmlns:tns="http://export.webservice.expertfinder.org/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <xsd:import namespace="http://export.ifc.expertfinder.org" />
>  <xsd:element name="getAllTeamsByProjectID"
> type="tns:getAllTeamsByProjectID" />
>  <xsd:complexType name="getAllTeamsByProjectID">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="arg0" nillable="true"
> type="xsd:integer" />
>    </xsd:sequence>
>  </xsd:complexType>
>  <xsd:element name="getAllTeamsByProjectIDResponse"
> type="tns:getAllTeamsByProjectIDResponse" />
>  <xsd:complexType name="getAllTeamsByProjectIDResponse">
>    <xsd:sequence>
>      <xsd:element minOccurs="0" name="return"  
> type="ns0:ArrayOfTeamIFC" />
>    </xsd:sequence>
>  </xsd:complexType>
> </xsd:schema>
>  </wsdl:types>
>  <wsdl:message name="getAllTeamsByProjectIDResponse">
>    <wsdl:part element="tns:getAllTeamsByProjectIDResponse"
> name="parameters">
>    </wsdl:part>
>  </wsdl:message>
>  <wsdl:message name="getAllTeamsByProjectID">
>    <wsdl:part element="tns:getAllTeamsByProjectID" name="parameters">
>    </wsdl:part>
>  </wsdl:message>
>  <wsdl:portType name="ExpertFinderIFCPortType">
>    <wsdl:operation name="getAllTeamsByProjectID">
>      <wsdl:input message="tns:getAllTeamsByProjectID"
> name="getAllTeamsByProjectID">
>    </wsdl:input>
>      <wsdl:output message="tns:getAllTeamsByProjectIDResponse"
> name="getAllTeamsByProjectIDResponse">
>    </wsdl:output>
>    </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name="ExpertFinderIFCSoapBinding"
> type="tns:ExpertFinderIFCPortType">
>    <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http" />
>    <wsdl:operation name="getAllTeamsByProjectID">
>      <soap:operation soapAction="" style="document" />
>      <wsdl:input name="getAllTeamsByProjectID">
>        <soap:body use="literal" />
>      </wsdl:input>
>      <wsdl:output name="getAllTeamsByProjectIDResponse">
>        <soap:body use="literal" />
>      </wsdl:output>
>    </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name="ExpertFinderIFC">
>    <wsdl:port binding="tns:ExpertFinderIFCSoapBinding"
> name="ExpertFinderIFCPort">
>      <soap:address location="http://localhost:9090/expertFinder" />
>    </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
>
>
>
> My Soap response is this ( I retrieved this via the Web Services  
> Explorer
> from eclipse):
> (You will see it is quite repetitive and basically ends in a  
> Premature end
> of file message. (When using a different client that actually  
> provides some
> more information.)
>
> - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/ 
> envelope/">
> - <soap:Body>
> - <ns1:getAllTeamsByProjectIDResponse
> xmlns:ns1="http://export.webservice.expertfinder.org/">
> - <ns1:return>
> - <ns2:TeamIFC xmlns:ns2="http://export.ifc.expertfinder.org">
>  <ns2:description>Test</ns2:description>
>  <ns2:efMembers />
> - <ns2:jiveproject>
>  <ns2:creationDate>1247346470535</ns2:creationDate>
>  <ns2:description xmlns:ns3="http://www.w3.org/2001/XMLSchema- 
> instance"
> ns3:nil="true" />
>  <ns2:dueDate>1248389999999</ns2:dueDate>
>  <ns2:dueDateNull>0</ns2:dueDateNull>
> - <ns2:efTeams>
> - <ns2:TeamIFC>
>  <ns2:description>Test</ns2:description>
>  <ns2:efMembers />
> - <ns2:jiveproject>
>  <ns2:creationDate>1247346470535</ns2:creationDate>
>  <ns2:description xmlns:ns3="http://www.w3.org/2001/XMLSchema- 
> instance"
> ns3:nil="true" />
>  <ns2:dueDate>1248389999999</ns2:dueDate>
>  <ns2:dueDateNull>0</ns2:dueDateNull>
> - <ns2:efTeams>
> - <ns2:TeamIFC>
>  <ns2:description>Test</ns2:description>
>  <ns2:efMembers />
> - <ns2:jiveproject>
>  <ns2:creationDate>1247346470535</ns2:creationDate>
>  <ns2:description xmlns:ns3="http://www.w3.org/2001/XMLSchema- 
> instance"
> ns3:nil="true" />
>  <ns2:dueDate>1248389999999</ns2:dueDate>
>  <ns2:dueDateNull>0</ns2:dueDateNull>
> - <ns2:efTeams>
> - <ns2:TeamIFC>
>
> last part comes repetitive... so it seems like only the first object
> (TeamIFC) is displayed in an unlimited way. Why is that?
>
> [...]
>
>
>
> And here again the more detailed stack trace:
>
>
> 03.11.2010 21:35:54
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service
> {http://export.webservice.expertfinder.org/}ExpertFinderIFC from WSDL:
> http://localhost:9090/expertFinder?wsdl
> 03.11.2010 21:35:56 org.apache.cxf.phase.PhaseInterceptorChain  
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Premature EOF
> 	at
> org 
> .apache 
> .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:593)
> 	at
> org 
> .apache 
> .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:498)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
> 	at
> org 
> .apache 
> .cxf 
> .interceptor 
> .DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java: 
> 102)
> 	at
> org 
> .apache 
> .cxf 
> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
> 221)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.handleResponse(HTTPConduit.java:1996)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.close(HTTPConduit.java:1832)
> 	at  
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java: 
> 66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java: 
> 591)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor 
> $ 
> MessageSenderEndingInterceptor 
> .handleMessage(MessageSenderInterceptor.java:62)
> 	at
> org 
> .apache 
> .cxf 
> .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 
> 221)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java: 
> 73)
> 	at  
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: 
> 171)
> 	at $Proxy53.getAllTeamsByProjectID(Unknown Source)
> 	at
> com 
> .jivesoftware 
> .clearspace 
> .plugin.beanByActionPlugin.TestAction.check(TestAction.java:133)
> 	at
> com 
> .jivesoftware 
> .clearspace 
> .plugin.beanByActionPlugin.TestAction.execute(TestAction.java:142)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun 
> .reflect 
> .DelegatingMethodAccessorImpl 
> .invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .DefaultActionInvocation.invokeAction(DefaultActionInvocation.java: 
> 376)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .DefaultActionInvocation 
> .invokeActionOnly(DefaultActionInvocation.java:239)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 213)
> 	at
> com 
> .jivesoftware 
> .community 
> .web.struts.FlashInterceptor.intercept(FlashInterceptor.java:41)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .DefaultWorkflowInterceptor 
> .doIntercept(DefaultWorkflowInterceptor.java:221)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .validator 
> .ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .ConversionErrorInterceptor 
> .intercept(ConversionErrorInterceptor.java:123)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com.jivesoftware.community.web.struts.JiveConversionErrorInterceptor.intercept 
> (JiveConversionErrorInterceptor.java:35)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .jivesoftware 
> .community.action.LocaleInterceptor.intercept(LocaleInterceptor.java: 
> 68)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .StaticParametersInterceptor 
> .intercept(StaticParametersInterceptor.java:105)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> org 
> .apache 
> .struts2 
> .interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java: 
> 83)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> org 
> .apache 
> .struts2 
> .interceptor 
> .FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .ScopedModelDrivenInterceptor 
> .intercept(ScopedModelDrivenInterceptor.java:127)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> org 
> .apache 
> .struts2 
> .interceptor 
> .debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java: 
> 206)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java: 
> 115)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java: 
> 143)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java: 
> 121)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> org 
> .apache 
> .struts2 
> .interceptor 
> .ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java: 
> 123)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .opensymphony 
> .xwork2 
> .interceptor 
> .ExceptionMappingInterceptor 
> .intercept(ExceptionMappingInterceptor.java:176)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com.jivesoftware.community.web.struts.RequireFeatureInterceptor.intercept 
> (RequireFeatureInterceptor.java:36)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .jivesoftware 
> .community 
> .web 
> .struts.ModuleCheckInterceptor.intercept(ModuleCheckInterceptor.java: 
> 47)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .jivesoftware 
> .community 
> .aaa 
> .authz 
> .RequireAuthorizationInterceptor 
> .intercept(RequireAuthorizationInterceptor.java:51)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .jivesoftware 
> .community 
> .aaa 
> .authz 
> .GuestAuthorizationInterceptor 
> .intercept(GuestAuthorizationInterceptor.java:69)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> com 
> .jivesoftware 
> .community 
> .web 
> .struts.JiveRefererInterceptor.intercept(JiveRefererInterceptor.java: 
> 43)
> 	at
> com 
> .opensymphony 
> .xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java: 
> 211)
> 	at
> org 
> .apache 
> .struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
> 	at
> org 
> .apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java: 
> 504)
> 	at
> org 
> .apache 
> .struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java: 
> 419)
> 	at
> com 
> .jivesoftware 
> .community 
> .web.struts.JiveFilterDispatcher.doFilter(JiveFilterDispatcher.java: 
> 101)
> 	at
> org 
> .springframework 
> .web 
> .filter 
> .DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
> 	at
> org 
> .springframework 
> .web 
> .filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com.jivesoftware.community.web.filter.SetResponseCharacterEncodingFilter.doFilter 
> (SetResponseCharacterEncodingFilter.java:61)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com 
> .opensymphony 
> .module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
> 	at
> com 
> .opensymphony 
> .module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
> 	at
> org 
> .springframework 
> .web 
> .filter 
> .DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
> 	at
> org 
> .springframework 
> .web 
> .filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org 
> .apache 
> .struts2 
> .dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java: 
> 99)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com.jivesoftware.community.web.filter.JiveDynamicResponseHeaderFilter.doFilter 
> (JiveDynamicResponseHeaderFilter.java:66)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com 
> .jivesoftware 
> .community 
> .web 
> .filter.JiveCompressionFilter.doFilter(JiveCompressionFilter.java:103)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com.jivesoftware.community.web.filter.SetRequestCharacterEncodingFilter.doFilter 
> (SetRequestCharacterEncodingFilter.java:73)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at com.jivesoftware.util.NoCacheFilter.doFilter(NoCacheFilter.java: 
> 66)
> 	at
> org 
> .acegisecurity 
> .util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org 
> .directwebremoting 
> .servlet.DwrWebContextFilter.doFilter(DwrWebContextFilter.java:91)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at  
> com.jivesoftware.base.plugin.PluginFilter.doFilter(PluginFilter.java: 
> 75)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:265)
> 	at
> com 
> .jivesoftware 
> .community 
> .aaa 
> .JiveAuthenticationTranslationFilter 
> .doFilter(JiveAuthenticationTranslationFilter.java:164)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> org 
> .acegisecurity 
> .ui 
> .ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java: 
> 124)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> com 
> .jivesoftware 
> .community 
> .aaa 
> .FeedsBasicProcessingFilter.doFilter(FeedsBasicProcessingFilter.java: 
> 146)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> org 
> .acegisecurity 
> .ui 
> .rememberme 
> .RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java: 
> 142)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> org 
> .acegisecurity 
> .ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java: 
> 271)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> com 
> .jivesoftware 
> .community 
> .aaa.SessionTrackingFilter.doFilter(SessionTrackingFilter.java:53)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> org 
> .acegisecurity 
> .context 
> .HttpSessionContextIntegrationFilter 
> .doFilter(HttpSessionContextIntegrationFilter.java:249)
> 	at
> org.acegisecurity.util.FilterChainProxy 
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
> 	at
> org 
> .acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java: 
> 149)
> 	at
> org 
> .acegisecurity 
> .util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> com 
> .jivesoftware 
> .community 
> .web 
> .filter.ApplicationStateFilter.doFilter(ApplicationStateFilter.java: 
> 145)
> 	at
> org 
> .apache 
> .catalina 
> .core 
> .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
> 235)
> 	at
> org 
> .apache 
> .catalina 
> .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at
> org 
> .apache 
> .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 
> 233)
> 	at
> org 
> .apache 
> .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 
> 191)
> 	at
> org 
> .apache 
> .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at
> org 
> .apache 
> .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at
> org 
> .apache 
> .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 
> 109)
> 	at
> org 
> .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 
> 286)
> 	at
> org 
> .apache.coyote.http11.Http11Processor.process(Http11Processor.java: 
> 845)
> 	at
> org.apache.coyote.http11.Http11Protocol 
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint 
> $Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: javax.xml.bind.UnmarshalException
> - with linked exception:
> [com.ctc.wstx.exc.WstxIOException: Premature EOF]
> 	at
> com 
> .sun 
> .xml 
> .bind 
> .v2 
> .runtime 
> .unmarshaller 
> .UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:396)
> 	at
> com 
> .sun 
> .xml 
> .bind 
> .v2 
> .runtime 
> .unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334)
> 	at
> com 
> .sun 
> .xml 
> .bind 
> .v2 
> .runtime 
> .unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:311)
> 	at
> org 
> .apache 
> .cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:578)
> 	... 148 more
> Caused by: com.ctc.wstx.exc.WstxIOException: Premature EOF
> 	at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
> 	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java: 
> 1086)
> 	at
> org 
> .apache 
> .cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java: 
> 215)
> 	at
> com 
> .sun 
> .xml 
> .bind 
> .v2 
> .runtime 
> .unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:151)
> 	at
> com 
> .sun 
> .xml 
> .bind 
> .v2 
> .runtime 
> .unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:332)
> 	... 150 more
> Caused by: java.io.IOException: Premature EOF
> 	at
> sun 
> .net 
> .www 
> .http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java: 
> 538)
> 	at
> sun 
> .net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java: 
> 582)
> 	at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java: 
> 669)
> 	at java.io.FilterInputStream.read(FilterInputStream.java:116)
> 	at
> sun.net.www.protocol.http.HttpURLConnection 
> $HttpInputStream.read(HttpURLConnection.java:2446)
> 	at
> sun.net.www.protocol.http.HttpURLConnection 
> $HttpInputStream.read(HttpURLConnection.java:2441)
> 	at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:362)
> 	at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
> 	at com.ctc.wstx.io.MergedReader.read(MergedReader.java:101)
> 	at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:84)
> 	at
> com 
> .ctc 
> .wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57)
> 	at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:967)
> 	at com.ctc.wstx.sr.StreamScanner.getNext(StreamScanner.java:738)
> 	at
> com 
> .ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java: 
> 2721)
> 	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java: 
> 1019)
> 	... 153 more
>
>
>
>
> Here my OSGI Activator:
>
> // from the start method
> TeamServiceImpl hs = (TeamServiceImpl) bundleContext.getService(sr);
>
> 			ExpertFinderImpl ef = new ExpertFinderImpl();
> 			ef.setTeamServiceImpl(hs);
>
> 			System.out.println(" Read all teams: "
> 					+ hs.getAllTeamsByID(new BigInteger("1004")));
>
> 			
> 			System.out.println(" OSGI access was possible. Setting up
> webservice...");
> 			
> 			  Dictionary<String, String> props = new Hashtable<String,  
> String>();
> 			
> 			    props.put("service.exported.interfaces", "*");
> 		        props.put("service.exported.configs", "org.apache.cxf.ws");
> 		        props.put("org.apache.cxf.ws.address",
> "http://localhost:9090/expertFinder");
>
> 				
> 			   bundleContext.registerService(ExpertFinderIFC.class.getName(),
> 			                                      ef, props);
> 			
>
> [...]
>
> /*****************************/
>
> and my service implementation:
>
> public class ExpertFinderImpl implements ExpertFinderIFC {
>
> 	@Override
> 	public ArrayList<TeamIFC> getAllTeamsByProjectID(BigInteger  
> projectID) {
> 		// TODO Auto-generated method stub
> 		
> 		
> 		
> 		
> 		return (ArrayList <TeamIFC>) impl.getAllTeamsByID(projectID);
> 		
> 	}
> [...]
>
> /*****************************/
>
> -- 
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-Premature-End-Of-File-tp3249208p3249208.html
> Sent from the cxf-issues mailing list archive at Nabble.com.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message