Java版 - Java 用xsl文件做xml转换时抛出ArrayIndexOutOfBoundException |
|
|
|
|
|
J********r 发帖数: 36 | 1 如题,我试着减少xsl里的代码,程序就能正常运行了,感觉是XSL文件里的代码太
长了,但是又不能减少。一直调试不出来。 Stack Trace如下:
javax.xml.transform.TransformerException: java.lang.
ArrayIndexOutOfBoundsException: -1
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.
transform(TransformerImpl.java:716)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.
transform(TransformerImpl.java:313)
at preorder.XslResponseProcessor.transformResponse(XslResponseProcessor.
java:81)
at preorder.webservice.invoker.IaEdiInvoker.genericValidateAddress(
IaEdiInvoker.java:253)
at preorder.webservice.invoker.IaEdiInvoker.validateAddress(IaEdiInvoker
.java:123)
at preorder.webservice.AddressValidationByAddressRequest.
submitThisRequest(AddressValidationByAddressRequest.java:713)
at preorder.webservice.AddressPreorderRequest.submitRequest(
AddressPreorderRequest.java:179)
at preorder.webservice.GenericPreorderRequest.processRequest(
GenericPreorderRequest.java:108)
at preorder.webservice.AddressValidationByAddressRequest.main(
AddressValidationByAddressRequest.java:549)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2._type2(
SAX2DTM2.java:1989)
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2$
FollowingIterator.setStartNode(SAX2DTM2.java:1075)
at com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator.setStartNode
(StepIterator.java:95)
at com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator.setStartNode
(StepIterator.java:91)
at GregorSamsa.template$dot$0()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.
transform(AbstractTranslet.java:603)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.
transform(TransformerImpl.java:709)
... 8 more
---------
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2._type2(
SAX2DTM2.java:1989)
at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2$
FollowingIterator.setStartNode(SAX2DTM2.java:1075)
at com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator.setStartNode
(StepIterator.java:95)
at com.sun.org.apache.xalan.internal.xsltc.dom.StepIterator.setStartNode
(StepIterator.java:91)
at GregorSamsa.template$dot$0()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.applyTemplates()
at GregorSamsa.transform()
at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.
transform(AbstractTranslet.java:603)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.
transform(TransformerImpl.java:709)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.
transform(TransformerImpl.java:313)
at preorder.XslResponseProcessor.transformResponse(XslResponseProcessor.
java:81)
at preorder.webservice.invoker.IaEdiInvoker.genericValidateAddress(
IaEdiInvoker.java:253)
at preorder.webservice.invoker.IaEdiInvoker.validateAddress(IaEdiInvoker
.java:123)
at preorder.webservice.AddressValidationByAddressRequest.
submitThisRequest(AddressValidationByAddressRequest.java:713)
at preorder.webservice.AddressPreorderRequest.submitRequest(
AddressPreorderRequest.java:179)
at preorder.webservice.GenericPreorderRequest.processRequest(
GenericPreorderRequest.java:108)
at preorder.webservice.AddressValidationByAddressRequest.main(
AddressValidationByAddressRequest.java:549) |
|
|
|
|
|