Tag Archives: apache-activemq error

Win7 start apache-activemq error report and solutions

Win7 starts apache-activemq and reports an error, as follows:

 

jvm 1 |
jvm 1 | Java Runtime: Oracle Corporation 1.8.0_74 C:\Program Files\Java\jdk1.
8.0_74\jre
jvm 1 | Heap sizes: current=121856k free=112966k max=932352k
jvm 1 | JVM args:- Dactivemq.home=../.. -Dactivemq.base=../.. -Djavax.net
.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password -Djav
ax.net.ssl.keyStore=. ./../conf/broker.ks -Djavax.net.ssl.trustStore=../../conf/b
roker.ts -Dcom.sun.management.jmxremote -Dorg.apache.activemq.UseDedicatedTaskRu nner
=true -Djava.util.logging.config.file=logging.properties -Dactivemq.conf=../
../conf -Dactivemq.data=../../data -Djava.security.auth.login.config=. ./../conf/
login.config -Xmx1024m -Djava.library.path=../../bin/win64 -Dwrapper.key=RvjK2sm
92XZHguAE -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port .m
ax=31999 -Dwrapper.pid=9316 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wra
pper -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
jvm 1 | Extensions classpath:
jvm 1 | [ ..\..\lib,..\..\lib\camel,..\..\lib\optional,..\..\lib\web,..\..\l
ib\extra]
jvm 1 | ACTIVEMQ_HOME: ..\..
jvm 1 | ACTIVEMQ_BASE: ..\..
jvm 1 | ACTIVEMQ_CONF: ..\..\conf
jvm 1 | ACTIVEMQ_DATA: ..\..\data
jvm 1 | Loading message broker from : xbean:activemq.xml
jvm 1 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@4ef
5017d: startup date [Wed Apr 12 09:54:45 CST 2017]; root of context hierarchy
jvm 1 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[C:\Users\
Administrator\Downloads\apache-activemq-5.14.4\bin \win64\..\..\data\kahadb]
jvm 1 | INFO | KahaDB is version 6
jvm 1 | INFO | Recovering from the journal @1:1691
jvm 1 | INFO | Recovery replayed 106 operations from the journal in 0.028 se
conds.
jvm 1 | INFO | PListStore:[C:\Users\Administrator\Downloads\apache-activemq-
5.14.4\bin\win64\..\..\data\localhost\tmp_storage] started
jvm 1 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID: 201603140297–57318-149
1962087799-0:1) is starting
jvm 1 | INFO | Listening for connections at: tcp://0.0.0.0:61616?maximumConn
ections=1000&wireFormat.maxFrameSize=104857600
jvm 1 | INFO | Connector openwire started
jvm 1 | INFO | Listening for connections at: amqp:// 0.0.0.0:5672?maximumConn
ections=1000&wireFormat.maxFrameSize=104857600
jvm 1 | INFO | Connector amqp started
jvm 1 | INFO | Listening for connections at: stomp://0.0.0.0:61613?maximumCo
nnections=1000&wireFormat.maxFrameSize=104857600
jvm 1 | INFO | Connector stomp started
jvm 1 | INFO | Listening for connections at: mqtt://0.0.0.0:1883?maximumConn
ections=1000&wireFormat.maxFrameSize=104857600
jvm 1 | INFO | Connector mqtt started
jvm 1 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:201603140297-
-57318-1491962087799-0:1], java.net.URISyntaxException: Illegal character in hos
tname at index 17: ws://201603140297-: 61614?maximumConnections=1000&wireFormat.m
axFrameSize=104857600)
jvm 1 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID: 201603140297–57318-149
1962087799-0:1) is shutting down
jvm 1 | INFO | Connector openwire stopped
jvm 1 | INFO | Connector amqp stopped
jvm 1 | INFO | Connector stomp stopped
jvm 1 | INFO | Connector mqtt stopped
jvm 1 | INFO | Connector ws stopped
jvm 1 | INFO | PListStore:[C:\Users\Administrator\Downloads\apache- activemq-
5.14.4\bin\win64\..\..\data\localhost\tmp_storage] stopped
jvm 1 | INFO | Stopping async queue tasks
jvm 1 | INFO | Stopping async topic tasks
jvm 1 | INFO | Stopped KahaDB
jvm 1 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID: 201603140297–57318-149
1962087799-0:1) uptime 0.515 seconds
jvm 1 | INFO | Apache ActiveMQ 5.14.4 (localhost, ID: 201603140297–57318-149
1962087799-0 :1) is shutdown
jvm 1 | INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@4ef501
7d: startup date [Wed Apr 12 09:54:45 CST 2017]; root of context hierarchy
jvm 1 | WARN | Exception thrown from LifecycleProcessor on context close
jvm 1 | java.lang.IllegalStateException: LifecycleProcessor not initialized- call’refresh
‘ before invoking lifecycle methods via the context: org.apache.ac
tivemq.xbean.XBeanBrokerFactory$1@4ef5017d: startup date [Wed Apr 12 09:54:45 CS
T 2017]; root of context hierarchy
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.getLifecycleProcessor(AbstractApplicationContext.java:357)[spring-context-4.1.
9.RELEASE.jar:4.1.9.RELEASE ]
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.doClose(AbstractApplicationContext.java:884)[spring-context-4.1.9.RELEASE.jar:
4.1.9.RELEASE]
jvm 1 | at org.springframework .context.support.AbstractApplicationContex
t.close(AbstractApplicationContext.java:843)[spring-context-4.1.9.RELEASE.jar:4.
1.9.RELEASE]
jvm 1 | at org.apache.activemq.hooks.SpringContextHook.run(SpringContext
Hook.java: 30)[activemq-spring-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.broker.BrokerService.stop(BrokerService.j
ava:876)[activemq-broker-5.14.4.jar :5.14.4]
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBroker
Service.java:122)[activemq-spring-5.14.4.jar:5.14.4]
jvm 1 | at org.apache .activemq.broker.BrokerService.start(BrokerService.
java:630)[activemq-broker-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesS
et(XBeanBrokerService.java:73)[activemq-spring-5.14.4.jar:5.14.4]
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:
1.8.0_74]
jvm 1 | at sun.
reflect.NativeMethodAccessorImpl.invoke (NativeMethodAcces sorImpl.java:62)[:1.8.0_74]
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)[:1.8.0_74]
jvm 1 | at java. lang.reflect.Method.invoke(Method.java:498)[:1.8.0_74]
jvm 1 | at org.springframework.beans.factory.support.AbstractAutowireCap
ableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1
700)[spring-beans -4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.beans.factory.support.AbstractAutowireCap
ableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1639)[
spring-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org. springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
(AbstractAutowireCapableBeanFactory.java:1568)[spr
ing-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.beans.factory .support.AbstractAutowireCap
ableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)[spring
-beans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.beans.factory.support.AbstractAutowireCap
ableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)[spring-b
eans-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory .java:303)[spring-beans-4.1.9.RELEASE.jar:4.1.9.
RELEASE]
jvm 1 | at org.springframework.beans.factory.support.DefaultSingletonBea
nRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[ spring-beans-4.1.9
.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.beans.factory.support.AbstractBeanFactory
.doGetBean(AbstractBeanFactory.java:299)[spring-beans-4.1.9 .RELEASE.jar:4.1.9.RE
LEASE]
jvm 1 | at org.springframework.beans.factory.support.AbstractBeanFactory
.getBean(AbstractBeanFactory.java:194)[spring-beans-4.1.9.RELEASE.jar:4.1.9.RELE
ASE]
jvm 1 | at org. springframework.beans.factory.support.DefaultListableBean
Factory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)[spring-bea
ns-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.context.support .AbstractApplicationContex
t.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)[spring-co
ntext-4.1.9.RELEASE.jar:4.1.9.RELEASE]
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext .java:480)[spring-context-4.1.9.RELEASE.jar:
4.1.9.RELEASE]
jvm 1 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext
.<init>(ResourceXmlApplicationContext.java:64)[xbean-spring-4.2.jar:4.2]
jvm 1 | at org.apache .xbean.spring.context.ResourceXmlApplicationContext
.<init>(ResourceXmlApplicationContext.java:52)[xbean-spring-4.2.jar:4.2]
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBr
okerFactory.java:104)[activemq-spring-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicatio
nContext(XBeanBrokerFactory.java:104)[activemq-spring-5.14 .4.jar:5.14.4]
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBe
anBrokerFactory.java:67)[activemq-spring-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:71)[activemq-broker-5.14 .4.jar:5.14.4]
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:54)[activemq-broker-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.console.command.StartCommand.runTask(Star
tCommand.java:87)[activemq-console-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.console.command .AbstractCommand.execute(A
bstractCommand.java:63)[activemq-console-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.console.command.ShellCommand.runTask(Shel
lCommand.java:154)[activemq-console-5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.console.command.AbstractCommand.execute(A
bstractCommand.java:63)[activemq-console -5.14.4.jar:5.14.4]
jvm 1 | at org.apache.activemq.console.command.ShellCommand.main(ShellCo
mmand.java:104)[activemq-console-5.14.4.jar:5.14.4 ]
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:
1.8.0_74]
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)[:1.8.0_74]
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)[:1.8.0_74]
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_74]
jvm 1 | at org.apache.activemq.console.Main.runTaskClass(Main.java:262)[
activemq .jar:5.14.4]
jvm 1 | at org.apache.activemq.console.Main.main(Main.java:115)[activemq
.jar:5.14.4]
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method)[:
1.8.0_74]
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)[:1.8.0_74]
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java :43)[:1.8.0_74]
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_74]
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimple
App.java:240)[wrapper.jar:3.2.3]
jvm 1 | at java.lang.Thread.run(Thread.java:745)[: 1.8.0_74]
jvm 1 | WARN | Exception encountered during context initialization-cancell
ing refresh attempt: org.springframework.beans.factory.BeanCreationException: Er
ror creating bean with name’org.apache.activemq.xbean.XBeanBrokerService #0′ def
ined in class path resource [activemq.xml]: Invocation of init method failed; ne
sted exception is java.net.URISyntaxException: Illegal character in hostname at
index 17: ws://201603140297-:61614?maximumConnections=1000&wireFormat.maxFrameSi
ze =104857600
jvm 1 | ERROR: java.lang.RuntimeException: Failed to execute start task. Reas
on: java.lang.IllegalStateException: BeanFactory not initialized or already clos
ed- call’refresh ‘ before accessing beans via the ApplicationContext
jvm 1 | java.lang .RuntimeException: Failed to execute start task. Reason: jav
a.lang.IllegalStateException: BeanFactory not initialized or already closed-ca ll’refresh
‘ before accessing beans via the ApplicationContext
jvm 1 | at org.apache.activemq.console.command. StartCommand.runTask(Star
tCommand.java:91)
jvm 1 | at org.apache.activemq.console.command.AbstractCommand.execute(A
bstractCommand.java:63)
jvm 1 | at org.apache.activemq.console.command.ShellCommand.runTask(Shel
lCommand.java:154)
jvm 1 | at org.apache.activemq.console.command.AbstractCommand.execute(A
bstractCommand.java:63)
jvm 1 | at org.apache.activemq.console.command.ShellCommand.main(ShellCo
mmand.java:104)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl. invoke(NativeMethodAcces
sorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
jvm 1 | at org.apache.activemq.console.Main.main(Main.java:115)
jvm 1 | at sun. reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet |
hodAccessorImpl.java:43)
jvm 1 at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimple
App.java:240)
jvm 1 | at java.lang.Thread.run( Thread.java:745)
jvm 1 | Caused by: java.lang.IllegalStateException: BeanFactory not initializ
ed or already closed- call’refresh ‘ before accessing beans via the Application
Context
jvm 1 | at org.springframework.context.support.AbstractRefreshableApplic
ationContext.getBeanFactory(AbstractRefreshableApplicationContext. java:170)
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.destroyBeans(AbstractApplicationContext.java:915)
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext.java:493)
jvm 1 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext
.<init>(ResourceXmlApplicationContext.java:64)
jvm 1 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext
.<init>(ResourceXmlApplicationContext.java:52)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBr
okerFactory.java: 104)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicatio
nContext(XBeanBrokerFactory.java:104)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBe
anBrokerFactory.java:67)
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:71)
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:54)
jvm 1 | at org.apache.activemq.console.command.StartCommand.runTask(Star
tCommand.java:87)
jvm 1 | … 16 more
jvm 1 | ERROR: java.lang.IllegalStateException: BeanFactory not initialized o
r already closed-call’refresh’ before accessing beans via the ApplicationCont
ext
jvm 1 | java.lang.IllegalStateException: BeanFactory not initialized or alrea
dy closed- call’refresh ‘ before accessing beans via the ApplicationContext
jvm 1 | at org.springframework.context. support.AbstractRefreshableApplic
ationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.destroyBeans(AbstractApplicationContext.java:915)
jvm 1 | at org.springframework.context.support.AbstractApplicationContex
t.refresh(AbstractApplicationContext.java:493)
jvm 1 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext
.< init>(ResourceXmlApplicationContext.java:64)
jvm 1 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext
.<init>(ResourceXmlApplicationContext.java:52)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory$1. <init>(XBeanBr
okerFactory.java:104)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicatio
nContext(XBeanBrokerFactory.java:104)
jvm 1 | at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBe
anBrokerFactory.java:67)
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:71)
jvm 1 | at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerF
actory.java:54)
jvm 1 | at org.apache.activemq.console.command.StartCommand.runTask(Star
tCommand.java:87)
jvm 1 | at org. apache.activemq.console.command.AbstractCommand.execute(A
bstractCommand.java:63)
jvm 1 | at org.apache.activemq.console.command.ShellCommand.runTask(Shel
lCommand.java:154)
jvm 1 | at org. apache.activemq.console.command.AbstractCommand.execute(A
bstractCommand.java:63)
jvm 1 | at org.apache.activemq.console.command.ShellCommand.main(ShellCo
mmand.java:104)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method. java:498)
jvm 1 | at org.apache.activemq.console.Main.runTaskClass(Main.java:262)
jvm 1 | at org.apache.activemq.console.Main.main(Main.java:115)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method. invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimple
App.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:745)
wrapper | < – Wrapper Stopped
please press any key to continue…

 

solution:

Modify the conf->activemq.xml configuration file

  <transportConnectors>
            <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
            <transportConnector name= " openwire " uri= " tcp://0.0.0.0:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 " />
            <transportConnector name= " amqp " uri= " amqp://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 " />
            <transportConnector name= " stomp " uri= " stomp://0.0.0.0:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 " />
            <transportConnector name= " mqtt " uri= " mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 " />
            <transportConnector name= " ws " uri= " ws://0.0.0.0:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600 " />
        </transportConnectors>

for

1
2
3
4
5
6
7
8
<transportConnectors>
           <!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
           <transportConnector name="openwire" uri="tcp://127.0.0.1:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
           <transportConnector name="amqp" uri="amqp://127.0.0.1:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
           <transportConnector name="stomp" uri="stomp://127.0.0.1:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
           <transportConnector name="mqtt" uri="mqtt://127.0.0.1:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
           <transportConnector name="ws" uri="ws://127.0.0.1:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
       </transportConnectors>