You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by almos <al...@ukr.net> on 2012/07/22 12:38:17 UTC

Re: DuplicateDeploymentIdException when deploying ear with application.xml

I was keep trying to figure out why TomEE hangs on undeploy/shutdown for me
(and that doesnt happen for you) and looks like I have found the reason.

When I have active MDBs listening on queues/topics TomEE doesn't stop until
ActiveMQ is shut down.

Here is a test application where there are either ejb and mdb -
http://www.4shared.com/zip/Sj1fMmQX/testear2.html.

ActiveMQ version I use is 5.5.1. TomEE - 1.0.
We were able to reproduce behavior on every platform (Windows/MacOS/Linux).

Steps for reproduction:

1. Start ActiveMQ
(/Work/java/apache-activemq-5.5.1/bin/activemq start)
2. Start TomEE
(/Work/java/tomee-remote/bin/startup.sh)
3. Deploy application with MDB
(/Work/java/tomee-remote/bin/tomee.sh deploy
/tmp/eartest-0.0.1-SNAPSHOT.ear)
4. Ensure application has been loaded
5. Stop TomEE or try undeploying application
6. On shutdown TomEE will hang with following in catalina.out

22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
22.07.2012 13:31:08 org.apache.openejb.server.SimpleServiceManager stop
INFO: Stopping server services
22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler
destroyApplication
INFO: Undeploying app: openejb
22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
INFO: Closing DataSource: BerimbiDataSourceUnmanaged
22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
INFO: Closing DataSource: BerimbiDataSourceManaged
22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
INFO: Stopping ResourceAdapter: ActiveMQProvider
22.07.2012 13:31:08
org.apache.openejb.resource.activemq.ActiveMQResourceAdapter stop
INFO: Stopping ActiveMQ
22.07.2012 13:31:08
org.apache.openejb.resource.activemq.ActiveMQResourceAdapter stopImpl
INFO: Stopped ActiveMQ broker
22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

7. Stop ActiveMQ
(/Work/java/apache-activemq-5.5.1/bin/activemq stop)
8. Check TomEE, it should stop right after ActiveMQ killed

When I shut down ActiveMQ before TomEE, TomEE releases fine without any
hangs.

So somehow TomEE waiting somewhat from ActiveMQ. The same happens when TomEE
and ActiveMQ running on different machines.

My tomee.xml contains following in regards of ActiveMQ configuration:


<Resource id="ActiveMQProvider" type="ActiveMQResourceAdapter">
	BrokerXmlConfig = 
	ServerUrl = tcp://localhost:61616
</Resource>

<Resource id="ActiveMQConnectionFactory" type="javax.jms.ConnectionFactory">
	ResourceAdapter = ActiveMQProvider
</Resource>

<Container id="ActiveMQMDBContainer" ctype="MESSAGE">
	ResourceAdapter = ActiveMQProvider
</Container>

<Resource id="ismTopic" type="javax.jms.Topic" />

Is there any issue with my config/MDB configuration?

Regards,
Alex



--
View this message in context: http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656478.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
great!

thanks to give your feedback btw.

- Romain


2012/8/11 almos <al...@ukr.net>

> Thanks for pointing to that jira entry. Adding ?daemon=true to the uri
> fixed
> the problem.
> Now TomEE stops fine without need to stop ActiveMQ first. Also during
> deploy/redeploy process there are no issues with jsp and servlets which was
> the case in 1.0.0 version.
>
> Thanks a lot for the support!
>
> Regards,
> Alex
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656799.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by almos <al...@ukr.net>.
Thanks for pointing to that jira entry. Adding ?daemon=true to the uri fixed
the problem.
Now TomEE stops fine without need to stop ActiveMQ first. Also during
deploy/redeploy process there are no issues with jsp and servlets which was
the case in 1.0.0 version.

Thanks a lot for the support!

Regards,
Alex



--
View this message in context: http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656799.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
weird, daemon=true seems enough:
https://issues.apache.org/jira/browse/AMQ-1447

but in your stack the transport threads are not daemon

- Romain


2012/8/2 almos <al...@ukr.net>

> I sent it my previous post (Jul 26, 2012; 12:02pm) with a link - looks like
> system rejected it.
> Dump could be found here - http:// sharetext.org /EPGC (without spaces)
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656638.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by almos <al...@ukr.net>.
I sent it my previous post (Jul 26, 2012; 12:02pm) with a link - looks like
system rejected it.
Dump could be found here - http:// sharetext.org /EPGC (without spaces)



--
View this message in context: http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656638.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
A threadump if i'm not misreading
Le 1 août 2012 19:26, "almos" <al...@ukr.net> a écrit :

> Is there any news on this? Should I have to sent more related info?
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656621.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by almos <al...@ukr.net>.
Is there any news on this? Should I have to sent more related info?

Thanks.



--
View this message in context: http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656621.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
would be nice to get a threadump (jstack) at this moment

is it possible?

- Romain


2012/7/25 almos <al...@ukr.net>

> 1. Not sure I understood what do you mean. But we can't run ActiveMQ under
> TomEE, we are running separate ActiveMQ cluster
> 2. Upgrade of ActiveMQ to 5.6.0 haven't helped. Same hang occurs on
> application undeploy/TomEE shutdown
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656532.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by almos <al...@ukr.net>.
1. Not sure I understood what do you mean. But we can't run ActiveMQ under
TomEE, we are running separate ActiveMQ cluster
2. Upgrade of ActiveMQ to 5.6.0 haven't helped. Same hang occurs on
application undeploy/TomEE shutdown



--
View this message in context: http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656532.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: DuplicateDeploymentIdException when deploying ear with application.xml

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm, 2 notes about it 1) i think amq uri can be customized to be daemon, 2)
using amq 5.6 can fix it since 5.5 got some bug
Le 22 juil. 2012 14:35, "almos" <al...@ukr.net> a écrit :

> I was keep trying to figure out why TomEE hangs on undeploy/shutdown for me
> (and that doesnt happen for you) and looks like I have found the reason.
>
> When I have active MDBs listening on queues/topics TomEE doesn't stop until
> ActiveMQ is shut down.
>
> Here is a test application where there are either ejb and mdb -
> http://www.4shared.com/zip/Sj1fMmQX/testear2.html.
>
> ActiveMQ version I use is 5.5.1. TomEE - 1.0.
> We were able to reproduce behavior on every platform (Windows/MacOS/Linux).
>
> Steps for reproduction:
>
> 1. Start ActiveMQ
> (/Work/java/apache-activemq-5.5.1/bin/activemq start)
> 2. Start TomEE
> (/Work/java/tomee-remote/bin/startup.sh)
> 3. Deploy application with MDB
> (/Work/java/tomee-remote/bin/tomee.sh deploy
> /tmp/eartest-0.0.1-SNAPSHOT.ear)
> 4. Ensure application has been loaded
> 5. Stop TomEE or try undeploying application
> 6. On shutdown TomEE will hang with following in catalina.out
>
> 22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol stop
> INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
> 22.07.2012 13:31:08 org.apache.openejb.server.SimpleServiceManager stop
> INFO: Stopping server services
> 22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler
> destroyApplication
> INFO: Undeploying app: openejb
> 22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
> INFO: Closing DataSource: BerimbiDataSourceUnmanaged
> 22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
> INFO: Closing DataSource: BerimbiDataSourceManaged
> 22.07.2012 13:31:08 org.apache.openejb.assembler.classic.Assembler destroy
> INFO: Stopping ResourceAdapter: ActiveMQProvider
> 22.07.2012 13:31:08
> org.apache.openejb.resource.activemq.ActiveMQResourceAdapter stop
> INFO: Stopping ActiveMQ
> 22.07.2012 13:31:08
> org.apache.openejb.resource.activemq.ActiveMQResourceAdapter stopImpl
> INFO: Stopped ActiveMQ broker
> 22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["http-bio-8080"]
> 22.07.2012 13:31:08 org.apache.coyote.AbstractProtocol destroy
> INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
>
> 7. Stop ActiveMQ
> (/Work/java/apache-activemq-5.5.1/bin/activemq stop)
> 8. Check TomEE, it should stop right after ActiveMQ killed
>
> When I shut down ActiveMQ before TomEE, TomEE releases fine without any
> hangs.
>
> So somehow TomEE waiting somewhat from ActiveMQ. The same happens when
> TomEE
> and ActiveMQ running on different machines.
>
> My tomee.xml contains following in regards of ActiveMQ configuration:
>
>
> <Resource id="ActiveMQProvider" type="ActiveMQResourceAdapter">
>         BrokerXmlConfig =
>         ServerUrl = tcp://localhost:61616
> </Resource>
>
> <Resource id="ActiveMQConnectionFactory"
> type="javax.jms.ConnectionFactory">
>         ResourceAdapter = ActiveMQProvider
> </Resource>
>
> <Container id="ActiveMQMDBContainer" ctype="MESSAGE">
>         ResourceAdapter = ActiveMQProvider
> </Container>
>
> <Resource id="ismTopic" type="javax.jms.Topic" />
>
> Is there any issue with my config/MDB configuration?
>
> Regards,
> Alex
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/DuplicateDeploymentIdException-when-deploying-ear-with-application-xml-tp4655362p4656478.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>