incubator-s4-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 戴清灏 <rogerda...@gmail.com>
Subject Re: Add a simple PE
Date Wed, 18 Jan 2012 17:17:28 GMT
Hi,
You are right.
I recompiled the platform's code and everything is fine now.
Thanks for you help!

在 2012年1月19日星期四,Matthieu Morel 写道:

> 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<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
>>
>>
>

-- 
Regards,
Q

Mime
View raw message