incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Morel <mmo...@apache.org>
Subject Re: Add a simple PE
Date Wed, 18 Jan 2012 16:55:34 GMT
Hi again,

thanks for the update! But actually, I don't think the solution you 
linked is a reasonable one. Instead of hacking the platform code, you 
should add a "processEvent" method to you PE.

Indeed I'm pretty sure the error you get comes from not having such a 
method. This case was not considered (leading to the exception you got) 
because PEs are reactive entities and therefore there is no reason to 
define PEs that would not process incoming events.

Hope this helps,

Matthieu


On 1/18/12 3:41 PM, 戴清灏 wrote:
> I think I have this problem fixed.
> On stackoverflow, I asked the same question.
>
> http://stackoverflow.com/questions/8904157/array-index-out-of-bounds-when-s4-initiating-pe
>
> Sent from my mobile phone
>
> 在 2012-1-18 下午5:59,"Matthieu Morel" <mmorel@apache.org
> <javascript:_e({}, 'cvml', 'mmorel@apache.org');>>写道:
>
>     Hi,
>
>     this is quite weird.
>
>     I suppose you are using S4 0.3.
>
>     Are you able to run other examples correctly, or is the problem
>     specific to your code?
>
>     Also, this issue is related to some bytecode generation routine. Do
>     you have other libraries in your classpath, such as a different
>     version (than ours) of BCEL?
>
>     Last, you seem to be using OpenJDK. Maybe you could try to use a
>     Sun/Oracle JDK version 6 ? This would allow us to identify (or not)
>     a possible bug.
>
>
>     Thanks!
>
>     Matthieu
>
>     On 1/18/12 2:55 AM, Roger wrote:
>
>         Hi, all
>         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.__AbstractAutowireCapableBeanFac__tory.instantiateBean(__AbstractAutowireCapableBeanFac__tory.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.__DelegatingConstructorAccessorI__mpl.newInstance(__DelegatingConstructorAccessorI__mpl.java:45)
>         at
>         java.lang.reflect.Constructor.__newInstance(Constructor.java:__532)
>         at
>         org.springframework.beans.__BeanUtils.instantiateClass(__BeanUtils.java:100)
>         ... 18 more
>
>         I am confusing now. I do not know which array it means.
>         Any help is appreciated!
>
>         ------------------
>         Regards,
>         Q
>
>
>
>
> --
> Regards,
> Q
>


Mime
View raw message