You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Maxim Y. Tebenev" <mt...@softech.ru> on 2006/12/25 17:34:02 UTC
Running Groovy script
Hello Guys,
I have issue when attempting to run Groovy script. I've created service unit
depending on lwcontainer and configured script as following:
<sm:activationSpec componentName="groovytrans1"
service="hb:groovytrans1">
<sm:component>
<bean
class="org.apache.servicemix.components.groovy.GroovyComponent">
<property name="scriptText">
<value>
<![CDATA[
println "Hello from service"
]]>
</value>
</property>
</bean>
</sm:component>
</sm:activationSpec>
But when I deploy SA into SMX, I've got the following:
<loc-message>Could not deploy xbean service unit</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<msg-loc-info>
<loc-token/>
<loc-message>org.springframework.beans.factory.parsing.BeanD
efinitionParsingException: Configuration problem: Bean class
[org.apache.servicemix.components.groov
y.GroovyComponent] not found
Offending resource: file
[C:\servicemix\data\smx\service-assemblies\hellobook-sa\version_12\sus\serv
icemix-lwcontainer\fwriter-su\servicemix.xml]
Bean ''; nested exception is java.lang.ClassNotFoundException:
org.apache.servicemix.components.groo
vy.GroovyComponent in classloader
org.apache.servicemix.components.groovy.GroovyComponent</loc-messa
ge>
<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistr
ationException:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configurat
ion problem: Bean class
[org.apache.servicemix.components.groovy.GroovyComponent] not found
Offending resource: file
[C:\servicemix\data\smx\service-assemblies\hellobook-sa\version_12\sus\serv
icemix-lwcontainer\fwriter-su\servicemix.xml]
Bean ''; nested exception is java.lang.ClassNotFoundException:
org.apache.servicemix.components.groo
vy.GroovyComponent in classloader
org.apache.servicemix.components.groovy.GroovyComponent
at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerReg
istry.java:424)
...
I've copied following files to lib/optional directory and that did not help:
groovy-1.0-jsr-04.jar
groovy-all-1.0-jsr-04.jar
jsr-223-1.0-pr.jar
Please advise what could me help.
Best regards, Maxim Tebenev.
--
View this message in context: http://www.nabble.com/Running-Groovy-script-tf2879856s12049.html#a8047552
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Running Groovy script
Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
Thanks, Guillaume!
That cured the issue.
Best regards, Maxim Tebenev.
--
View this message in context: http://www.nabble.com/Running-Groovy-script-tf2879856s12049.html#a8055559
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Running Groovy script
Posted by Guillaume Nodet <gn...@gmail.com>.
You need to copy servicemix-components in lib/optional too.
This jar is available in the components/lib folder from
servicemix installation.
On 12/25/06, Maxim Y. Tebenev <mt...@softech.ru> wrote:
>
> Hello Guys,
>
> I have issue when attempting to run Groovy script. I've created service unit
> depending on lwcontainer and configured script as following:
>
> <sm:activationSpec componentName="groovytrans1"
> service="hb:groovytrans1">
> <sm:component>
> <bean
> class="org.apache.servicemix.components.groovy.GroovyComponent">
>
> <property name="scriptText">
> <value>
> <![CDATA[
> println "Hello from service"
> ]]>
> </value>
> </property>
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> But when I deploy SA into SMX, I've got the following:
>
> <loc-message>Could not deploy xbean service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
> <exception-info>
> <nesting-level>1</nesting-level>
> <msg-loc-info>
> <loc-token/>
>
> <loc-message>org.springframework.beans.factory.parsing.BeanD
> efinitionParsingException: Configuration problem: Bean class
> [org.apache.servicemix.components.groov
> y.GroovyComponent] not found
> Offending resource: file
> [C:\servicemix\data\smx\service-assemblies\hellobook-sa\version_12\sus\serv
> icemix-lwcontainer\fwriter-su\servicemix.xml]
> Bean ''; nested exception is java.lang.ClassNotFoundException:
> org.apache.servicemix.components.groo
> vy.GroovyComponent in classloader
> org.apache.servicemix.components.groovy.GroovyComponent</loc-messa
> ge>
>
> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistr
> ationException:
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configurat
> ion problem: Bean class
> [org.apache.servicemix.components.groovy.GroovyComponent] not found
> Offending resource: file
> [C:\servicemix\data\smx\service-assemblies\hellobook-sa\version_12\sus\serv
> icemix-lwcontainer\fwriter-su\servicemix.xml]
> Bean ''; nested exception is java.lang.ClassNotFoundException:
> org.apache.servicemix.components.groo
> vy.GroovyComponent in classloader
> org.apache.servicemix.components.groovy.GroovyComponent
> at
> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerReg
> istry.java:424)
> ...
>
> I've copied following files to lib/optional directory and that did not help:
> groovy-1.0-jsr-04.jar
> groovy-all-1.0-jsr-04.jar
> jsr-223-1.0-pr.jar
>
> Please advise what could me help.
>
> Best regards, Maxim Tebenev.
>
> --
> View this message in context: http://www.nabble.com/Running-Groovy-script-tf2879856s12049.html#a8047552
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet