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
#1
Tjis,

I deployed using the deploy-transaction target, and it seemed to create a directory, did some mucking about in the created directory, then deleted the directory without doing anything further, like putting files into the servicemix lib directory as promised.

C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8>an
t -f ch8-examples.xml deploy-transaction
Buildfile: ch8-examples.xml

init:

gn:init:
[echo] ServiceMix home is set to C:osesbinactionesbapache-servicemix-3.2
.1.
[echo] Workspace home is set to C:osesbinactionworkspaceworkspace-servic
emixservicemix.

deploy-transaction:
[echo] Creating transaction jar
[mkdir] Created dir: C:osesbinactionesbapache-servicemix-3.2.1unzipped-c
omponents
[unzip] Expanding: C:osesbinactionesbapache-servicemix-3.2.1hotdeployse
rvicemix-bean-3.2.1-installer.zip into C:osesbinactionesbapache-servicemix-3.
2.1unzipped-components
[unzip] Expanding: C:osesbinactionesbapache-servicemix-3.2.1hotdeployse
rvicemix-jms-3.2.1-installer.zip into C:osesbinactionesbapache-servicemix-3.2
.1unzipped-components
[unzip] Expanding: C:osesbinactionesbapache-servicemix-3.2.1hotdeployse
rvicemix-shared-3.2.1-installer.zip into C:osesbinactionesbapache-servicemix-
3.2.1unzipped-components
[delete] Deleting directory C:osesbinactionesbapache-servicemix-3.2.1unzi
pped-components

BUILD SUCCESSFUL

So I ran the servicemix.bat servicemixservicemix.xml command and it failed massively:

C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>%SERVICEMIX_HOME%inservicemix.bat servicemixservicemix.xml
servicemix.bat: Ignoring predefined value for SERVICEMIX_HOME
Starting Apache ServiceMix ESB: 3.2.1

Loading Apache ServiceMix from file: servicemixservicemix.xml
Exception in thread "JMX connector" org.springframework.beans.factory.NoSuchBean
DefinitionException: No bean named 'broker' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanDefinition(DefaultListableBeanFactory.java:356)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMerg
edBeanDefinition(AbstractBeanFactory.java:916)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:243)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.apache.xbean.spring.jndi.SpringInitialContextFactory.getInitialCo
ntext(SpringInitialContextFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
67)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServe
r.java:619)
at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServ
er.java:412)
at org.apache.activemq.broker.jmx.ManagementContext$1.run(ManagementCont
ext.java:90)
ERROR - BrokerService - Failed to start ActiveMQ JMS Message Br
oker. Reason: java.io.IOException: Transport Connector could not be registered i
n JMX: Failed to bind to server socket: tcp://localhost:61616 due to: java.net.B
indException: Address already in use: JVM_Bind
java.io.IOException: Transport Connector could not be registered in JMX: Failed
to bind to server socket: tcp://localhost:61616 due to: java.net.BindException:
Address already in use: JVM_Bind
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:25)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(Broke
rService.java:1079)
at org.apache.activemq.broker.BrokerService.startTransportConnector(Brok
erService.java:1517)
at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerSer
vice.java:1471)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:402
)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBean
BrokerService.java:47)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:352)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:149)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:100)
at org.apache.servicemix.Main.main(Main.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:461)
Caused by: java.io.IOException: Failed to bind to server socket: tcp://localhost
:61616 due to: java.net.BindException: Address already in use: JVM_Bind
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:31)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTranspor
tServer.java:8smilie
at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTrans
portFactory.java:56)
at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.
java:109)
at org.apache.activemq.broker.TransportConnector.createTransportServer(T
ransportConnector.java:270)
at org.apache.activemq.broker.TransportConnector.getServer(TransportConn
ector.java:122)
at org.apache.activemq.broker.TransportConnector.asManagedConnector(Tran
sportConnector.java:100)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(Broke
rService.java:1072)
... 28 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketF
actory.java:163)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTranspor
tServer.java:80)
... 34 more
Caught: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'broker' defined in file [C:osesbinactionworkspaceworkspace-se
rvicemixservicemix esourceschapter8 ransaction-singleservicemixservicemix.
xml]: Invocation of init method failed; nested exception is java.io.IOException:
Transport Connector could not be registered in JMX: Failed to bind to server so
cket: tcp://localhost:61616 due to: java.net.BindException: Address already in u
se: JVM_Bind
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'broker' defined in file [C:osesbinactionworkspaceworkspace-servicemix
servicemix esourceschapter8 ransaction-singleservicemixservicemix.xml]: In
vocation of init method failed; nested exception is java.io.IOException: Transpo
rt Connector could not be registered in JMX: Failed to bind to server socket: tc
p://localhost:61616 due to: java.net.BindException: Address already in use: JVM_
Bind
Caused by: java.io.IOException: Transport Connector could not be registered in J
MX: Failed to bind to server socket: tcp://localhost:61616 due to: java.net.Bind
Exception: Address already in use: JVM_Bind
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:25)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(Broke
rService.java:1079)
at org.apache.activemq.broker.BrokerService.startTransportConnector(Brok
erService.java:1517)
at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerSer
vice.java:1471)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:402
)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBean
BrokerService.java:47)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:352)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:149)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:100)
at org.apache.servicemix.Main.main(Main.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:461)
Caused by: java.io.IOException: Failed to bind to server socket: tcp://localhost
:61616 due to: java.net.BindException: Address already in use: JVM_Bind
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport
.java:31)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTranspor
tServer.java:8smilie
at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTrans
portFactory.java:56)
at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.
java:109)
at org.apache.activemq.broker.TransportConnector.createTransportServer(T
ransportConnector.java:270)
at org.apache.activemq.broker.TransportConnector.getServer(TransportConn
ector.java:122)
at org.apache.activemq.broker.TransportConnector.asManagedConnector(Tran
sportConnector.java:100)
at org.apache.activemq.broker.BrokerService.registerConnectorMBean(Broke
rService.java:1072)
... 28 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:141)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketF
actory.java:163)
at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTranspor
tServer.java:80)
... 34 more
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>%SERVICEMIX_HOME%inservicemix.bat servicemixservicemix.xml
servicemix.bat: Ignoring predefined value for SERVICEMIX_HOME
Starting Apache ServiceMix ESB: 3.2.1

