Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7071821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:44:03+00:00 2026-05-28T05:44:03+00:00

I am now trying to add a simple PE into my app. This PE

  • 0

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:

  <bean id="rogerpe" class="cnu.roger.FPActor.RogerPE">                                                                                                                                       
        <property name="keys">                                                                                                                                                                
                <list>                                                                                                                                                                        
                        <value>RawTransaction *</value>                                                                                                                                       
                </list>                                                                                                                                                                       
        </property>                                                                                                                                                                           
  </bean>

But, when I was trying to run the platform. Some exception occurs.

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.<init>(AbstractPE.java:126)
    at cnu.roger.FPActor.RogerPE.<init>(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

This PE’s 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                                                                                                                                            

        }                                                                                                                                                                                     
}

I am confusing now. I do not know which array it means.
Any help is appreciated!

In the OverloadDispatcherGenerator.java

InstructionHandle returnInstruction = il.append(InstructionFactory.createReturn(Type.VOID));                                                                                          

for (int i = 0; i < targetInstructions.size(); i++) {                                                                                                                                 
    branchInstructions.get(i).setTarget(targetInstructions.get(i));                                                                                                                   
}                                                                                                                                                                                     

branchInstructions.get(branchInstructions.size() - 1)                                                                                                                                 
                  .setTarget(returnInstruction);                                                                                                                                      

for (BranchInstruction gotoInstruction : gotoInstructions) {                                                                                                                          
    gotoInstruction.setTarget(returnInstruction);                                                                                                                                     

}

the 209 line is : branchInstructions.get….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:44:03+00:00Added an answer on May 28, 2026 at 5:44 am

    I think the error code is:

    branchInstructions.get(branchInstructions.size() - 1)                                                                                                                                 
                  .setTarget(returnInstruction); 
    

    if branchInstructions.size() == 0, then branchInstructions.size() – 1 get -1, but -1 is an invalid index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I set myself this rather simple sounding challenge but now I am stuck trying
I am now trying to implement a simple HTML webpage scraper using Java.Now I
I asked this question earlier and am now trying to explore the idea of
I'm trying to INSERT into a table, but I get the error Cannot add
I am trying to make a simple product-configurator thingie ... Right now I have
I am trying to make a simple Python filter for postfix, to add in
I'm trying to do something very simple. All I want to do at this
I'm trying to write a simple baseball scorekeeping app, mostly as a learning exercise.
I am trying to write a simple INSERT statement to add new users to
I am now trying to implement a page with Angularjs. But the problem is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.