Author Message
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
All of our Data Project modules are throwing the following error when one of the output variables contains no value.

17/08/2017 17:52:51:028 ERROR - 507A96375898A3B41AF9EFFAE5390F80:/ITSMTktStat : session id:usea-epuat1-2017229175245-3 |

EXCEPTION>
java.lang.IllegalStateException: EXCEPTION>
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at com.avaya.sce.runtime.ComplexCollection.next(ComplexCollection.java:100)
at com.avaya.sce.runtimecommon.CallCopyHandler.copyRefToRef(CallCopyHandler.java:56)
at com.avaya.sce.runtime.Return$1.copyParams(Return.java:278)
at com.avaya.sce.runtimecommon.CallFrame.copyOutputParams(CallFrame.java:43)
at com.avaya.sce.runtimecommon.SCESession.popFrame(SCESession.java:1104)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:187)
at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
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)

at com.avaya.sce.runtime.ComplexCollection.next(ComplexCollection.java:108)
at com.avaya.sce.runtimecommon.CallCopyHandler.copyRefToRef(CallCopyHandler.java:56)
at com.avaya.sce.runtime.Return$1.copyParams(Return.java:278)
at com.avaya.sce.runtimecommon.CallFrame.copyOutputParams(CallFrame.java:43)
at com.avaya.sce.runtimecommon.SCESession.popFrame(SCESession.java:1104)
at com.avaya.sce.runtime.SCEServlet.requestHandler(SCEServlet.java:187)
at com.avaya.sce.runtime.SCEServlet.doPost(SCEServlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1524)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1480)
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)


The data node following the Data project call "isEmpty" on the variables to check if they contain a value. What could be causing this problem?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
To be clear, you have an output parameter on a module and you are using local call. How did the parameter get to be an empty collection?
Also what version of OD is the on?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Yep that is a bug that has been there since day one of the local call. Your option is A) switch to use a subdialog call, B) if the collection is empty, then remove the collection, C) get a patch.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Thanks for confirming it's a bug.

A) The entire architecture was built around the use of Data Modules, with about 20 modules currently developed. is there an easy way to "use a subdialog" without re-creating each module?

B) I'm not making it a collection. If there is no variable to return, I return nothing. I have no idea why the receiving end is attempting to make it a collection. How can I "remove a collection" that I'm not creating?

C) How do I "get a patch"?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
You did not mention the version of OD. If/when there is a patch I would post it here.

So you enter the module... things happen and then you return a complex variable. I was curious how this variable became a collection.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
OD 7.1.0.1201

Honestly, I have no idea why it's a collection. It's a complex variable, yes. But if there's nothing to assign to the variable, the module simply returns immediately. That's what's got me scratching my head. I've been working this issue for the past week or so and have attempted various hacks to get parts of the system to work. Is it possible the Data Modules are keeping previous session variable values in memory somehow? I wouldn't think so, but... so many parts and pieces now with OD, Tomcat, etc etc

I'm going through all of the code now and changing it to assign a the dash character as the default value for all the variables. If nothing gets assigned during the module execution, that default value is returned. All the locations where I'm checking isEmpty, I'm updating to instead check "NotEqual". This requires additional code to clear out the default values so there's no domino effect down line. Definitely not elegant, but it appears to work.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
So the hack I implemented didn't work. I've also added servlets to delete any collection via the "IVariable.removeCollection()" method (because there is no "Remove Collection" pallet item. Immediately after calling this remove collection method, check to see if the variable is a collection, and it still is, so the removeCollection() method isn't working as expected. Is there something special that I have to do once I remove the collection? Is it possible to get a patch that checks the size of the collection, and if the size is 0, don't do anything. That may be a viable solution. At this point, the application is failing, the caller is hearing "The system is experiencing technical difficulties" and the application hangs up, which is extremely bad.
Go to:   
Mobile view