Jon,
Sorry for the lengthy outputs.
ver 5.0.1 build: 20151118
Have tried this implementation and having an error when I make the call from my form that handles application with the prescribed code
Code: Select all
var formParms = { _var0: "Kotin", _var1: "Karwak" };
SchedulerServices.runBackgroundForm("R001_BACKGROUND", formParms, "Test Scheduler ROL: ");
Build:-
I have created a second form (R001_BACKGROUND) which handles the printing of the pdf, this form has the before form event. If I run this form, the job completes ok as shown below
Sat Feb 20 12:01:34: INFO <<START>>
Sat Feb 20 12:01:34: INFO Running Before Form event for R001_BACKGROUND
Sat Feb 20 12:01:34: INFO Executing Javascript script createPDF.js
Sat Feb 20 12:01:34: INFO schedulerService 1
Sat Feb 20 12:01:34: INFO schedulerService 1: logName: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\
Sat Feb 20 12:01:34: INFO schedulerService 1: fileName: kotinkarwak-20-02-2016-12-01-34.pdf
Sat Feb 20 12:01:34: INFO schedulerService 1: filePath: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\kotinkarwak-20-02-2016-12-01-34.pdf
Sat Feb 20 12:01:34: INFO TEST URLS: _var0: Default0 _var1: Default1
Sat Feb 20 12:01:34: INFO schedulerService 2
Sat Feb 20 12:01:34: INFO <-- Displaying page PagePDF0
Sat Feb 20 12:01:34: INFO <-- Displaying page PagePDF1
Sat Feb 20 12:01:34: INFO schedulerService 2: filename: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\kotinkarwak-20-02-2016-12-01-34.pdf
Sat Feb 20 12:01:34: INFO CREATEPDFSJS: filename: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\kotinkarwak-20-02-2016-12-01-34.pdf
Sat Feb 20 12:01:34: INFO Start of page Page_1
So appears error is when I call this from main form. The log file is as below
Sat Feb 20 11:56:24: INFO Button (ButJqZYi) clicked
Sat Feb 20 11:56:24: INFO Running On Click event for Control ButJqZYi
Sat Feb 20 11:56:24: INFO Executing Javascript script schedulerService.js
Sat Feb 20 11:56:24: INFO schedulerService 0
Sat Feb 20 11:56:24: INFO schedulerService 3
Sat Feb 20 11:56:25: INFO Running Before Form event for R001_BACKGROUND
Sat Feb 20 11:56:25: INFO Executing Javascript script createPDF.js
Sat Feb 20 11:56:25: INFO schedulerService 1
Sat Feb 20 11:56:25: INFO schedulerService 1: logName: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\
Sat Feb 20 11:56:25: INFO schedulerService 1: fileName: kotinkarwak-20-02-2016-11-56-25.pdf
Sat Feb 20 11:56:25: INFO schedulerService 1: filePath: C:\ebaseXi_5.0.1\UfsClient\IntegratedServer\ebasetest\Pdfs\kotinkarwak-20-02-2016-11-56-25.pdf
Sat Feb 20 11:56:25: INFO TEST URLS: _var0Default0 _var1: Default1
Sat Feb 20 11:56:25: INFO schedulerService 2
Sat Feb 20 11:56:25: ERROR Error printing pdf document
java.lang.NullPointerException
at com.ebasetech.ufs.utility.HttpUtil.adjustUrlToV4Format(HttpUtil.java:111)
at com.ebasetech.ufs.utility.HttpUtil.buildRequestURL(HttpUtil.java:100)
at com.ebasetech.ufs.runtime.output.PdfCommandProcessor.generateOutputFile(PdfCommandProcessor.java:59)
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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.Request.execute(Request.java:444)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:382)
at com.ebasetech.ufs.batch.FormRunner.run(FormRunner.java:101)
at com.ebasetech.ufs.batch.FormRunner.execute(FormRunner.java:52)
at com.ebasetech.ufs.batch.ExecutableTask.run(ExecutableTask.java:154)
at java.lang.Thread.run(Thread.java:745)
Sat Feb 20 11:56:25: ERROR Error printing document: null
Sat Feb 20 11:56:25: 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.Request.execute(Request.java:444)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:382)
at com.ebasetech.ufs.batch.FormRunner.run(FormRunner.java:101)
at com.ebasetech.ufs.batch.FormRunner.execute(FormRunner.java:52)
at com.ebasetech.ufs.batch.ExecutableTask.run(ExecutableTask.java:154)
at java.lang.Thread.run(Thread.java:745)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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)
... 17 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)
... 31 more
Sat Feb 20 11:56:25: INFO Transaction rolled back
Sat Feb 20 11:56:25: ERROR Unexpected error occurred during scheduled task execution for task id Test Scheduler ROL:
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.Request.execute(Request.java:444)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:413)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:382)
at com.ebasetech.ufs.batch.FormRunner.run(FormRunner.java:101)
at com.ebasetech.ufs.batch.FormRunner.execute(FormRunner.java:52)
at com.ebasetech.ufs.batch.ExecutableTask.run(ExecutableTask.java:154)
at java.lang.Thread.run(Thread.java:745)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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)
... 15 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)
... 31 more