Discussion:
[Tomee Maven Plugin] Unkillable Tomee...
Daniel Chiaramello
2018-08-30 09:04:32 UTC
Permalink
Hello.

Since 2 weeks now, I'm facing a highly frustrating problem with Tomee Maven
Plugin, used from IntelliJ on Windows.

In short, after I have used "tomee:run" target, I'm no more able to kill
Tomee (even from Task Manager, which says "access denied" when I try to kill
it, despite the fact that I'm administrator).
This is highly frustrating because the only way to kill it is by restarting
the PC... And it used to work "as expected" 2 weeks ago...

In detail: I first need to apologize, I'm really new on Java development (2
months old, after 25 years developing in C/C++). So, Java, Maven, IntelliJ
and Tomee are things I don't master - please forgive me if I'm using words
not corresponding to usual terms used by the community!

The purpose is to develop a REST-based application.
I was really impressed by the ease (compared to C++) to develop a prototype
of such application in Java - in a matter of few days, despite my absolute
lack of knowledge in all these technologies, I had a first API implemented
and running.
That prototype is working on IntelliJ Community 2018.2, on Java 1.8, with
Tomee Maven Plugin v7.0.5. My company is using its own Maven repository,
accessible behind an HTTP firewall (I'm not sure it has a relation with my
problem, but I'm mentioning it just in case...)

Everything was perfect, I was really happy. But 2 weeks ago, I started to
face a problem mentioned above: I am no more able to kill Tomee except by
restarting my PC... So, as soon as I launch my application with tomee:run,
to launch a new version of it, I have to restart my PC...
I spent days to try to find a solution - without success for now.
Worse that that, the person from my company who helped me in my first steps,
providing my guidances on the tools to use (IntelliJ, tomee maven plugin,
etc...) and helped me setting up my environment is now facing the exact same
problem than me! But since he's no more working on these topics, he couldn't
help me in trying to find a solution - which is why I'm there...

I generated a quasi-empty IntelliJ project reproducing the problem, with
only one class extending "javax.ws.rs.core.Application" (doing absolutely
nothing), the pom.xml and the web.xml files.

pom.xml content:



I attached a WORD document to that message presenting that project, and
showing the problem with screenshots and full outputs:
Tomee.docx
<http://tomee-openejb.979440.n4.nabble.com/file/t376190/Tomee.docx>

I don't know what to do next... I also investigated to live with that
problem, by trying to use deploy/undeploy instead of "run" once Tomee is
running, without any success for now (I lack too many knowledge to
understand all Google pages explaining how to do it...)

What would you need to investigate why Tomee is no more exiting? Is there a
way to activate more logs in Tomee, which may help find the cause (remember
that things which may seem evident for you are not for me)?
jstack showed the following:


Thanks for your attention,
Daniel



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Romain Manni-Bucau
2018-08-30 09:07:18 UTC
Permalink
Hi Daniel,

did you capture a thread dump when it doesn't destroy? (jstack can give it
to you and you can share it on gist or pastebin sites).

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 30 août 2018 à 11:04, Daniel Chiaramello <
Post by Daniel Chiaramello
Hello.
Since 2 weeks now, I'm facing a highly frustrating problem with Tomee Maven
Plugin, used from IntelliJ on Windows.
In short, after I have used "tomee:run" target, I'm no more able to kill
Tomee (even from Task Manager, which says "access denied" when I try to kill
it, despite the fact that I'm administrator).
This is highly frustrating because the only way to kill it is by restarting
the PC... And it used to work "as expected" 2 weeks ago...
In detail: I first need to apologize, I'm really new on Java development (2
months old, after 25 years developing in C/C++). So, Java, Maven, IntelliJ
and Tomee are things I don't master - please forgive me if I'm using words
not corresponding to usual terms used by the community!
The purpose is to develop a REST-based application.
I was really impressed by the ease (compared to C++) to develop a prototype
of such application in Java - in a matter of few days, despite my absolute
lack of knowledge in all these technologies, I had a first API implemented
and running.
That prototype is working on IntelliJ Community 2018.2, on Java 1.8, with
Tomee Maven Plugin v7.0.5. My company is using its own Maven repository,
accessible behind an HTTP firewall (I'm not sure it has a relation with my
problem, but I'm mentioning it just in case...)
Everything was perfect, I was really happy. But 2 weeks ago, I started to
face a problem mentioned above: I am no more able to kill Tomee except by
restarting my PC... So, as soon as I launch my application with tomee:run,
to launch a new version of it, I have to restart my PC...
I spent days to try to find a solution - without success for now.
Worse that that, the person from my company who helped me in my first steps,
providing my guidances on the tools to use (IntelliJ, tomee maven plugin,
etc...) and helped me setting up my environment is now facing the exact same
problem than me! But since he's no more working on these topics, he couldn't
help me in trying to find a solution - which is why I'm there...
I generated a quasi-empty IntelliJ project reproducing the problem, with
only one class extending "javax.ws.rs.core.Application" (doing absolutely
nothing), the pom.xml and the web.xml files.
I attached a WORD document to that message presenting that project, and
Tomee.docx
<http://tomee-openejb.979440.n4.nabble.com/file/t376190/Tomee.docx>
I don't know what to do next... I also investigated to live with that
problem, by trying to use deploy/undeploy instead of "run" once Tomee is
running, without any success for now (I lack too many knowledge to
understand all Google pages explaining how to do it...)
What would you need to investigate why Tomee is no more exiting? Is there a
way to activate more logs in Tomee, which may help find the cause (remember
that things which may seem evident for you are not for me)?
Thanks for your attention,
Daniel
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Daniel Chiaramello
2018-08-31 08:06:06 UTC
Permalink
Hello Romain.

Thanks for your answer.

jstack <pid> returns the following line (from cmd.exe launched with
Administrator privileges):
7848: Access is denied
The -F option can be used when the target process is not responding

jstack -F <pid> returns the following lines:
Attaching to process ID 7848, please wait...
Error attaching to process: Windbg Error: WaitForEvent failed!
sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: WaitForEvent
failed!
at
sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Native Method)
at
sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(WindbgDebuggerLocal.java:152)
at
sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:671)
at
sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(HotSpotAgent.java:569)
at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:335)
at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106)

I checked before trying to kill it, and jstack was correctly returning the
thread stacks.

Even if I have no concrete argument, my current thought is that it may be
related to Windows... There has been an important upgrade on my PC around
the period when I started to have the problem - and we can find many posts
on Google about unkillable Windows processes (it seems to be an old
problem). Why would it impact Tomee Maven Plugin now, I don't know - and it
seems to concern "only" our office (I didn't find any message related to
that problem posted by other people, so maybe we are not using it "the
normal way", or there's something related to our network/environment).

Anyways, thanks again for your answer. We have "solved" the problem by
installing Tomee on a VirtualBox VM, and configuring IntelliJ to deploy our
WAR on that VM, so it's less critical now in our day-to-day job - but I'll
keep monitoring that thread in case someone wants to have a look at that
problem to investigate what happens.

Thanks again,
Daniel



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Romain Manni-Bucau
2018-08-31 08:37:08 UTC
Permalink
Changing java version can help sometimes since they regularly have issues
with their process management (this is why JMX local connection is
regularly broken for instance)

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le ven. 31 août 2018 à 10:06, Daniel Chiaramello <
Post by Daniel Chiaramello
Hello Romain.
Thanks for your answer.
jstack <pid> returns the following line (from cmd.exe launched with
7848: Access is denied
The -F option can be used when the target process is not responding
Attaching to process ID 7848, please wait...
Error attaching to process: Windbg Error: WaitForEvent failed!
sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: WaitForEvent
failed!
at
sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Native Method)
at
sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(WindbgDebuggerLocal.java:152)
at
sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:671)
at
sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(HotSpotAgent.java:569)
at
sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:335)
at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106)
I checked before trying to kill it, and jstack was correctly returning the
thread stacks.
Even if I have no concrete argument, my current thought is that it may be
related to Windows... There has been an important upgrade on my PC around
the period when I started to have the problem - and we can find many posts
on Google about unkillable Windows processes (it seems to be an old
problem). Why would it impact Tomee Maven Plugin now, I don't know - and it
seems to concern "only" our office (I didn't find any message related to
that problem posted by other people, so maybe we are not using it "the
normal way", or there's something related to our network/environment).
Anyways, thanks again for your answer. We have "solved" the problem by
installing Tomee on a VirtualBox VM, and configuring IntelliJ to deploy our
WAR on that VM, so it's less critical now in our day-to-day job - but I'll
keep monitoring that thread in case someone wants to have a look at that
problem to investigate what happens.
Thanks again,
Daniel
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Shultz, Dmitry
2018-08-30 16:51:10 UTC
Permalink
Hi Daniel,

If it normally dies when executed from cml line it may be an IDEA <-> Windows integration bug.
However, IDEA Ultimate has built-in TomEE run configuration, so no need to use Maven plugin and I found it very usefull, check if Community edition has it as well.


Cheers,
Dmitry

-----Original Message-----
From: Daniel Chiaramello [mailto:***@gemalto.com]
Sent: Thursday, August 30, 2018 2:05 AM
To: ***@tomee.apache.org
Subject: [Tomee Maven Plugin] Unkillable Tomee...

Hello.

Since 2 weeks now, I'm facing a highly frustrating problem with Tomee Maven Plugin, used from IntelliJ on Windows.

In short, after I have used "tomee:run" target, I'm no more able to kill Tomee (even from Task Manager, which says "access denied" when I try to kill it, despite the fact that I'm administrator).
This is highly frustrating because the only way to kill it is by restarting the PC... And it used to work "as expected" 2 weeks ago...

