printing no longer works after migrating to SSL

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

printing no longer works after migrating to SSL

#1

Postby Segi » Mon Jan 25, 2016 4:55 pm

I made a change to our production server this weekend by configuring it to run over SSL and it appears to be working correctly.

We suddenly have an issue where any form that calls the function form.generatePdf() gives the error java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null

I don't know how or why switching to SSL would affect printing to PDF

I did a test and removed useHttpOnly="true" from tomcat\conf\context.xml so I can browse the unsecure and secure versions of my form. If I go to the unsecure version of my form, printing does work. If I add https:// in front of the URL for that same form, I get the same error "java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null"

The full message logged to the server log is this:

Code: Select all

com.ebasetech.xi.exceptions.FormRuntimeException: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.handleExecutionErrors(JVMScriptNode.java:213)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:113)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:444)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
	at com.ebasetech.ufs.runtime.Request._execute(Request.java:348)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:313)
	at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:502)
	at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:70)
	at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:38)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at formservlets.EbaseFilter.processRequest(EbaseFilter.java:223)
	at formservlets.EbaseFilter.performFilter(EbaseFilter.java:173)
	at formservlets.EbaseFilter.doFilter(EbaseFilter.java:99)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:405)
	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 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
	at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1284)
	at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1251)
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:114)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute_(JVMScriptNode.java:132)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:98)
	... 45 more
Caused by: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.output.OutputCommandProcessor.execute(OutputCommandProcessor.java:70)
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:386)
	... 61 more
Last edited by Segi on Mon Jan 25, 2016 5:54 pm, edited 1 time in total.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Mon Jan 25, 2016 5:42 pm

Do you have the full stack trace please, all the way down to the last line - the really interesting bit is right at the bottom!
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#3

Postby Segi » Mon Jan 25, 2016 5:58 pm

Jon,

I copied a huge chunk of code form the server log so the same error message may be repeated multiple times

Code: Select all

Mon Jan 25 09:47:05: ERROR Error printing pdf document
java.lang.NullPointerException
	at com.ebasetech.ufs.validation.outbound.ITextMultipleDocumentRenderer$1.getImageResource(ITextMultipleDocumentRenderer.java:186)
	at org.xhtmlrenderer.pdf.ITextReplacedElementFactory.getITextImage(ITextReplacedElementFactory.java:99)
	at org.xhtmlrenderer.pdf.ITextReplacedElementFactory.createReplacedElement(ITextReplacedElementFactory.java:58)
	at org.xhtmlrenderer.render.BlockBox.createReplacedElement(BlockBox.java:552)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1490)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidthInlineChildren(BlockBox.java:1636)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1533)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.recalcColumn(TableBox.java:1243)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.fullRecalc(TableBox.java:1217)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.calcMinMaxWidth(TableBox.java:1553)
	at org.xhtmlrenderer.newtable.TableBox.calcMinMaxWidth(TableBox.java:161)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidthBlockChildren(BlockBox.java:1588)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1530)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidthBlockChildren(BlockBox.java:1588)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1530)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidthBlockChildren(BlockBox.java:1588)
	at org.xhtmlrenderer.render.BlockBox.calcMinMaxWidth(BlockBox.java:1530)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.recalcColumn(TableBox.java:1243)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.fullRecalc(TableBox.java:1217)
	at org.xhtmlrenderer.newtable.TableBox$AutoTableLayout.calcMinMaxWidth(TableBox.java:1553)
	at org.xhtmlrenderer.newtable.TableBox.calcMinMaxWidth(TableBox.java:161)
	at org.xhtmlrenderer.newtable.TableBox.layout(TableBox.java:224)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild0(BlockBoxing.java:321)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild(BlockBoxing.java:299)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutContent(BlockBoxing.java:90)
	at org.xhtmlrenderer.render.BlockBox.layoutChildren(BlockBox.java:984)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:864)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:793)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild0(BlockBoxing.java:321)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild(BlockBoxing.java:299)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutContent(BlockBoxing.java:90)
	at org.xhtmlrenderer.render.BlockBox.layoutChildren(BlockBox.java:984)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:864)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:793)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild0(BlockBoxing.java:321)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutBlockChild(BlockBoxing.java:299)
	at org.xhtmlrenderer.layout.BlockBoxing.layoutContent(BlockBoxing.java:90)
	at org.xhtmlrenderer.render.BlockBox.layoutChildren(BlockBox.java:984)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:864)
	at org.xhtmlrenderer.render.BlockBox.layout(BlockBox.java:793)
	at com.ebasetech.ufs.validation.outbound.ITextMultipleDocumentRenderer.layout(ITextMultipleDocumentRenderer.java:255)
	at com.ebasetech.ufs.runtime.output.PdfCommandProcessor.generateOutputFile(PdfCommandProcessor.java:68)
	at com.ebasetech.ufs.runtime.output.OutputCommandProcessor.execute(OutputCommandProcessor.java:53)
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:386)
	at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
	at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1284)
	at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1251)
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:114)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute_(JVMScriptNode.java:132)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:98)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:444)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
	at com.ebasetech.ufs.runtime.Request._execute(Request.java:348)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:313)
	at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:502)
	at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:70)
	at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:38)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at formservlets.EbaseFilter.processRequest(EbaseFilter.java:223)
	at formservlets.EbaseFilter.performFilter(EbaseFilter.java:173)
	at formservlets.EbaseFilter.doFilter(EbaseFilter.java:99)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Mon Jan 25 09:47:05: ERROR Error printing document: null
Mon Jan 25 09:47:05: ERROR java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler$RhinoScriptException: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.handleExecutionErrors(JavascriptExecutionHandler.java:178)
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:118)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute_(JVMScriptNode.java:132)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:98)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:444)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
	at com.ebasetech.ufs.runtime.Request._execute(Request.java:348)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:313)
	at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:502)
	at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:70)
	at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:38)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at formservlets.EbaseFilter.processRequest(EbaseFilter.java:223)
	at formservlets.EbaseFilter.performFilter(EbaseFilter.java:173)
	at formservlets.EbaseFilter.doFilter(EbaseFilter.java:99)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:405)
	at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
	at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1284)
	at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1251)
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:114)
	... 47 more
Caused by: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.output.OutputCommandProcessor.execute(OutputCommandProcessor.java:70)
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:386)
	... 60 more
Mon Jan 25 09:47:05: ERROR com.ebasetech.xi.exceptions.FormRuntimeException: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
Mon Jan 25 09:47:05:  Unexpected error occurred - see server log
Mon Jan 25 09:47:05: ERROR Unexpected error occurred
com.ebasetech.xi.exceptions.FormRuntimeException: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.handleExecutionErrors(JVMScriptNode.java:213)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:113)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
	at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
	at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:444)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
	at com.ebasetech.ufs.runtime.Request._execute(Request.java:348)
	at com.ebasetech.ufs.runtime.Request.execute(Request.java:313)
	at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:502)
	at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:70)
	at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:38)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at formservlets.EbaseFilter.processRequest(EbaseFilter.java:223)
	at formservlets.EbaseFilter.performFilter(EbaseFilter.java:173)
	at formservlets.EbaseFilter.doFilter(EbaseFilter.java:99)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:405)
	at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
	at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1284)
	at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1251)
	at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:114)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute_(JVMScriptNode.java:132)
	at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:98)
	... 45 more
Caused by: com.ebasetech.ufs.kernel.FormException: Error printing document: null
	at com.ebasetech.ufs.runtime.output.OutputCommandProcessor.execute(OutputCommandProcessor.java:70)
	at com.ebasetech.ufs.runtime.external.api.impl.WebFormImpl.generatePdf(WebFormImpl.java:386)
	... 60 more
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#4

Postby Segi » Mon Jan 25, 2016 6:02 pm

I've noticed something else. In the Admin app under Server Properties->PDF Properties there are PDF specific settings. Do I need to provide a Local Base URL when using SSL ?

I entered the following base URLs but they all give me the same error. If I remove the base URL and leave it blank it does print over http.

