Another issue is the simple example, when copy groovy.xml to the <SMX_HOME>/deploy, in the console we get the expected output
Starting JSR-223 groovy processor
org.apache.servicemix.jbi.runtime.impl.inonlyi...@13072d
Hello, I got an input message <?xml version="1.0" encoding="UTF-8" standalone="no"?><timer><name>{http://servicemix.apache.org/examples/groovy}service:endpoint</name><group>DEFAULT</group><fullname>DEFAULT.{http://servicemix.apache.org/examples/groovy}service:endpoint</fullname><description/><fireTime>Mon Mar 23 14:33:40 CST 2009</fireTime></timer>

But in the data/log/servicemix.log we also get exception like
14:11:10,683 | ERROR | ripting-thread-3 | ScriptingEndpoint | emix.scripting.ScriptingEndpoint 309 | Error executing the script: null at line: -1 and column: -1
javax.script.ScriptException: Cannot invoke method get() on null object
at com.google.code.scriptengines.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:216) at com.google.code.scriptengines.groovy.GroovyCompiledScript.eval(GroovyCompiledScript.java:49)
       at javax.script.CompiledScript.eval(CompiledScript.java:44)
at org.apache.servicemix.scripting.ScriptingEndpoint.process(ScriptingEndpoint.java:300) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478) at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException: Cannot invoke method get() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
       at Script1.run(Script1.groovy:13)
at com.google.code.scriptengines.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:213)
       ... 10 more
14:11:10,684 | ERROR | ripting-thread-3 | ScriptingComponent | icemix.common.AsyncBaseLifeCycle 480 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.inonlyi...@818616
javax.script.ScriptException: Cannot invoke method get() on null object
at com.google.code.scriptengines.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:216) at com.google.code.scriptengines.groovy.GroovyCompiledScript.eval(GroovyCompiledScript.java:49)
       at javax.script.CompiledScript.eval(CompiledScript.java:44)
at org.apache.servicemix.scripting.ScriptingEndpoint.process(ScriptingEndpoint.java:300) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:627) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:581) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478) at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException: Cannot invoke method get() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
       at Script1.run(Script1.groovy:13)
at com.google.code.scriptengines.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:213)
       ... 10 more


Guillaume Nodet wrote:
I'd go for #2.

2009/3/22 Freeman Fang <[email protected]>:
Hi Guillaume,
SMXKNL-249 should fix it.
And  as workaround in features, put  wss4j bundle before cxf bundle also works.
Since currently if feature have inner feature dependency and bundles, it always 
install the inner feature first, but wss4j bundle is in servciemix-cxf-bc 
feature but not the cxf feature, so it means the  workaound could be
1. we can't reuse cxf feature inside servicemix-cxf-bc feature, we need 
explicitly include all bundles cxf feature have in servicemix-cxf-bc feature, 
and ensure wss4j bundle before cxf bundle,
2 Or we need move wss4j bundle (and xmlsec bundle which is needed for wss4j) 
from servicemix-cxf-bc feature to cxf feature before the cxf-bunlde.
Which way do you think is correct? I think put wss4j and xmlsec bundle to cxf 
feature maybe better, even it's optional dependency, but not sure it will bring 
any side-effect.
Thanks
Freeman
Guillaume Nodet wrote:
So that means that the WS security bundle is installed after cxf, it
should be installed before. SMX4KNL-249 would also sove the problem i
guess.

On Sun, Mar 22, 2009 at 01:29, Freeman Fang <[email protected]> wrote:

Hi Guillaume,
Yeah, after restarting servicemix, this example works again.
Freeman

Guillaume Nodet wrote:

Does it change anything if you restart servicemix (without deleting
the data folder) ?
This could indicate a wrong installation order of bundles with an
optional package not resolved.

On Sat, Mar 21, 2009 at 14:21, Freeman Fang <[email protected]>
wrote:


Hi Guillaume,

I can't believe you release so much things in one day! :-)
Just found cxf-wsdl-first example doesn't work in 4.0 kit.
The error is like
<component-name>servicemix-cxf-bc</component-name>
    <component-task-result-details>
            <task-result-details>
                    <task-id>deploy</task-id>
                    <task-result>FAILED</task-result>
                    <message-type>ERROR</message-type>

<task-status-msg><msg-loc-info><loc-token/><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/apache/ws/security/handler/WSHandler</loc-message>

<stack-trace><![CDATA[java.lang.NoClassDefFoundError:
org/apache/ws/security/handler/WSHandler
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1537)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:502)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.getClassByDelegation(ModuleImpl.java:421)
    at
