JBoss and IDEA not playing nice together
Hello, folks. I've been experiencing quite a weird situation. It seems that JBoss doesn't like IDEA or vice-versa.
For the past year or so I've been developing applications on IDEA targeted for JBoss, and never really had any problems with that. I developed the applications on my machine and deployed on a remote server. I also used to debug my application by starting the server in debug mode and attaching IDEA to it. Everything was, and for this scenario, still is fine.
However, lots of people got involved in the project and now the remote server is reserved for "test" builds -- not for everyday development cycle. Each developer should now run the app server on his own machine. Now here comes my problem: IDEA (#957) simply dies whenever JBoss (3.2.2_jetty-4.2.11) starts to deploy an application. Simple like this. No exceptions, no stack traces, no VM errors. IDEA simply vanishes without any traces left. I'm running Windows 2000 SP4.
Maybe IDEA listens on some local port that for some unknown reason JBoss broadcasts to during an application deployment? Maybe it's something related to license checker?
Is anyone else experiencing something like this? Could someone else reproduce this? Please, help me track down what could be possibly causing this. Both Jetbrainers and EAP'ers comments are welcome. Now follows lots of info that could or could not be related to this problem. Hope this helps >.<
Output of netstat -n -a -p tcp with IDEA running, before starting JBoss:
Output of the same command after starting JBoss. IDEA is dead by now:
My jboss-service.xml:
resource:log4j.xml
true
127.0.0.1
-1
300
jboss:service=XidFactory
jboss:service=TransactionManager
jboss:service=TransactionManager
true
false
false
true
true
jboss:service=TransactionManager
jboss.system:service=MainDeployer
org.jboss.deployment.DeploymentSorter
org.jboss.deployment.scanner.DeploymentFilter
5000
deploy/
True
]]>
Please sign in to leave a comment.
Crossposted to JBoss forums here[/url]
What way do you start JBoss? Is it a run configuration in IDEA, or do you
start from command line and attach the debugger in IDEA? If it is a
configuration does the deployment fail only
when running or also when starting under debugger?
"Marcus Brito" <pazu@animegaiden.com.br> wrote in message
news:22467196.1067451868532.JavaMail.javamailuser@localhost...
that JBoss doesn't like IDEA or vice-versa.
>
for JBoss, and never really had any problems with that. I developed the
applications on my machine and deployed on a remote server. I also used to
debug my application by starting the server in debug mode and attaching IDEA
to it. Everything was, and for this scenario, still is fine.
>
server is reserved for "test" builds -- not for everyday development cycle.
Each developer should now run the app server on his own machine. Now here
comes my problem: IDEA (#957) simply dies whenever JBoss
(3.2.2_jetty-4.2.11) starts to deploy an application. Simple like this. No
exceptions, no stack traces, no VM errors. IDEA simply vanishes without any
traces left. I'm running Windows 2000 SP4.
>
broadcasts to during an application deployment? Maybe it's something related
to license checker?
>
reproduce this? Please, help me track down what could be possibly causing
this. Both Jetbrainers and EAP'ers comments are welcome. Now follows lots of
info that could or could not be related to this problem. Hope this helps >.<
>
I'm a bit curious as to how you actually do that... that is, how do you start JBoss in such a way that you can attach IDEA to it remotely?
If you could point me to any HOWTO on that I'd be happy to try it out and see if I have the same problem as you do.
Eugene, I'm starting JBoss standalone and later attaching IDEA via remote debugging. However, to do that I should start JBoss first, then start IDEA, otherwise IDEA will die when JBoss starts to deploy an application.
Stefan, to attach to JBoss remotely you just need to edit the JBoss startup scripts to include the remote debugging parameters. When creating a remote application configuration in IDEA, it will show you what parameters you need to add.
Thanks, I had already figured it out.
Everything works fine for me although I don't have all the options that IDEA specifies. Here's the thing that I use to start JBoss:
java -Djboss.home=/usr/local/java/jboss/current -classpath /usr/local/java/jboss/current/bin/run.jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=10250 org.jboss.Main
Here's what IDEA suggests:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=10250
So I'm not using the -Xnoagent and -Djava.compiler=NONE options. It's probably not that but still maybe worth a shot... anybody know what these options actually do?
Other things that might be of interest regarding why this works for me and not for you:
I'm using JBoss 3.2.1 w/Tomcat.
I'm running Linux.
I use JRE 1.4.1_05 to run IDEA (don't ask why...)
I use JRE 1.4.2_02 to run JBoss
I'm using IDEA's default JRE to run it (1.4.2) and 1.4.2_02 to run JBoss. I've tried all combinations of these two JRE (ie, run IDEA with 1.4.2_02, JBoss with 1.4.2, both with 1.4.2_02, both with 1.4.2) and the same thing keeps happening: IDEA dies when JBoss is starting.
And no, IDEA is not attached to JBoss when that happens. I just happen to have IDEA open when JBoss is starting. So sad >.<
And oh yes, I've also tried to start JBoss with no debug options at all. Same thing.
I'm still to find the real cause of this bug, but thankfully reverting to JBoss 3.2.0 makes me happy and dandy again.
And just for completeness, here's the hotspot error that's dumped when IDEA crashes:
I think that now I have enough information to open a SRC, and will be doing so.
I have the same problem with IDEA build 706 (on
1.4.1_02) and Windows 2000 SP4. When IDEA is
started and so is JBoss (running on 1.4.2_02), IDEA
crashes suddenly...
I used to have a similar problem running against JBoss. It seems to be related to the FileWatcher2K.DLL. Try removing/renaming the FileWatcher2K.DLL in the <IDEA-installation-directory>/bin directory and restarting IDEA. File synchronization will take longer, but the silent crashes should stop.