<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: ivy.html.startref throws exception on server</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server</link><description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;I just found out that this method:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp")
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;throws an exception on the ivy server, but not in the Designer&lt;/p&gt;
&lt;p&gt;Why ? 
What am I missing ?&lt;/p&gt;
&lt;p&gt;Best Regards,
Yordan Yunchov&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 15 Sep 2016 14:52:47 -0400</lastBuildDate><item><title>Answer by Stelt0</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server/2029</link><description>&lt;p&gt;Hello All,&lt;/p&gt;
&lt;p&gt;here is the process:&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/Capture.JPG"&gt;
&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/Capture2.JPG"&gt;&lt;/p&gt;
&lt;p&gt;Error Message:&lt;/p&gt;
&lt;p&gt;NullPointerException: Receiver of method 'startref' is null
    IvyScriptRuntimeException: IvyScript Runtime Exception in
        Instruction:
            ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp")
        Block:
            &amp;lt;java.lang.string incidentid,java.lang.string="" cockpithomeurl,java.lang.string="" cockpiturl,java.lang.string="" channelid=""&amp;gt; param;
            param.incidentId = in.incidentId;
            param.cockpitHomeUrl = ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp");
            param.cockpitUrl = com.frox.sbc.dashboard.UrlHelper.generateCockpitAlarmUrl(in.incidentId);
            param.channelId = in.channelId;
    BpmError: ivy:error:script
    RequestException: ivy:error:script
    Web service process  (1560CD9E31B754A1) call failed [start=newEvent(String,String), user=User [id=1], inputparam={incidentId=INC000000041703, channelId=SLM01101}]&lt;/p&gt;
&lt;p&gt;Stack Trace:&lt;/p&gt;
&lt;p&gt;[errorId=1572DDF0F2FCFBF1, request=1560CD9E31B754A1/1560CD9E31B754A1-ws0/wsCall(17.17.0.0), session=0 (SYSTEM), task=17, application=2147483647, requestId=42626, executionContext=SYSTEM, pmv=designer$EventDashBoard2$1, client=127.0.0.1]
ch.ivyteam.ivy.request.RequestException: ivy:error:script
    at ch.ivyteam.ivy.request.RequestException$RequestExceptionBuilder.build(RequestException.java:161)
    at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleNormalRequest(BpmEngine.java:195)
    at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleRequestWithinContext(BpmEngine.java:140)
    at ch.ivyteam.ivy.request.impl.ContextAwareRequestHandler.handleRequest(ContextAwareRequestHandler.java:32)
    at ch.ivyteam.ivy.webservice.process.internal.WebServiceProcessBeanEngine.handleRequest(WebServiceProcessBeanEngine.java:300)
    at ch.ivyteam.ivy.webservice.process.internal.WebServiceProcessBeanRuntime.fireWebServiceProcessStart(WebServiceProcessBeanRuntime.java:74)
    at ch.ivyteam.ivy.webservice.process.restricted.AbstractWebServiceProcess.executeProcessWithUserException(AbstractWebServiceProcess.java:60)
    at ch.ivyteam.ivy.webservice.process.restricted.AbstractWebServiceProcess.executeProcess(AbstractWebServiceProcess.java:42)
    at com.frox.sbc.eventdashboard.process.sendEvent.newEvent(sendEvent.java:34)
    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.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
    at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
    at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:102)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:464)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:188)
    at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at ch.ivyteam.ivy.webserver.internal.IvyFilter.doFilterInternal(IvyFilter.java:267)
    at ch.ivyteam.ivy.webserver.internal.IvyFilter.doFilter(IvyFilter.java:172)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at ch.ivyteam.ivy.webserver.internal.IvyExecuteAsSystemFilter$1.call(IvyExecuteAsSystemFilter.java:45)
    at ch.ivyteam.ivy.webserver.internal.IvyExecuteAsSystemFilter$1.call(IvyExecuteAsSystemFilter.java:1)
    at ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1467)
    at ch.ivyteam.ivy.webserver.internal.IvyExecuteAsSystemFilter.doFilter(IvyExecuteAsSystemFilter.java:39)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:89)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
    at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
    at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at ch.ivyteam.ivy.webserver.internal.PerformanceLogValve.invoke(PerformanceLogValve.java:55)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