Loading Apache ServiceMix from file: servicemixservicemix.xml
Exception in thread "JMX connector" org.springframework.beans.factory.NoSuchBean
DefinitionException: No bean named 'broker' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanDefinition(DefaultListableBeanFactory.java:356)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMerg
edBeanDefinition(AbstractBeanFactory.java:916)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:243)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.apache.xbean.spring.jndi.SpringInitialContextFactory.getInitialCo
ntext(SpringInitialContextFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
67)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServe
r.java:619)
at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServ
er.java:412)
at org.apache.activemq.broker.jmx.ManagementContext$1.run(ManagementCont
ext.java:90)
ERROR - BrokerService - Failed to start ActiveMQ JMS Message Br
oker. Reason: java.io.IOException: closed
java.io.IOException: closed
at org.apache.activemq.store.journal.JournalPersistenceAdapter.writeComm
and(JournalPersistenceAdapter.java:597)
at org.apache.activemq.store.journal.JournalPersistenceAdapter.writeTrac
eMessage(JournalPersistenceAdapter.java:603)
at org.apache.activemq.store.journal.JournalPersistenceAdapter.recover(J
ournalPersistenceAdapter.java:565)
at org.apache.activemq.store.journal.JournalPersistenceAdapter.start(Jou
rnalPersistenceAdapter.java:225)
at org.apache.activemq.broker.BrokerService.createRegionBroker(BrokerSer
vice.java:1251)
at org.apache.activemq.broker.BrokerService.createBroker(BrokerService.j
ava:1209)
at org.apache.activemq.broker.BrokerService.getBroker(BrokerService.java
:50smilie
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:394
)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBean
BrokerService.java:47)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:352)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:149)
at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init >
>(FileSystemXmlApplicationContext.java:100)
at org.apache.servicemix.Main.main(Main.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:461)
Terminate batch job (Y/N)?
^CC:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8\r
transaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>
C:osesbinactionworkspaceworkspace-servicemixservicemix esourceschapter8 r
ansaction-single>%SERVICEMIX_HOME%inservicemix.bat servicemixservicemix.xml
servicemix.bat: Ignoring predefined value for SERVICEMIX_HOME
Starting Apache ServiceMix ESB: 3.2.1

Loading Apache ServiceMix from file: servicemixservicemix.xml
Exception in thread "JMX connector" org.springframework.beans.factory.NoSuchBean
DefinitionException: No bean named 'broker' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanDefinition(DefaultListableBeanFactory.java:356)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMerg
edBeanDefinition(AbstractBeanFactory.java:916)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:243)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:337)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:24smilie
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:160)
at org.apache.xbean.spring.jndi.SpringInitialContextFactory.getInitialCo
ntext(SpringInitialContextFactory.java:83)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
67)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288
)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServe
r.java:619)
at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServ
er.java:412)
at org.apache.activemq.broker.jmx.ManagementContext$1.run(ManagementCont
ext.java:90)
INFO - JBIContainer - ServiceMix 3.2.1 JBI Container (Service
Mix) is starting
INFO - JBIContainer - For help or more informations please se
e: http://incubator.apache.org/servicemix/
WARN - ManagementContext - Failed to start rmi registry: internal
error: ObjID already in use
INFO - ConnectorServerFactoryBean - JMX connector available at: service:jmx
:rmi:///jndi/rmi://localhost:1099/jmxrmi
INFO - ComponentMBeanImpl - Initializing component: #SubscriptionMa
nager#
INFO - DeploymentService - Restoring service assemblies
INFO - ComponentMBeanImpl - Initializing component: servicemix-jms
INFO - ComponentMBeanImpl - Initializing component: servicemix-bean

INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) s
tarted
tijs.rademakers (494) [Avatar] Offline
#2
Re: Chapter 8 Servicemix transaction definately not working
Don,

Just tried the example succesfully myself and I had a detailed look at the exception stack trace mentioned in your post. The stacktrace seems to say, you are already running ActiveMQ on tcp://localhost:61616 so I can not start it twice on the same port. Could it be the case that ActiveMQ was already running? Note that ServiceMix does start with an exception about the broker, but this doesn't prevent the example to run succesfully. When started, drop a message in the servicemix.transaction.in queue like <transaction>started</transaction> and you should see a logging message "transaction successfull". If you put another message on the queue the transaction is rollbacked and copied to the DLQ.servicemix.transaction.in queue.

Best regards,

Tijs