You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Andrea Zoppello <zo...@libero.it> on 2006/12/18 10:34:37 UTC
Bug in ScritpComponent when using "script" attribute??
Hi all,
I've done some test with Groovy Component and i've noticed that when i
tried to use it
using the "script" attribute instead of the "scritText" attribute as follow
<sm:activationSpec componentName="*myGenericGroovymioGroovy*"
service="*foo:myGenericGroovymioGroovy*"
destinationService="*foo:myScreenOutputmioGroovy*">
- <#> <sm:component>
- <#> <bean
class="*org.apache.servicemix.components.groovy.GroovyComponent*">
<property name="*script*"
value="*c:/tmp/sm/groovy/testsmx.groovy*" />
</bean>
</sm:component>
</sm:activationSpec>
it doesn't work....
Looking at the source of the component in the ScriptComponent.java file
the problems seems to be in the start() method in the lines:
.....
if (compiledScript == null) {
checkScriptTextAvailable();
}
if (compiledScript == null) {
if (engine instanceof Compilable) {
Compilable compilable = (Compilable) engine;
compileScript(compilable);
}
}
....
I've replaced this code with this and it works:
.....
if ((compiledScript == null) && (script != null)) {
if (engine instanceof Compilable) {
Compilable compilable = (Compilable) engine;
compileScript(compilable);
}
}
if (compiledScript == null) {
checkScriptTextAvailable();
}
.....
Thanks
Andrea Zoppello
Engineering Ing. Informatica
Re: Bug in ScritpComponent when using "script" attribute??
Posted by Andrea Zoppello <zo...@libero.it>.
Done.
Is there a plan for a final release of ServiceMix 3.1??
Andrea
Guillaume Nodet ha scritto:
> Could you please raise a JIRA issue ?
> Btw, servicemix 3.1 will feature a JBI compliant SE for groovy scripting.
> (doc still to be written).
>
> On 12/18/06, Andrea Zoppello <zo...@libero.it> wrote:
>> Hi all,
>>
>> I've done some test with Groovy Component and i've no
>> ticed that when i
>> tried to use it
>> using the "script" attribute instead of the "scritText" attribute as
>> follow
>>
>> <sm:activationSpec componentName="*myGenericGroovymioGroovy*"
>> service="*foo:myGenericGroovymioGroovy*"
>> destinationService="*foo:myScreenOutputmioGroovy*">
>> - <#> <sm:component>
>> - <#> <bean
>> class="*org.apache.servicemix.components.groovy.GroovyComponent*">
>> <property name="*script*"
>> value="*c:/tmp/sm/groovy/testsmx.groovy*" />
>> </bean>
>> </sm:component>
>> </sm:activationSpec>
>>
>> it doesn't work....
>>
>> Looking at the source of the component in the ScriptComponent.java file
>> the problems seems to be in the start() method in the lines:
>> .....
>> if (compiledScript == null) {
>> checkScriptTextAvailable();
>> }
>> if (compiledScript == null) {
>> if (engine instanceof Compilable) {
>> Compilable compilable = (Compilable) engine;
>> compileScript(compilable);
>> }
>> }
>> ....
>>
>> I've replaced this code with this and it works:
>>
>> .....
>> if ((compiledScript == null) && (script != null)) {
>> if (engine instanceof Compilable) {
>> Compilable compilable = (Compilable) engine;
>> compileScript(compilable);
>> }
>> }
>> if (compiledScript == null) {
>> checkScriptTextAvailable();
>> }
>> .....
>>
>> Thanks
>> Andrea Zoppello
>> Engineering Ing. Informatica
>>
>>
>
>
Re: JMS component NPE
Posted by Guillaume Nodet <gn...@gmail.com>.
I guess this exception could be avoided.
Could you please raise a JIRA ?
On 12/18/06, keogaa-jackrabbbit@yahoo.fr <ke...@yahoo.fr> wrote:
> Hello,
>
> w/ SM-3.1
> i would like to inform about this NPE exception.
> i have a JMS-Component with In-Only MEP.
> when i RE-deploy the same JMS-Component and i recall
> my JMS endpoint to send an email
> sometimes i have got :
> ERROR - JmsComponent - Error
> processing exchange InOnly[
> id: ID:jjp-34393-1166462101789-6:229
> status: Done
> role: consumer
> service: {urn:fr.gouv.hello}mailSender
> endpoint: mailSender
> in: <?xml version="1.0"
> encoding="UTF-8"?><ns1:HashString
> xmlns:ns1="http://tempuri.org/HashService/HashClass"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns1:Str>Message
> Change dans BPEL 4 JMS Service
> </ns1:Str><ns1:HashType>MD5</ns1:HashType></ns1:HashString>
> ]
> java.lang.NullPointerException
> at
> org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(MultiplexingConsumerProcessor.java:105)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:490)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:464)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
> at java.lang.Thread.run(Thread.java:595)
> ERROR - JmsComponent - Error setting
> exchange status to ERROR
> javax.jbi.messaging.MessagingException: illegal call
> to send / sendSync
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:350)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:397)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
> at java.lang.Thread.run(Thread.java:595)
>
> and this is my configuration
> <jms:endpoint service="hello:jmsReceiver"
> endpoint="HELLOJmsReceiver"
> targetService="hello:mailSender"
> role="consumer"
> destinationStyle="queue"
> jmsProviderDestinationName="jms/queue/hello"
> connectionFactory="#jmsFactory"
>
> defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
>
> FYI: when i block SMX with in a debugger, it seems to
> work.
>
>
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
> Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
> http://fr.answers.yahoo.com
>
--
Cheers,
Guillaume Nodet
JMS component NPE
Posted by ke...@yahoo.fr.
Hello,
w/ SM-3.1
i would like to inform about this NPE exception.
i have a JMS-Component with In-Only MEP.
when i RE-deploy the same JMS-Component and i recall
my JMS endpoint to send an email
sometimes i have got :
ERROR - JmsComponent - Error
processing exchange InOnly[
id: ID:jjp-34393-1166462101789-6:229
status: Done
role: consumer
service: {urn:fr.gouv.hello}mailSender
endpoint: mailSender
in: <?xml version="1.0"
encoding="UTF-8"?><ns1:HashString
xmlns:ns1="http://tempuri.org/HashService/HashClass"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns1:Str>Message
Change dans BPEL 4 JMS Service
</ns1:Str><ns1:HashType>MD5</ns1:HashType></ns1:HashString>
]
java.lang.NullPointerException
at
org.apache.servicemix.jms.multiplexing.MultiplexingConsumerProcessor.process(MultiplexingConsumerProcessor.java:105)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:464)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
ERROR - JmsComponent - Error setting
exchange status to ERROR
javax.jbi.messaging.MessagingException: illegal call
to send / sendSync
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:350)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:397)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:58)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
and this is my configuration
<jms:endpoint service="hello:jmsReceiver"
endpoint="HELLOJmsReceiver"
targetService="hello:mailSender"
role="consumer"
destinationStyle="queue"
jmsProviderDestinationName="jms/queue/hello"
connectionFactory="#jmsFactory"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
FYI: when i block SMX with in a debugger, it seems to
work.
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
RE : Re: JMS component & interfaceName
Posted by ke...@yahoo.fr.
Thanks it is working, i used jbi.xml config.
--- Guillaume Nodet <gn...@gmail.com> a écrit :
> There are several ways to do that.
> The first one is to create a very simple wsdl:
> <definition ...>
> <portType name="JMSServiceInterface" />
> </definition>
> and associate it with the endpoint with the
> wsdlResource=""xxx" attribute.
>
> The other one, which should be already done if you
> use the maven plugin,
> is to create a jbi.xml descriptor file for your SU,
> and define the
> interface name for the endpoint.
>
> On 12/18/06, keogaa-jackrabbbit@yahoo.fr
> <ke...@yahoo.fr> wrote:
> > Hello,
> >
> > In SM 3.1
> > i have worked with a Jms Component, but with my
> config
> >
> > <beans ... >
> > <jms:endpoint service="msp:jmsSender2"
> > endpoint="MSPJmsSender"
> >
> interfaceName="mspjms:JMSServiceInterface"
> > role="provider"
> > destinationStyle="queue"
> > jmsProviderDestinationName="queue/A"
> > connectionFactory="#jmsFactory" />
> > </beans>
> >
> > i can't register the interfaceName, and my bpel
> engine
> > can't call my JMS provider.
> > Please, what's wrong why this config.
> > FYI: i would like the save behavoir than this
> > LW-config.
> > <sm:activationSpec componentName="MSPJmsSender"
> > service="msp:jmsSender"
> > interfaceName="mspjms:JMSServiceInterface">
> > <sm:component>
> > <bean
> >
>
class="org.apache.servicemix.components.jms.JmsSenderComponent">
> > <property name="template">
> > <bean
> > class="org.springframework.jms.core.JmsTemplate">
> > <property name="connectionFactory"><ref
> > local="jmsFactory"/></property>
> <property
> > name="defaultDestinationName"
> > value="fr.gouv.msp.jms.queue"/>
> > <property name="pubSubDomain" value="true"/>
> </bean>
> > </property>
> > </bean>
> > </sm:component>
> > </sm:activationSpec>
> >
> > by advance, thanks
> >
> > GAA
> >
> >
> >
> >
> >
> >
> >
> >
>
___________________________________________________________________________
> > Découvrez une nouvelle façon d'obtenir des
> réponses à toutes vos questions !
> > Profitez des connaissances, des opinions et des
> expériences des internautes sur Yahoo!
> Questions/Réponses
> > http://fr.answers.yahoo.com
> >
>
>
> --
> Cheers,
> Guillaume Nodet
>
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
Re: JMS component & interfaceName
Posted by Guillaume Nodet <gn...@gmail.com>.
There are several ways to do that.
The first one is to create a very simple wsdl:
<definition ...>
<portType name="JMSServiceInterface" />
</definition>
and associate it with the endpoint with the wsdlResource=""xxx" attribute.
The other one, which should be already done if you use the maven plugin,
is to create a jbi.xml descriptor file for your SU, and define the
interface name for the endpoint.
On 12/18/06, keogaa-jackrabbbit@yahoo.fr <ke...@yahoo.fr> wrote:
> Hello,
>
> In SM 3.1
> i have worked with a Jms Component, but with my config
>
> <beans ... >
> <jms:endpoint service="msp:jmsSender2"
> endpoint="MSPJmsSender"
> interfaceName="mspjms:JMSServiceInterface"
> role="provider"
> destinationStyle="queue"
> jmsProviderDestinationName="queue/A"
> connectionFactory="#jmsFactory" />
> </beans>
>
> i can't register the interfaceName, and my bpel engine
> can't call my JMS provider.
> Please, what's wrong why this config.
> FYI: i would like the save behavoir than this
> LW-config.
> <sm:activationSpec componentName="MSPJmsSender"
> service="msp:jmsSender"
> interfaceName="mspjms:JMSServiceInterface">
> <sm:component>
> <bean
> class="org.apache.servicemix.components.jms.JmsSenderComponent">
> <property name="template">
> <bean
> class="org.springframework.jms.core.JmsTemplate">
> <property name="connectionFactory"><ref
> local="jmsFactory"/></property> <property
> name="defaultDestinationName"
> value="fr.gouv.msp.jms.queue"/>
> <property name="pubSubDomain" value="true"/> </bean>
> </property>
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> by advance, thanks
>
> GAA
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
> Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
> http://fr.answers.yahoo.com
>
--
Cheers,
Guillaume Nodet
JMS component & interfaceName
Posted by ke...@yahoo.fr.
Hello,
In SM 3.1
i have worked with a Jms Component, but with my config
<beans ... >
<jms:endpoint service="msp:jmsSender2"
endpoint="MSPJmsSender"
interfaceName="mspjms:JMSServiceInterface"
role="provider"
destinationStyle="queue"
jmsProviderDestinationName="queue/A"
connectionFactory="#jmsFactory" />
</beans>
i can't register the interfaceName, and my bpel engine
can't call my JMS provider.
Please, what's wrong why this config.
FYI: i would like the save behavoir than this
LW-config.
<sm:activationSpec componentName="MSPJmsSender"
service="msp:jmsSender"
interfaceName="mspjms:JMSServiceInterface">
<sm:component>
<bean
class="org.apache.servicemix.components.jms.JmsSenderComponent">
<property name="template">
<bean
class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory"><ref
local="jmsFactory"/></property> <property
name="defaultDestinationName"
value="fr.gouv.msp.jms.queue"/>
<property name="pubSubDomain" value="true"/> </bean>
</property>
</bean>
</sm:component>
</sm:activationSpec>
by advance, thanks
GAA
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
Re: Bug in ScritpComponent when using "script" attribute??
Posted by Guillaume Nodet <gn...@gmail.com>.
Could you please raise a JIRA issue ?
Btw, servicemix 3.1 will feature a JBI compliant SE for groovy scripting.
(doc still to be written).
On 12/18/06, Andrea Zoppello <zo...@libero.it> wrote:
> Hi all,
>
> I've done some test with Groovy Component and i've noticed that when i
> tried to use it
> using the "script" attribute instead of the "scritText" attribute as follow
>
> <sm:activationSpec componentName="*myGenericGroovymioGroovy*"
> service="*foo:myGenericGroovymioGroovy*"
> destinationService="*foo:myScreenOutputmioGroovy*">
> - <#> <sm:component>
> - <#> <bean
> class="*org.apache.servicemix.components.groovy.GroovyComponent*">
> <property name="*script*"
> value="*c:/tmp/sm/groovy/testsmx.groovy*" />
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> it doesn't work....
>
> Looking at the source of the component in the ScriptComponent.java file
> the problems seems to be in the start() method in the lines:
> .....
> if (compiledScript == null) {
> checkScriptTextAvailable();
> }
> if (compiledScript == null) {
> if (engine instanceof Compilable) {
> Compilable compilable = (Compilable) engine;
> compileScript(compilable);
> }
> }
> ....
>
> I've replaced this code with this and it works:
>
> .....
> if ((compiledScript == null) && (script != null)) {
> if (engine instanceof Compilable) {
> Compilable compilable = (Compilable) engine;
> compileScript(compilable);
> }
> }
> if (compiledScript == null) {
> checkScriptTextAvailable();
> }
> .....
>
> Thanks
> Andrea Zoppello
> Engineering Ing. Informatica
>
>
--
Cheers,
Guillaume Nodet