[ 
https://issues.apache.org/activemq/browse/AMQ-585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58453#action_58453
 ] 

Akornev commented on AMQ-585:
-----------------------------

Hi!
I use ActiveMq 5.2.0.
In web.xml spring context get by 
org.springframework.web.context.ContextLoaderListener
Persistent = false

And I have exception:
javax.jms.JMSException: Could not create Transport. Reason: 
javax.management.InstanceAlreadyExistsException: 
org.apache.activemq:BrokerName=localhost,Type=Broker
        at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
 [org.apache.activemq-5.2.0.jar:5.2.0]
        at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:239)
 [org.apache.activemq-5.2.0.jar:5.2.0]
        at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:252)
 [org.apache.activemq-5.2.0.jar:5.2.0]
        at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:224)
 [org.apache.activemq-5.2.0.jar:5.2.0]
        at 
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:172)
 [org.apache.activemq-5.2.0.jar:5.2.0]

Could you please help me with my problem.

Thx!


> InstanceAlreadyExistsException on .war redeploy (if useJmx="true)
> -----------------------------------------------------------------
>
>                 Key: AMQ-585
>                 URL: https://issues.apache.org/activemq/browse/AMQ-585
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.0 M4
>         Environment: SuSe Linux 9.1, Sun JDK 1.4.2_08, Tomcat 5.0.28
>            Reporter: Mass Dosage
>            Priority: Minor
>             Fix For: 4.0 RC2
>
>
> I am using ActiveMQ as part of a web-app deployed to Tomcat. Active MQ is 
> configured via spring and follows the spring examples that you ship with the 
> source in M4. If I configure the broker to use JMX (  <broker useJmx="true"> 
> ) and deploy the app to tomcat, everything goes fine. However, when I deploy 
> a newer version of the app (hot deploy) I get the following error when the 
> JMS consumer is created from spring:
> 006-02-20 15:16:17,378 ERROR 
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:205)
>  Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean 
> with name 'smsResponseConsumer' defined in ServletContext resource 
> [/WEB-INF/applicationContext-messaging.xml]: Initialization of bean failed; 
> nested exception is javax.jms.JMSException: 
> org.apache.activemq:Type=Topic,Destination=ActiveMQ.Advisory.Connection,BrokerName=localhost
> javax.jms.JMSException: 
> org.apache.activemq:Type=Topic,Destination=ActiveMQ.Advisory.Connection,BrokerName=localhost
> And the root cause of this exception is:
> Caused by: javax.management.InstanceAlreadyExistsException: 
> org.apache.activemq:Type=Topic,Destination=ActiveMQ.Advisory.Connection,BrokerName=localhost
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>       at 
> org.apache.activemq.openwire.DataStreamMarshaller.createThrowable(DataStreamMarshaller.java:199)
>       at 
> org.apache.activemq.openwire.DataStreamMarshaller.unmarsalThrowable(DataStreamMarshaller.java:159)
>       at 
> org.apache.activemq.openwire.v1.ExceptionResponseMarshaller.unmarshal(ExceptionResponseMarshaller.java:67)
>       at 
> org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:214)
>       at 
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:181)
>       at 
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:135)
>       ... 1 more
> So it appears as if the JMX entry isn't "unbound" when the applicaiton 
> restarts on a redeploy.
> If I set JMX to false then I can redeploy the application without any errors. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to