Glasfish V3 Web Service Invalid Utf-8 Middle Byte

Тема в разделе "Java", создана пользователем buts, 16 дек 2010.

Статус темы:
Закрыта.
  1. buts

    buts Гость

    На сервере развернут web-service на GlasFishe.

    Если локально, то все работет, но если на любом удаленном компе то клиент Tomcat падает с :

    <div class="sp-wrap"><div class="sp-head-wrap"><div class="sp-head folded clickable">Stack trace</div></div><div class="sp-body"><div class="sp-content">
    Код (Text):
    SEVERE: Servlet.service() for servlet ServletClient threw exception
    com.sun.xml.ws.streaming.XMLStreamReaderException: XML reader error: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xf1 (at char #2, byte #-1)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.wrapException(XMLStreamReaderUtil.java:267)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:95)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:110)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:100)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:324)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:312)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:688)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:347)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:249)
    at com.sun.xml.ws.api.model.wsdl.WSDLModel$WSDLParser.parse(WSDLModel.java:183)
    at com.sun.xml.ws.policy.jaxws.PolicyResourceLoader.getWsdlModel(PolicyResourceLoader.java:81)
    at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(PolicyConfigParser.java:223)
    at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(PolicyConfigParser.java:185)
    at com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parse(PolicyConfigParser.java:103)
    at com.sun.xml.ws.policy.jaxws.WsitPolicyResolver.resolve(WsitPolicyResolver.java:106)
    at com.sun.xml.ws.policy.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:953)
    at com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:187)
    at com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:334)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:171)
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
    at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:267)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:230)
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:178)
    at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
    at javax.xml.ws.Service.<init>(Service.java:56)
    at org.bsuir.gr1.WSClient.buts.WebServicebutsService.<init>(WebServicebutsService.java:42)
    at org.bsuir.gr1.Client.buts.ServletClient.myDetails(ServletClient.java:127)
    at org.bsuir.gr1.Client.buts.ServletClient.service(ServletClient.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    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:127)
    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:298)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xf1 (at char #2, byte #-1)
    at com.ctc.wstx.sr.StreamScanner.throwFromIOE(StreamScanner.java:683)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1086)
    at com.sun.xml.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:92)
    at com.sun.xml.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:76)
    ... 42 more
    Caused by: java.io.CharConversionException: Invalid UTF-8 middle byte 0xf1 (at char #2, byte #-1)
    at com.ctc.wstx.io.UTF8Reader.reportInvalidOther(UTF8Reader.java:310)
    at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:201)
    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.nextFromProlog(BasicStreamReader.java:1995)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
    ... 44 more

    А на GlassFishe (сервер) падает варинг:

    Код (Text):
    WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /serverWS-war, because request parameters have already been read, or ServletRequest.getReader() has already been called
    Как решить эту проблему?
     
Загрузка...
Статус темы:
Закрыта.

Поделиться этой страницей