Note that there are some explanatory texts on larger screens.

plurals
  1. POArray Index Out Of Bounds when S4 initiating PE
    primarykey
    data
    text
    <p>I am now trying to add a simple PE into my app. This PE extends AbstractPE and overrides output method.(doing nothing) I also revised the xml file, adding a bean, like following:</p> <pre><code> &lt;bean id="rogerpe" class="cnu.roger.FPActor.RogerPE"&gt; &lt;property name="keys"&gt; &lt;list&gt; &lt;value&gt;RawTransaction *&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>But, when I was trying to run the platform. Some exception occurs.</p> <pre><code>Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cnu.roger.FPActor.RogerPE]: Constructor threw exception; nested exception is java.lang.ArrayIndexOutOfBoundsException: -1 at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877) ... 16 more Caused by: java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:338) at java.util.ArrayList.get(ArrayList.java:351) at io.s4.processor.OverloadDispatcherGenerator.generate(OverloadDispatcherGenerator.java:209) at io.s4.processor.AbstractPE.&lt;init&gt;(AbstractPE.java:126) at cnu.roger.FPActor.RogerPE.&lt;init&gt;(RogerPE.java:22) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100) ... 18 more </code></pre> <p>This PE's code:</p> <pre><code>package cnu.roger.FPActor; import java.util.Collections; import java.util.List; import io.s4.processor.AbstractPE; class RogerPE extends AbstractPE { @Override public void output() { // TODO Auto-generated method stub } } </code></pre> <p>I am confusing now. I do not know which array it means. Any help is appreciated!</p> <p>In the OverloadDispatcherGenerator.java</p> <pre><code>InstructionHandle returnInstruction = il.append(InstructionFactory.createReturn(Type.VOID)); for (int i = 0; i &lt; targetInstructions.size(); i++) { branchInstructions.get(i).setTarget(targetInstructions.get(i)); } branchInstructions.get(branchInstructions.size() - 1) .setTarget(returnInstruction); for (BranchInstruction gotoInstruction : gotoInstructions) { gotoInstruction.setTarget(returnInstruction); } </code></pre> <p>the 209 line is : branchInstructions.get....</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload