I decided to learn how to debug Java EE apps. I have a simple JSF/EJB/JPA app which I deploy and run via Intellij IDEA. That means that I have a so called Run/Debug configuration where I had specified an artifact to deploy(a war file) an application server path(wildfly-8.2.0.Final/bin/standalone.bat is used) an a url to be opened in browser after deployment(its a web app). Works awesome - no problems. But when I run debug which as far as I understand uses basically the same configuration but only adds
JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52764,suspend=y,server=n
to the enviroment variables I have problems.
D:\Proc\wildfly-8.2.0.Final\bin\standalone.bat D:\Proc\JDK\jdk1.8.0_31\bin\java -classpath "D:\Proc\IntelliJ IDEA 14.1.3\lib\idea_rt.jar;D:\Proc\IntelliJ IDEA 14.1.3\lib\util.jar" -Dfile.encoding=windows-1251 com.intellij.rt.execution.CommandLineWrapper C:\Users\username\AppData\Local\Temp\classpath0.tmp com.intellij.javaee.oss.process.JavaeeProcess 53821 com.intellij.javaee.oss.jboss.agent.JBoss71Agent Detected server admin port: 9990 [2015-05-30 04:35:06,499] Artifact portfolio:war exploded: Server is not connected. Deploy is not available. Detected server http port: 8080 Calling "D:\Proc\wildfly-8.2.0.Final\bin\standalone.conf.bat" "JAVA_OPTS already set in environment; overriding default settings with values: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52764,suspend=y,server=n
" Setting JAVA property to "D:\Proc\JDK\jdk1.8.0_31\bin\java"
JBoss Bootstrap Environment
JBOSS_HOME: "D:\Proc\wildfly-8.2.0.Final"
JAVA: "D:\Proc\JDK\jdk1.8.0_31\bin\java"
JAVA_OPTS: "-Dprogram.name=standalone.bat -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52764,suspend=y,server=n "
===============================================================================
Connected to the target VM, address: '127.0.0.1:52764', transport: 'socket'
After that I guess the deployment phase fails with an exception and a debugger as supposed by its default behavior stops on the line that throws an exception in URLClassLoader:
What's going on? Why does the same configuration behave differently? I need something to start with...
Thx.