在ORBEON 4.1上传文件时出现StackOverflowError

时间:2013-05-09 11:19:00

标签: java orbeon stack-overflow

我们在Orbeon 4.1中通过上传控件上传文件时出现StackOverflowError错误。:

java.lang.StackOverflowError
at org.orbeon.msv.datatype.regexp.Op$RangeOp.getToken(Op.java:262)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1702)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1912)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
.
.
.
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1912)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1912)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1912)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1912)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matchString(RegularExpression.java:1938)
at org.orbeon.msv.datatype.regexp.RegularExpression.matches(RegularExpression.java:1472)
at org.orbeon.msv.datatype.regexp.RegularExpression.matches(RegularExpression.java:1410)
at org.orbeon.msv.datatype.regexp.InternalImpl$1.matches(InternalImpl.java:25)
at org.orbeon.msv.datatype.xsd.AnyURIType.checkFormat(AnyURIType.java:35)
at org.orbeon.msv.datatype.xsd.XSDatatypeImpl.isValid(XSDatatypeImpl.java:80)
at org.orbeon.msv.verifier.regexp.StringToken.match(StringToken.java:69)
at org.orbeon.msv.verifier.regexp.ResidualCalculator.onData(ResidualCalculator.java:135)
at org.orbeon.msv.grammar.DataExp.visit(DataExp.java:70)
at org.orbeon.msv.verifier.regexp.ResidualCalculator.calcResidual(ResidualCalculator.java:75)
at org.orbeon.msv.verifier.regexp.ExpressionAcceptor.stepForward(ExpressionAcceptor.java:296)
at org.orbeon.msv.verifier.regexp.ExpressionAcceptor.onText2(ExpressionAcceptor.java:338)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateChildren(XFormsModelSchemaValidator.java:640)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateElement(XFormsModelSchemaValidator.java:351)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateChildren(XFormsModelSchemaValidator.java:594)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateElement(XFormsModelSchemaValidator.java:351)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateChildren(XFormsModelSchemaValidator.java:594)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateElement(XFormsModelSchemaValidator.java:351)
at org.orbeon.oxf.xforms.XFormsModelSchemaValidator.validateInstance(XFormsModelSchemaValidator.java:773)
at org.orbeon.oxf.xforms.XFormsModel.doRevalidate(XFormsModel.java:819)
at org.orbeon.oxf.xforms.XFormsModel.performDefaultAction(XFormsModel.java:445)
at org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1.apply$mcV$sp(Dispatch.scala:132)
at org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1.apply(Dispatch.scala:68)
at org.orbeon.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1.apply(Dispatch.scala:68)
at org.orbeon.oxf.xforms.event.Dispatch$.withEvent$1(Dispatch.scala:33)
at org.orbeon.oxf.xforms.event.Dispatch$.dispatchEvent(Dispatch.scala:67)
at org.orbeon.oxf.xforms.event.Dispatch.dispatchEvent(Dispatch.scala)
at org.orbeon.oxf.xforms.XFormsModel.rebuildRecalculateRevalidateIfNeeded(XFormsModel.java:966)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$$anonfun$rebuildRecalculateRevalidateIfNeeded$1.apply(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$$anonfun$rebuildRecalculateRevalidateIfNeeded$1.apply(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.XBLContainer$$anonfun$doInSelfAndDescendants$1.apply(XBLContainer.scala:185)
at org.orbeon.oxf.xforms.xbl.XBLContainer$$anonfun$doInSelfAndDescendants$1.apply(XBLContainer.scala:184)
at scala.collection.immutable.List.foreach(List.scala:309)
at org.orbeon.oxf.xforms.xbl.XBLContainer.doInSelfAndDescendants(XBLContainer.scala:184)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.rebuildRecalculateRevalidateIfNeeded(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.XBLContainer.rebuildRecalculateRevalidateIfNeeded(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.synchronizeAndRefresh(XBLContainer.scala:300)
at org.orbeon.oxf.xforms.xbl.XBLContainer.synchronizeAndRefresh(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.endOutermostActionHandler(XBLContainer.scala:276)
at org.orbeon.oxf.xforms.xbl.XBLContainer.endOutermostActionHandler(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.XFormsModel.rebuildRecalculateRevalidateIfNeeded(XFormsModel.java:962)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$$anonfun$rebuildRecalculateRevalidateIfNeeded$1.apply(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$$anonfun$rebuildRecalculateRevalidateIfNeeded$1.apply(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.XBLContainer$$anonfun$doInSelfAndDescendants$1.apply(XBLContainer.scala:185)
at org.orbeon.oxf.xforms.xbl.XBLContainer$$anonfun$doInSelfAndDescendants$1.apply(XBLContainer.scala:184)
at scala.collection.immutable.List.foreach(List.scala:309)
at org.orbeon.oxf.xforms.xbl.XBLContainer.doInSelfAndDescendants(XBLContainer.scala:184)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.rebuildRecalculateRevalidateIfNeeded(XBLContainer.scala:311)
at org.orbeon.oxf.xforms.xbl.XBLContainer.rebuildRecalculateRevalidateIfNeeded(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.synchronizeAndRefresh(XBLContainer.scala:300)
at org.orbeon.oxf.xforms.xbl.XBLContainer.synchronizeAndRefresh(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.xbl.RefreshSupport$class.endOutermostActionHandler(XBLContainer.scala:276)
at org.orbeon.oxf.xforms.xbl.XBLContainer.endOutermostActionHandler(XBLContainer.scala:53)
at org.orbeon.oxf.xforms.event.ClientEvents$$anonfun$processEvent$1.apply$mcV$sp(ClientEvents.scala:508)
at org.orbeon.oxf.xforms.event.ClientEvents$$anonfun$processEvent$1.apply(ClientEvents.scala:470)
at org.orbeon.oxf.xforms.event.ClientEvents$$anonfun$processEvent$1.apply(ClientEvents.scala:470)
at org.orbeon.oxf.util.Logging$class.withDebug(Logging.scala:43)
at org.orbeon.oxf.xforms.event.ClientEvents$.withDebug(ClientEvents.scala:36)
at org.orbeon.oxf.xforms.event.ClientEvents$.processEvent(ClientEvents.scala:470)
at org.orbeon.oxf.xforms.event.ClientEvents$$anonfun$processEvents$1.apply(ClientEvents.scala:127)
at org.orbeon.oxf.xforms.event.ClientEvents$$anonfun$processEvents$1.apply(ClientEvents.scala:126)
at scala.collection.immutable.List.foreach(List.scala:309)
at org.orbeon.oxf.xforms.event.ClientEvents$.processEvents(ClientEvents.scala:126)
at org.orbeon.oxf.xforms.event.ClientEvents.processEvents(ClientEvents.scala)
at org.orbeon.oxf.xforms.processor.XFormsServer$2.run(XFormsServer.java:208)
at org.orbeon.oxf.xforms.action.XFormsAPI$$anonfun$withContainingDocumentJava$1.apply$mcV$sp(XFormsAPI.scala:47)
at org.orbeon.oxf.xforms.action.XFormsAPI$$anonfun$withContainingDocumentJava$1.apply(XFormsAPI.scala:47)
at org.orbeon.oxf.xforms.action.XFormsAPI$$anonfun$withContainingDocumentJava$1.apply(XFormsAPI.scala:47)
at org.orbeon.oxf.util.DynamicVariable.withValue(DynamicVariable.scala:40)
at org.orbeon.oxf.xforms.action.XFormsAPI$.withContainingDocument(XFormsAPI.scala:52)
at org.orbeon.oxf.xforms.action.XFormsAPI$.withContainingDocumentJava(XFormsAPI.scala:46)
at org.orbeon.oxf.xforms.action.XFormsAPI.withContainingDocumentJava(XFormsAPI.scala)
at org.orbeon.oxf.xforms.processor.XFormsServer.doIt(XFormsServer.java:191)
at org.orbeon.oxf.xforms.processor.XFormsServer.access$000(XFormsServer.java:62)
at org.orbeon.oxf.xforms.processor.XFormsServer$1.readImpl(XFormsServer.java:88)
at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:258)
at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:404)
at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:262)
at org.orbeon.oxf.processor.pipeline.TeeProcessor$TeeProcessorOutputImpl.readImpl(TeeProcessor.java:89)
at org.orbeon.oxf.processor.impl.ProcessorOutputImpl$TopLevelOutputFilter.read(ProcessorOutputImpl.java:258)
at org.orbeon.oxf.processor.impl.ProcessorOutputImpl.read(ProcessorOutputImpl.java:404)
at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:262)
at org.orbeon.oxf.processor.ProcessorImpl.readInputAsTinyTree(ProcessorImpl.java:288)
at org.orbeon.oxf.processor.ProcessorImpl$3.read(ProcessorImpl.java:317)
at org.orbeon.oxf.processor.ProcessorImpl$3.read(ProcessorImpl.java:315)
at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsObject(ProcessorImpl.java:363)
at org.orbeon.oxf.processor.ProcessorImpl.readCacheInputAsTinyTree(ProcessorImpl.java:315)
at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:186)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor$4.run(PipelineProcessor.java:617)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:679)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:614)
at org.orbeon.oxf.processor.pipeline.choose.ConcreteChooseProcessor.start(ConcreteChooseProcessor.java:248)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor$4.run(PipelineProcessor.java:617)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor.executeChildren(PipelineProcessor.java:679)
at org.orbeon.oxf.processor.pipeline.PipelineProcessor.start(PipelineProcessor.java:614)
at org.orbeon.oxf.pipeline.InitUtils$.runProcessor(InitUtils.scala:81)
at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.scala:40)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$service$1.apply$mcV$sp(OrbeonServlet.scala:74)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$service$1.apply(OrbeonServlet.scala:67)
at org.orbeon.oxf.servlet.OrbeonServlet$$anonfun$service$1.apply(OrbeonServlet.scala:67)
at org.orbeon.oxf.util.ScalaUtils$.withRootException(ScalaUtils.scala:118)
at org.orbeon.oxf.servlet.OrbeonServlet.service(OrbeonServlet.scala:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at cz.sefira.j2ee.filters.BadCharacterRemover.doFilter(BadCharacterRemover.java:40)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

经测试的URI为file:/tmp/xforms_upload_1442468717846302111.tmp?filename=C%3A%5CUsers%5Ctisler%5CDownloads%5Cschody2012.grant&mediatype=text%2Fplain&size=1498&mac=e8f3b5f6a2f107958ae45bdbfae576a77adce2a6

应用程序是没有FormRunner / Builder的普通XFORMS应用程序。上传代码片段是:

            <xforms:upload ref="." xxforms:size="60">
              <xforms:filename ref="@filename"/>
              <xforms:mediatype ref="@mediatype"/>
              <xxforms:size ref="@size"/>
              <xforms:alert>&#160;Není vybrán soubor a nebo překračuje povolenou velikost (3MB)</xforms:alert>
            </xforms:upload>

并绑定到<file filename="" mediatype="" size="0"/> xml片段。

环境:Linux 2.6.18-274.el5PAE上的WLS 10.3.5.0,SUN JAVA 1.6.0_24。在开发服务器上(WLS 10.3.3.0,SUN JAVA 1.6.0_23,Windows 7一切正常。

正则表达式和测试过的字符串在java正则表达式类中都可以。

编辑:

第35行的org.orbeon.msv.dataype.xsd.AnyURIType中的正则表达式为:([a-zA-Z][A-Za-z0-9\+\-\.]*:((((//(((((([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[;:&=\+$,])*@)?((([0-9a-zA-Z]([0-9A-Za-z\-]*[0-9a-zA-Z])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|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[:@&=\+$,])*)*))*))|((([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[;@&=\+$,])+(/(((([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[:@&=\+$,])*(;(([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[:@&=\+$,])*)*)(/((([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[:@&=\+$,])*(;(([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2}|[:@&=\+$,])*)*))*))?))(\?([;/\?:@&=\+$,\[\]]|([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2})*)?)?(#([;/\?:@&=\+$,\[\]]|([0-9a-zA-Z]|[\-_\.!~\*'\(\)])|%[0-9a-fA-F]{2})*)?

同一个表达式被多次调用,第一个调用总是正常(一些内部ORBEON URI被测试),以下调用中的最后一个几乎每次都抛出一个StackOverflowError。

AnyURIType类第35行的测试URL序列为:

  • /services/prilohaDownload?id=1882
  • /services/prilohaDownload?id=1882
  • /services/prilohaDownload?id=1882
  • empty string
  • /services/prilohaDownload?id=1882
  • file:/tmp/xforms_upload_8919864313517610561.tmp?filename=C%3A%5CUsers%5Ctisler%5CDownloads%5Cpocketbook_301plus_upgrade_manual.doc&mediatype=application%2Fmsword&size=23040&mac=1ca817ef35b22dd74b809332896c580ef5ee08fe

0 个答案:

没有答案