Nfe - Validação da tag "infCpl"

bom dia,

estou com o seguinte problema…
quando existe uma nfe com a tag infCpl muito grande, está lançando o seguinte erro na validação xsd:

17/11/2009 10:29:02 com.sun.xml.ws.server.sei.EndpointMethodHandler invoke
SEVERE: null
java.lang.StackOverflowError
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.Op$RangeOp.getToken(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matchString(Unknown Source)
...
at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matches(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.matches(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl.getActualValue(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl.validate(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at services.ValidatorXmlService.Validator(ValidatorXmlService.java:87)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246)
	at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
	at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
	at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
	at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
	at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
	at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
	at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
	at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
	at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
	at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
	at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
	at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	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:175)
	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:844)
	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(Unknown Source)
17/11/2009 10:29:05 com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet
SEVERE: caught throwable
javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.transform.TransformerException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error]
	at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:317)
	at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
	at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108)
	at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:265)
	at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320)
	at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
	at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
	at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
	at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
	at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
	at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	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:175)
	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:844)
	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(Unknown Source)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.transform.TransformerException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error]
	at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:331)
	at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:257)
	at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(Unknown Source)
	at com.sun.xml.ws.message.jaxb.MarshallerBridge.marshal(MarshallerBridge.java:80)
	at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)
	at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:310)
	... 25 more
Caused by: javax.xml.transform.TransformerException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
	at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:242)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:257)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.writeDom(XMLSerializer.java:792)
	at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:112)
	at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
	at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:150)
	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:589)
	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:312)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:490)
	at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328)
	... 30 more
Caused by: javax.xml.transform.TransformerException: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.writeDom(XMLSerializer.java:790)
	... 40 more
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
	at com.sun.xml.bind.v2.runtime.XMLSerializer.attribute(XMLSerializer.java:433)
	at com.sun.xml.bind.v2.runtime.ContentHandlerAdaptor.startElement(ContentHandlerAdaptor.java:130)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(Unknown Source)
	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(Unknown Source)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(Unknown Source)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(Unknown Source)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(Unknown Source)
	... 43 more
Caused by: ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
	at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:381)
	at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:370)
	at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
	at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.write(UTF8XmlOutput.java:394)
	at com.sun.xml.bind.v2.runtime.output.Encoded.write(Encoded.java:163)
	at com.sun.xml.bind.v2.runtime.output.UTF8XmlOutput.attribute(UTF8XmlOutput.java:255)
	at com.sun.xml.bind.v2.runtime.XMLSerializer.attribute(XMLSerializer.java:431)
	... 53 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
	at java.net.SocketOutputStream.socketWrite0(Native Method)
	at java.net.SocketOutputStream.socketWrite(Unknown Source)
	at java.net.SocketOutputStream.write(Unknown Source)
	at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:737)
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)
	at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:349)
	at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:761)
	at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:127)
	at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570)
	at org.apache.coyote.Response.doWrite(Response.java:560)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)
	... 62 more

bizarro né… alguém saberia me dizer pq isso acontece ???

Ambiente que está sendo feita a validação: Windows Xp , tomcat 6, java 1.6.0.4 …

Obrigado!!

Isso é um bug do Xerces mesmo. Você vai ter que reportar no site da Apache.

Bom dia zackcavalera,

você conseguiu resolver esse problema ???

estou com o mesmo problema… e mesma situação…

javascript:void(0);

no meu caso resolveu aumentando o tamanho da propriedade “Thread Stack Size” do Tomcat … coloquei 2048 kb e não deu mais esse erro…

abraço

Eu já tinha encontrado a solução tb…

setei -Xss512k e ficou Show…

mais valew…

no meu caso foi caracter inválido nas informações adicionais!

Fica a dica!

Bento