[errorId=1572DDF0F2FCFBF1, request=1560CD9E31B754A1/1560CD9E31B754A1-ws0/wsCall(17.17.0.0), session=0 (SYSTEM), task=17, application=2147483647, requestId=42626, executionContext=SYSTEM, pmv=designer$EventDashBoard2$1, client=127.0.0.1, processElement=1560CD9E31B754A1-f1]
Caused by: BpmError ivy:error:script
 Unique ID: 1572DDF0F2FCFBF1
 Process Element: SendEventAsync &amp;lt;1560CD9E31B754A1-f1&amp;gt;
    at ch.ivyteam.ivy.bpm.error.BpmErrorBuilder.build(BpmErrorBuilder.java:204)
    at ch.ivyteam.ivy.bpm.engine.restricted.error.BpmErrorConverter.toBpmError(BpmErrorConverter.java:30)
    at ch.ivyteam.ivy.bpm.exec.restricted.scripting.IvyScriptExecutor.execute(IvyScriptExecutor.java:203)
    at ch.ivyteam.ivy.bpm.exec.internal.activity.call.trigger.TriggerCallExecutor.createParameter(TriggerCallExecutor.java:88)
    at ch.ivyteam.ivy.bpm.exec.internal.activity.call.trigger.TriggerCallExecutor.execute(TriggerCallExecutor.java:77)
    at ch.ivyteam.ivy.bpm.exec.internal.activity.call.trigger.TriggerCallExecutor.execute(TriggerCallExecutor.java:1)
    at ch.ivyteam.ivy.bpm.engine.internal.model.bpmn.SimpleActivityExecutorAdapter.execute(SimpleActivityExecutorAdapter.java:36)
    at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.lambda$0(ProcessElement.java:215)
    at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.executeInElementContext(ProcessElement.java:286)
    at ch.ivyteam.ivy.bpm.engine.internal.model.ProcessElement.execute(ProcessElement.java:215)
    at ch.ivyteam.ivy.bpm.engine.internal.core.ProcessElementExecution.execute(ProcessElementExecution.java:37)
    at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleExecution(RequestProcessor.java:140)
    at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.processRequest(RequestProcessor.java:130)
    at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:95)
    at ch.ivyteam.ivy.bpm.engine.internal.core.RequestProcessor.handleRequest(RequestProcessor.java:77)
    at ch.ivyteam.ivy.bpm.engine.internal.BpmEngine.handleNormalRequest(BpmEngine.java:191)
    ... 65 more