http://localhost/ufs
http://intranet.ourdomain.com/ufs
https://localhost/ufs
https://intranet.ourdomain.com/ufs
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#5

Postby Steve » Tue Jan 26, 2016 9:14 am

Hi Segi,

I do not think that there is an issue printing over SSL.

If I understand correctly, you have configured SSL on the Ebase server? Is that correct?

I do not this that the Local Base URL is working as it should. This is usually configured when the request is coming through an IIS server (or firewall) and the Ebase server needs to tell the PDF rendering engine to look for all relative images and other resources on the local machine.

If the URL connects directly to Ebase and not routed through IIS, then you will not need to set the local base URL.

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#6

Postby Steve » Tue Jan 26, 2016 10:50 am

Hi Segi,


I configured my Ebase server SSL connector. When trying to print a PDF with an image on the PDF page, I had the same error.

When printing the same form without SSL, it printed fine.

It appears to be a bug reading images and css files when trying to generate a PDF using SSL.

I tested this on version 5.0.1 of Ebase. I would expect the same problem to occur in Ebase version 4.5.4

I will add this to the bug database.

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#7

Postby Steve » Tue Jan 26, 2016 1:05 pm

Hi Segi,

I have looked into this problem a bit further and I found what the problems are.

When the image (or other resource) is loaded within the PDF renderer, it is throwing an SSL authentication error. This error is hidden from the log.

I had two errors:

1) When the image was loaded an exception was being thrown:

Code: Select all

java.security.cert.CertificateException: No name matching localhost found
This was because the CN (common name) in my certificate I generated was not called "localhost". I fixed this by recreating my keystore and making sure that the CN was set to localhost.

After fixing my certificate...

2) I then encountered a different exception:

Code: Select all

java.security.cert.CertificateException: Unable to find valid certification  path to requested target
To fix this I needed to add the following system properties to my startup:

Code: Select all

-Djavax.net.ssl.keyStorePassword=<keystore-password>
-Djavax.net.ssl.keyStore=<path-to-keystore>
-Djavax.net.ssl.trustStorePassword=<keystore-password>
-Djavax.net.ssl.trustStore=<path-to-keystore>
If you are starting the web server as a windows service. You can configure this in the tomcat service dialog located:

<ebase-install-dir>/UfsServer/tomcat/bin/Ebase_Xi_V5w.exe

Double click this and add the above system properties to Java Options located on the Java tab.

That should fix your problem.

I am assuming you have also configured your keystore location in the tomcat SSL connector port located in the server.xml inside the UfsServer/tomcat/conf folder?

Code: Select all

<Connector
           protocol="org.apache.coyote.http11.Http11Protocol"
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="$&#123;user.home&#125;/.keystore" keystorePass="changeit"
           clientAuth="false" sslProtocol="TLS"/>

An alternative to the above solution when developing on localhost is to add a Java class and invoke a method that executes the following code:

Code: Select all

//for localhost testing only
	    javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier&#40;
	    new javax.net.ssl.HostnameVerifier&#40;&#41;&#123;

	        public boolean verify&#40;String hostname,
	                javax.net.ssl.SSLSession sslSession&#41; &#123;
	            if &#40;hostname.equals&#40;"localhost"&#41;&#41; &#123;
	                return true;
	            &#125;
	            return false;
	        &#125;
	    &#125;&#41;;

I hope this helps

Steve
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#8

Postby Steve » Tue Jan 26, 2016 1:08 pm

If you have a proper generated certificate for the server and it is imported into your keystore I do not think you will have this problem.

Steve
0 x

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

#9

Postby Segi » Tue Jan 26, 2016 5:20 pm

Steve,

I had already referenced the keystore file and password in server.xml. Your solution of adding

-Djavax.net.ssl.keyStorePassword=<keystore>
-Djavax.net.ssl.keyStore=<path>
-Djavax.net.ssl.trustStorePassword=<keystore>
-Djavax.net.ssl.trustStore=<path>

to the startup parameters fixed the problem. Thanks for the help.
0 x


Who is online

Users browsing this forum: No registered users and 3 guests