Moqui:打开附件而不是下载附件
Moqui: opening an attachment instead of downloading it
如何指示浏览器在新选项卡中打开附件(PDF 或 JPEG)而不是下载附件?我想这是通过发送一个特定的响应来完成的——我发现了一个讨论设置响应参数的线程。有没有办法在 Moqui 中做到这一点?
有关信息,这是上述线程:
How to force files to open in browser instead of download (pdf)?
----------------------------添加 06.10.2016------------ --------------
我遇到了一个奇怪的行为。
有一个包含这些参数的表单列表 <form-list name="InvoiceList" list="invoiceList" skip-form="false" multi="true">
。
在行操作中,我调用了一个加载 invoiceContentLocation 的服务,应该有一个:<service-call name="mantle.account.InvoiceServicesEnhancements.get#InvoiceContentToDisplay" in-map="[invoiceId:invoiceId]" out-map="contentInfo"/>
.
有一个字段,一个 link 调用转换,目的是在单独的选项卡中打开内容。这是字段:<field name="invoiceContentLocation">
<default-field title="">
<link url="openContent"
condition="contentInfo.invoiceContentLocation"
icon="glyphicon glyphicon-file"
parameter-map="[invoiceContentLocation:contentInfo.invoiceContentLocation]"
link-type="anchor-button"
target-window="_blank"
tooltip="Open attachment of the invoice."
/>
</default-field>
</field>
过渡:<transition name="openContent" read-only="true">
<parameter name="invoiceContentLocation"/>
<actions>
<log message="Location ${invoiceContentLocation}." level="info"/>
<if condition="invoiceContentLocation!=null">
<script>ec.web.sendResourceResponse(invoiceContentLocation, true)</script>
</if>
</actions>
<error-response type="none"/>
<default-response type="none"/>
</transition>
内容始终在新标签页中正确打开,但有时会出现异常。即使对于相同的内容文件(一张发票),我也经历过这两种情况。
22:23:51.965 INFO 455896770-19 o.moqui.i.e.EntityFacadeImpl Found entities in 46 files in 19ms
22:23:51.965 INFO 455896770-19 o.moqui.i.e.EntityFacadeImpl Found 0 view-entity definitions in database (DbViewEntity records)
22:23:52.181 INFO 455896770-19 o.moqui.i.s.ScreenRenderImpl apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF in 359ms (text/html;charset=utf-8) session 19abbna66thi7zula8mifowqt
22:23:54.575 INFO 455896770-12 o.moqui.i.c.LoggerFacadeImpl Location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf.
22:23:54.646 INFO 455896770-12 o.moqui.i.c.WebFacadeImpl Streamed 946939 bytes from location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf
22:23:54.656 INFO 455896770-12 o.moqui.i.s.ScreenRenderImpl Transition apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent in 81ms, type none response
22:23:54.673 INFO 455896770-16 o.moqui.i.c.LoggerFacadeImpl Location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf.
22:23:54.680 ERROR 455896770-16 o.m.i.a.XmlAction Error running groovy script (org.eclipse.jetty.io.EofException):
1 : import org.moqui.impl.StupidUtilities
2 : import java.sql.Timestamp
3 : // these are in the context by default: ExecutionContext ec, Map context, Map result
4 : ec.logger.log("info", """Location ${invoiceContentLocation}.""", null)
5 : if (invoiceContentLocation!=null) {
6 :
7 : // begin inline script
8 : ec.web.sendResourceResponse(invoiceContentLocation, true)
9 : // end inline script
10 : }
11 :
12 : // make sure the last statement is not considered the return value
13 : return;
14 :
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?]
at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?]
at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?]
at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92]
at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92]
at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
... 62 more
22:23:54.686 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Transaction rollback. The rollback was originally caused by: Error running transition in [http://localhost:8080/apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent]
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?]
at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?]
at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?]
at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92]
at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92]
at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
... 62 more
22:23:54.693 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Transaction rollback for [Error running transition in [http://localhost:8080/apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent]]. Here is the current location:
org.moqui.BaseException: Rollback location
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:426) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:409) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:334) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) ~[moqui-framework-2.0.0.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[moqui.war:3.1.0]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
22:23:54.694 ERROR 455896770-16 o.m.i.w.MoquiServlet Internal error processing request: null
org.eclipse.jetty.io.EofException
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?]
at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?]
at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?]
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?]
at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?]
at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?]
at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) ~[moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0]
at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721]
at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
Caused by: java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92]
at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92]
at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92]
at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721]
... 62 more
22:23:54.699 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Rollback only not set on current transaction, status is STATUS_NO_TRANSACTION
22:23:54.699 ERROR 455896770-16 o.m.i.w.MoquiServlet Error rendering internal-error error screen, sending code 500 with message: null
java.lang.RuntimeException: Error rendering screen [component://webroot/screen/webroot.xml]
要查看详细信息,请查看简单的 MoquiFopServlet.groovy 文件。
基本上,如果您传递一个 'filename' 参数,那么它将添加一个带有附件和给定文件名的 Content-Disposition header。如果没有文件名参数,Content-Disposition header 将是简单的内联排序,PDF 将显示在浏览器中(好吧,取决于浏览器......)。
如何指示浏览器在新选项卡中打开附件(PDF 或 JPEG)而不是下载附件?我想这是通过发送一个特定的响应来完成的——我发现了一个讨论设置响应参数的线程。有没有办法在 Moqui 中做到这一点?
有关信息,这是上述线程: How to force files to open in browser instead of download (pdf)?
----------------------------添加 06.10.2016------------ --------------
我遇到了一个奇怪的行为。
有一个包含这些参数的表单列表 <form-list name="InvoiceList" list="invoiceList" skip-form="false" multi="true">
。
在行操作中,我调用了一个加载 invoiceContentLocation 的服务,应该有一个:<service-call name="mantle.account.InvoiceServicesEnhancements.get#InvoiceContentToDisplay" in-map="[invoiceId:invoiceId]" out-map="contentInfo"/>
.
有一个字段,一个 link 调用转换,目的是在单独的选项卡中打开内容。这是字段:<field name="invoiceContentLocation">
<default-field title="">
<link url="openContent"
condition="contentInfo.invoiceContentLocation"
icon="glyphicon glyphicon-file"
parameter-map="[invoiceContentLocation:contentInfo.invoiceContentLocation]"
link-type="anchor-button"
target-window="_blank"
tooltip="Open attachment of the invoice."
/>
</default-field>
</field>
过渡:<transition name="openContent" read-only="true">
<parameter name="invoiceContentLocation"/>
<actions>
<log message="Location ${invoiceContentLocation}." level="info"/>
<if condition="invoiceContentLocation!=null">
<script>ec.web.sendResourceResponse(invoiceContentLocation, true)</script>
</if>
</actions>
<error-response type="none"/>
<default-response type="none"/>
</transition>
内容始终在新标签页中正确打开,但有时会出现异常。即使对于相同的内容文件(一张发票),我也经历过这两种情况。
22:23:51.965 INFO 455896770-19 o.moqui.i.e.EntityFacadeImpl Found entities in 46 files in 19ms 22:23:51.965 INFO 455896770-19 o.moqui.i.e.EntityFacadeImpl Found 0 view-entity definitions in database (DbViewEntity records) 22:23:52.181 INFO 455896770-19 o.moqui.i.s.ScreenRenderImpl apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF in 359ms (text/html;charset=utf-8) session 19abbna66thi7zula8mifowqt 22:23:54.575 INFO 455896770-12 o.moqui.i.c.LoggerFacadeImpl Location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf. 22:23:54.646 INFO 455896770-12 o.moqui.i.c.WebFacadeImpl Streamed 946939 bytes from location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf 22:23:54.656 INFO 455896770-12 o.moqui.i.s.ScreenRenderImpl Transition apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent in 81ms, type none response 22:23:54.673 INFO 455896770-16 o.moqui.i.c.LoggerFacadeImpl Location dbresource://mantle/content/invoice/IMP_INV_918/content_100052/918_Fega_Frost_1162736029.pdf. 22:23:54.680 ERROR 455896770-16 o.m.i.a.XmlAction Error running groovy script (org.eclipse.jetty.io.EofException): 1 : import org.moqui.impl.StupidUtilities 2 : import java.sql.Timestamp 3 : // these are in the context by default: ExecutionContext ec, Map context, Map result 4 : ec.logger.log("info", """Location ${invoiceContentLocation}.""", null) 5 : if (invoiceContentLocation!=null) { 6 : 7 : // begin inline script 8 : ec.web.sendResourceResponse(invoiceContentLocation, true) 9 : // end inline script 10 : } 11 : 12 : // make sure the last statement is not considered the return value 13 : return; 14 :
org.eclipse.jetty.io.EofException at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?] at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?] at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?] at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] Caused by: java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92] at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92] at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92] at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92] at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] ... 62 more 22:23:54.686 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Transaction rollback. The rollback was originally caused by: Error running transition in [http://localhost:8080/apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent] org.eclipse.jetty.io.EofException at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?] at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?] at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?] at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] Caused by: java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92] at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92] at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92] at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92] at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] ... 62 more 22:23:54.693 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Transaction rollback for [Error running transition in [http://localhost:8080/apps/AccountantScreen/Accounting/Invoice/FindInvoiceNAF/openContent]]. Here is the current location: org.moqui.BaseException: Rollback location at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:426) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.TransactionFacadeImpl.rollback(TransactionFacadeImpl.groovy:409) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:334) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) ~[moqui-framework-2.0.0.jar:2.0.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[moqui.war:3.1.0] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] 22:23:54.694 ERROR 455896770-16 o.m.i.w.MoquiServlet Internal error processing request: null org.eclipse.jetty.io.EofException at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:197) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:420) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:313) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:140) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection$SendCallback.process(HttpConnection.java:741) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:521) ~[?:?] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:706) ~[?:?] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:755) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor$GzipBufferCB.process(GzipHttpOutputInterceptor.java:384) ~[?:?] at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[jetty-util-9.3.11.v20160721.jar:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.gzip(GzipHttpOutputInterceptor.java:146) ~[?:?] at org.eclipse.jetty.server.handler.gzip.GzipHttpOutputInterceptor.write(GzipHttpOutputInterceptor.java:115) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:179) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:163) ~[?:?] at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:415) ~[?:?] at org.moqui.impl.StupidUtilities.copyStream(StupidUtilities.groovy:268) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponseInternal(WebFacadeImpl.groovy:735) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl.sendResourceResponse(WebFacadeImpl.groovy:718) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.context.WebFacadeImpl$sendResourceResponse.call(Unknown Source) ~[?:?] at FindInvoiceNAF_xml_transition_openContent_actions.run(FindInvoiceNAF_xml_transition_openContent_actions:8) ~[script:?] at org.moqui.impl.actions.XmlAction.run(XmlAction.groovy:66) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenDefinition$TransitionItem.run(ScreenDefinition.groovy:698) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:222) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.recursiveRunTransition(ScreenRenderImpl.groovy:216) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.internalRender(ScreenRenderImpl.groovy:332) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.screen.ScreenRenderImpl.render(ScreenRenderImpl.groovy:159) ~[moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.doScreenRequest(MoquiServlet.groovy:82) [moqui-framework-2.0.0.jar:2.0.0] at org.moqui.impl.webapp.MoquiServlet.service(MoquiServlet.groovy:56) [moqui-framework-2.0.0.jar:2.0.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [moqui.war:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:225) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:461) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.Server.handle(Server.java:524) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.io.SelectChannelEndPoint.run(SelectChannelEndPoint.java:93) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [moqui.war:9.3.11.v20160721] at org.eclipse.jetty.util.thread.QueuedThreadPool.run(QueuedThreadPool.java:589) [moqui.war:9.3.11.v20160721] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92] Caused by: java.io.IOException: An established connection was aborted by the software in your host machine at sun.nio.ch.SocketDispatcher.writev0(Native Method) ~[?:1.8.0_92] at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:55) ~[?:1.8.0_92] at sun.nio.ch.IOUtil.write(IOUtil.java:148) ~[?:1.8.0_92] at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504) ~[?:1.8.0_92] at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:177) ~[jetty-io-9.3.11.v20160721.jar:9.3.11.v20160721] ... 62 more 22:23:54.699 WARN 455896770-16 o.moqui.i.c.TransactionFacadeImpl Rollback only not set on current transaction, status is STATUS_NO_TRANSACTION 22:23:54.699 ERROR 455896770-16 o.m.i.w.MoquiServlet Error rendering internal-error error screen, sending code 500 with message: null java.lang.RuntimeException: Error rendering screen [component://webroot/screen/webroot.xml]
要查看详细信息,请查看简单的 MoquiFopServlet.groovy 文件。
基本上,如果您传递一个 'filename' 参数,那么它将添加一个带有附件和给定文件名的 Content-Disposition header。如果没有文件名参数,Content-Disposition header 将是简单的内联排序,PDF 将显示在浏览器中(好吧,取决于浏览器......)。