The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Don Stadler (74) [Avatar] Offline
I followed the instructions on page 201, starting servicemix, deploying the service with ant -f ch6-example.xml deploy-1a-file-example, which servicemix hotdeployed.

I copied the 1a-input.txt file into chaper61a-filein directory. Nothing happened.

Looking further I saw the filter requires the filename to be prefixed with 'deploy_me', so I renamed the file to 'deploy_me_1a.txt', then copied the file into in.

Servicemix then threw the following exception:

[java] ERROR - FileComponent - Failed to process file: cha
pter61a-fileindeploy_me_1a.txt. Reason: java.lang.NullPointerException
[java] java.lang.NullPointerException
[java] at org.apache.servicemix.file.FileSenderEndpoint.processInOnly(F
[java] at org.apache.servicemix.common.endpoints.ProviderEndpoint.proce
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(Asy
[java] at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchan
[java] at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(
[java] at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.proce
[java] at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(Abs
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(Se
[java] at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Thread
[java] at java.util.concurrent.ThreadPoolExecutor$
[java] at
Don Stadler (74) [Avatar] Offline
Chapter 6 Servicemix 1b does nothing
On page 206 I followed the instructions, deploying the deploy-1b-file-binary-example apparently successfully. I copied front.jpg into the chapter61bin directory, and nothing happened.
Don Stadler (74) [Avatar] Offline
Re: Chapter 6 Servicemix 1b does nothing
I checked back & the jpg file had moved to the out box, so I ran the test again and it ran. It takes a while to run.

I checked test 1a again to see if it is working now,but it is still throwing the NullPointerException each time it polls.
tijs.rademakers (494) [Avatar] Offline
Re: Chapter 6 Servicemix 1b does nothing
I just checked with the 1a example of chapter 6. There's a deploy_me-test.xml test file that you can you use to copy to the chapter6/1a-file/in directory. This works fine in my environment. Which file did you use to test? Make sure it's a XML file.

Best regards,

Don Stadler (74) [Avatar] Offline
Re: Chapter 6 Servicemix 1b does nothing
I used the .txt file, so that could explain it. I'll go back and try it.
Don Stadler (74) [Avatar] Offline
Re: Chapter 6 Servicemix 1b does nothing
It appears that my efforts with Chapter 7 last week corrupted my servicemix deployment. I undeployed everything but the core stuff in the hotdeploy directory and am still getting nasty exceptions thrown. Next step appears to be to redo the entire environment - again. Unless the following makes more sense to you than to me?

[java] at
[java] at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWir
[java] at org.apache.activemq.transport.tcp.TcpTransport.readCommand(Tc
[java] at
[java] at
[java] Caught: org.springframework.beans.factory.BeanCreationException: Err
or creating bean with name 'jbi' defined in file [C:osesbinactionesbapache-se
rvicemix-3.2.1confservicemix.xml]: Invocation of init method failed; nested ex
ception is java.lang.UnsupportedClassVersionError: Bad version number in .class
[java] org.springframework.beans.factory.BeanCreationException: Error creat
ing bean with name 'jbi' defined in file [C:osesbinactionesbapache-servicemix
-3.2.1confservicemix.xml]: Invocation of init method failed; nested exception
is java.lang.UnsupportedClassVersionError: Bad version number in .class file
[java] Caused by: java.lang.UnsupportedClassVersionError: Bad version numbe
r in .class file
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClass(
[java] at
[java] at
[java] at$100(
[java] at$
[java] at Method)
[java] at
[java] at java.lang.ClassLoader.loadClass(
[java] at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(Rea
[java] at org.codehaus.classworlds.DefaultClassRealm.loadClassDirect(De
[java] at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultC
[java] at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClas
[java] at java.lang.ClassLoader.loadClass(
[java] at java.lang.ClassLoader.loadClassInternal(

[java] at
[java] at
[java] at org.apache.servicemix.jbi.framework.InstallationService.init(
[java] at org.apache.servicemix.jbi.container.JBIContainer.init(JBICont
[java] at org.apache.servicemix.jbi.container.SpringJBIContainer.afterP
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at
[java] at org.apache.xbean.spring.context.FileSystemXmlApplicationConte
[java] at org.apache.xbean.spring.context.FileSystemXmlApplicationConte
[java] at org.apache.servicemix.Main.main(
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
[java] at java.lang.reflect.Method.invoke(
[java] at org.codehaus.classworlds.Launcher.launchStandard(Launcher.jav
[java] at org.codehaus.classworlds.Launcher.launch(
[java] at org.codehaus.classworlds.Launcher.main(
[java] ERROR - ActiveMQEndpointWorker - Endpoint connection to JMS
broker failed: Could not connect to broker URL: tcp://localhost:61616. Reason: j Connection refused: connect
[java] ERROR - ActiveMQEndpointWorker - Endpoint will try to reconn
ect to the JMS broker in 30 seconds
Terminate batch job (Y/N)? y
Don Stadler (74) [Avatar] Offline
Chapter 6 Servicemix 1a throws exception resolved

This test worked with the new environment.