[errorId=1572DDF0F2FCFBF1, request=1560CD9E31B754A1/1560CD9E31B754A1-ws0/wsCall(17.17.0.0), session=0 (SYSTEM), task=17, application=2147483647, requestId=42626, executionContext=0 (SYSTEM), pmv=designer$EventDashBoard2$1, client=127.0.0.1, processElement=1560CD9E31B754A1-f1]
Caused by: ch.ivyteam.ivy.scripting.exceptions.runtime.IvyScriptRuntimeException: IvyScript Runtime Exception in
    Instruction:
        ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp")
    Block:
        &amp;lt;java.lang.string incidentid,java.lang.string="" cockpithomeurl,java.lang.string="" cockpiturl,java.lang.string="" channelid=""&amp;gt; param;
        param.incidentId = in.incidentId;
        param.cockpitHomeUrl = ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp");
        param.cockpitUrl = com.frox.sbc.dashboard.UrlHelper.generateCockpitAlarmUrl(in.incidentId);
        param.channelId = in.channelId;
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEnginePerformer.wrapException(IvyScriptEnginePerformer.java:1672)
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEnginePerformer.visitControlInstructionInvoke(IvyScriptEnginePerformer.java:678)
    at ch.ivyteam.ivy.scripting.internal.language.ControlInstructionInvoke.acceptControlInstructionVisitor(ControlInstructionInvoke.java:98)
    at ch.ivyteam.ivy.scripting.internal.language.ControlInstruction.acceptInstructionVisitor(ControlInstruction.java:55)
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEnginePerformer.execute(IvyScriptEnginePerformer.java:170)
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEnginePerformer.execute(IvyScriptEnginePerformer.java:126)
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEngine.executeInternal(IvyScriptEngine.java:310)
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEngine.execute(IvyScriptEngine.java:279)
    at ch.ivyteam.ivy.bpm.exec.restricted.scripting.IvyScriptExecutor$1.call(IvyScriptExecutor.java:222)
    at ch.ivyteam.ivy.security.internal.SecurityContext.executeAs(SecurityContext.java:1562)
    at ch.ivyteam.ivy.bpm.exec.restricted.scripting.IvyScriptExecutor.executeSecurely(IvyScriptExecutor.java:239)
    at ch.ivyteam.ivy.bpm.exec.restricted.scripting.IvyScriptExecutor.executeInstruction(IvyScriptExecutor.java:226)
    at ch.ivyteam.ivy.bpm.exec.restricted.scripting.IvyScriptExecutor.execute(IvyScriptExecutor.java:194)
    ... 78 more
Caused by: java.lang.NullPointerException: Receiver of method 'startref' is null
    at ch.ivyteam.ivy.scripting.internal.language.IvyScriptEnginePerformer.visitControlInstructionInvoke(IvyScriptEnginePerformer.java:630)
    ... 89 more&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stelt0</dc:creator><pubDate>Thu, 15 Sep 2016 14:52:47 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server/2029</guid></item><item><title>Comment by Flavio Sadeghi on Stelt0's question</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#2026</link><description>&lt;p&gt;yes this could be, ivy.html works only with an ivy context and when a http-request is available. But without a stacktrace/error message is hard to guess...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Flavio Sadeghi</dc:creator><pubDate>Wed, 14 Sep 2016 15:35:59 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#2026</guid></item><item><title>Comment by Stelt0 on Stelt0's question</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#2025</link><description>&lt;p&gt;Can it be that the issue is because my process is executed asynchronously ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stelt0</dc:creator><pubDate>Wed, 14 Sep 2016 13:09:09 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#2025</guid></item><item><title>Comment by Christian Strebel on Stelt0's question</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1993</link><description>&lt;p&gt;Please send us the full error message with stacktrace, you find it in the log (&amp;lt;server install="" root=""&amp;gt;/logs/...).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Fri, 26 Aug 2016 15:46:33 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1993</guid></item><item><title>Comment by Stelt0 on Stelt0's question</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1977</link><description>&lt;p&gt;What is PMV ? &lt;/p&gt;
&lt;p&gt;The interesting part is that using ivy.html.startref("Start Processes/DashboardPages/DefaultApplicationHomePage.ivp") in HTML Dialog it is working correctly, if I use it server side, both in Java and Ivy Script - it is trowing an error.&lt;/p&gt;
&lt;p&gt;the version of the server is 6.2 and the version of the deployed application is 6.1.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stelt0</dc:creator><pubDate>Mon, 22 Aug 2016 09:52:32 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1977</guid></item><item><title>Comment by Reguel Wermelinger on Stelt0's question</title><link>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1974</link><description>&lt;p&gt;I guess that the deployed projects / PMVs are not equal. Maybe the engine application does not contain all projects from the design time?
Can you attach the concrete exception that is thrown?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 19 Aug 2016 10:20:36 -0400</pubDate><guid>https://answers.axonivy.com/questions/1973/ivy-html-startref-throws-exception-on-server#1974</guid></item></channel></rss>