org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:108)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.searchImports(ModuleImpl.java:1124)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:497)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1537)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:502)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)
    at

org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at

org.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:440)
    at

org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)
    at

org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)
    at

org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:97)
    at

org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
    at

org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
    at

org.apache.servicemix.jbi.deployer.artifacts.ServiceUnitImpl.deploy(ServiceUnitImpl.java:100)
    at

org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.deploySUs(ServiceAssemblyInstaller.java:204)
    at

org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.install(ServiceAssemblyInstaller.java:85)
    at

org.apache.servicemix.jbi.deployer.impl.Deployer.onBundleStarted(Deployer.java:354)
    at

org.apache.servicemix.jbi.deployer.impl.Deployer.bundleChanged(Deployer.java:284)
    at

org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:771)
    at

org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:700)
    at

org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:597)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3382)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1517)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:770)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:751)
    at

org.apache.servicemix.kernel.filemonitor.FileMonitor.refreshPackagesAndStartOrUpdateBundles(FileMonitor.java:549)
    at

org.apache.servicemix.kernel.filemonitor.FileMonitor.onFilesChanged(FileMonitor.java:299)
    at

org.apache.servicemix.kernel.filemonitor.FileMonitor$1.filesChanged(FileMonitor.java:151)
    at

org.apache.servicemix.kernel.filemonitor.Scanner.reportBulkChanges(Scanner.java:431)
    at

org.apache.servicemix.kernel.filemonitor.Scanner.reportDifferences(Scanner.java:327)
    at
org.apache.servicemix.kernel.filemonitor.Scanner.scan(Scanner.java:261)
    at
org.apache.servicemix.kernel.filemonitor.Scanner$1.run(Scanner.java:221)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
This example  even work in the SNAPSHOT kit I build last week, so far not
sure where the error comes from. I will try to figure it out, but if you
can
shed me some light, it would be great.

Thanks
Freeman

Guillaume Nodet wrote:


The staging repo for everything being released is at
http://people.apache.org/~gnodet/staging/nmr-1.0.0/
Apache ServiceMix 4.0.0 includes all the other artifacts being
released at this time.

Apache ServiceMix 4.0.0
- tag is available at


http://svn.apache.org/repos/asf/servicemix/smx4/features/tags/features-4.0.0/
- the download page is http://cwiki.apache.org/SMX4/servicemix-400.html

Apache ServiceMix NMR 1.1.0
- tag is available at
http://svn.apache.org/repos/asf/servicemix/smx4/nmr/tags/nmr-1.0.0/
- the download page is
http://cwiki.apache.org/SMX4NMR/servicemix-nmr-100.html

JBI components 2009.01 release -- this includes the root POM, the
shared libaries as well as all the components.
- tags are available in their respective projects under
http://svn.apache.org/repos/asf/servicemix/components

For the Maven plugins, the vote includes:
- Maven plugins POM version 2
- depends-maven-plugin 1.1
- features-maven-plugin 1.1
- jbi-maven-plugin 4.1
- xfire-maven-plugin 4.1
Tags for the Maven plugins are available in their respective projects
under http://svn.apache.org/repos/asf/servicemix/maven-plugins/

ServiceMix Utils 1.1.0 is being released as well
- tag is available at


http://svn.apache.org/repos/asf/servicemix/utils/tags/servicemix-utils-1.1.0/

And finally, 3 OSGi bundles have been updated and 7 new bundles have
been
added
- cglib 2.1_3_2
- commons-dbcp 1.2.2_3
- geronimo-javamail_1.4_provider 1.8-r755222_1
- isorelax 20050913_1
- jettison 1.0.1_1
- jsmpp 2.0_1
- quartz 1.6.1_2
- stringtemplate 3.2_1
- xmlbeans 2.4.0_1
- xmlschema 1.4.3_1
Tags for the bundles are available at
http://svn.apache.org/repos/asf/servicemix/smx4/bundles/tags/

Direct links to the Apache ServiceMix 4.0.0 and NMR 1.1.0 distributions:


 
http://people.apache.org/~gnodet/staging/nmr-1.0.0/org/apache/servicemix/apache-servicemix/4.0.0/


 
http://people.apache.org/~gnodet/staging/nmr-1.0.0/org/apache/servicemix/nmr/apache-servicemix-nmr/1.0.0/

The vote will be closed on Tuesday 24.

Happy reviewing and voting.











Reply via email to