In detail: I first need to apologize, I'm really new on Java development (2 months old, after 25 years developing in C/C++). So, Java, Maven, IntelliJ and Tomee are things I don't master - please forgive me if I'm using words not corresponding to usual terms used by the community!

The purpose is to develop a REST-based application.
I was really impressed by the ease (compared to C++) to develop a prototype of such application in Java - in a matter of few days, despite my absolute lack of knowledge in all these technologies, I had a first API implemented and running.
That prototype is working on IntelliJ Community 2018.2, on Java 1.8, with Tomee Maven Plugin v7.0.5. My company is using its own Maven repository, accessible behind an HTTP firewall (I'm not sure it has a relation with my problem, but I'm mentioning it just in case...)

Everything was perfect, I was really happy. But 2 weeks ago, I started to face a problem mentioned above: I am no more able to kill Tomee except by restarting my PC... So, as soon as I launch my application with tomee:run, to launch a new version of it, I have to restart my PC...
I spent days to try to find a solution - without success for now.
Worse that that, the person from my company who helped me in my first steps, providing my guidances on the tools to use (IntelliJ, tomee maven plugin,
etc...) and helped me setting up my environment is now facing the exact same problem than me! But since he's no more working on these topics, he couldn't help me in trying to find a solution - which is why I'm there...

I generated a quasi-empty IntelliJ project reproducing the problem, with only one class extending "javax.ws.rs.core.Application" (doing absolutely nothing), the pom.xml and the web.xml files.

pom.xml content:



I attached a WORD document to that message presenting that project, and showing the problem with screenshots and full outputs:
Tomee.docx
<http://tomee-openejb.979440.n4.nabble.com/file/t376190/Tomee.docx>

I don't know what to do next... I also investigated to live with that problem, by trying to use deploy/undeploy instead of "run" once Tomee is running, without any success for now (I lack too many knowledge to understand all Google pages explaining how to do it...)

What would you need to investigate why Tomee is no more exiting? Is there a way to activate more logs in Tomee, which may help find the cause (remember that things which may seem evident for you are not for me)?
jstack showed the following:


Thanks for your attention,
Daniel



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...