Why WildFly throws an Exception in Intellij IDEA's debug mode while the run mode works perfectly well?

Ivan

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: enter image description here

enter image description here

What's going on? Why does the same configuration behave differently? I need something to start with...

Thx.

Robert Kühne

The reason is that Intellij Idea overwrites the JAVA_OPTS enviroment variable when started in debug mode. You can verify this in the Run/Debug Configurations Dialog. Select your configuration and have a look at the Startup/Connection tab. Select Debug and you can see below that the checkmark for Pass environment variables is set.

There is an entry for JAVA_OPTS. It probably overrides all settings made in standalone.conf (standalone.conf.bat for windows). These settings can be important for operation. Especially if you customize some settings in standalone.conf you can see them in run mode but not in debug mode.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why WildFly throws an Exception in Intellij IDEA's debug mode while the run mode works perfectly well?

From Dev

IntelliJ IDEA 13.0 constant debug mode for app?

From Dev

IntelliJ IDEA 13.0 constant debug mode for app?

From Dev

How to run Play Framework 2.x in debug mode in IntelliJ IDEA?

From Dev

How to run Play Framework 2.x in debug mode in IntelliJ IDEA?

From Dev

IntelliJ IDEA won't stop on assertions in debug mode

From Dev

Stop debug mode in IntelliJ IDEA when using Gradle

From Dev

Gradle daemon not reused when running in debug mode (in IntelliJ IDEA)

From Dev

Run Boxstarter in "Debug" mode?

From Dev

Run Boxstarter in "Debug" mode?

From Dev

Run xcode in mode debug

From Dev

Update only works in debug mode

From Dev

Timer only works in debug mode

From Dev

SetListAdapter works only at debug mode

From Dev

SFML Only Works in Debug Mode

From Dev

SharedPreferences, gets the value in debug mode but not in run mode

From Dev

FFMPEG exception in debug mode only

From Dev

how to run hive in debug mode

From Dev

Generate javascript if run [DEBUG] mode

From Dev

why does the debug mode not work well when using R-Devel?

From Dev

Pyspark - saveAsTable throws index error while show() dataframe works perfectly

From Dev

How to run application in debug mode and release mode with different api's in ios

From Dev

Passwordless SSH works only in debug mode

From Dev

C# Program Only Works in Debug Mode

From Dev

Code Parallel.For works only in Debug mode

From Dev

Javascript only works in Google Chrome in debug mode

From Dev

WebForms scripts only works in debug mode

From Dev

opacity fade only works in debug mode

From Dev

Action class works in debug mode in selenium webdriver

Related Related

  1. 1

    Why WildFly throws an Exception in Intellij IDEA's debug mode while the run mode works perfectly well?

  2. 2

    IntelliJ IDEA 13.0 constant debug mode for app?

  3. 3

    IntelliJ IDEA 13.0 constant debug mode for app?

  4. 4

    How to run Play Framework 2.x in debug mode in IntelliJ IDEA?

  5. 5

    How to run Play Framework 2.x in debug mode in IntelliJ IDEA?

  6. 6

    IntelliJ IDEA won't stop on assertions in debug mode

  7. 7

    Stop debug mode in IntelliJ IDEA when using Gradle

  8. 8

    Gradle daemon not reused when running in debug mode (in IntelliJ IDEA)

  9. 9

    Run Boxstarter in "Debug" mode?

  10. 10

    Run Boxstarter in "Debug" mode?

  11. 11

    Run xcode in mode debug

  12. 12

    Update only works in debug mode

  13. 13

    Timer only works in debug mode

  14. 14

    SetListAdapter works only at debug mode

  15. 15

    SFML Only Works in Debug Mode

  16. 16

    SharedPreferences, gets the value in debug mode but not in run mode

  17. 17

    FFMPEG exception in debug mode only

  18. 18

    how to run hive in debug mode

  19. 19

    Generate javascript if run [DEBUG] mode

  20. 20

    why does the debug mode not work well when using R-Devel?

  21. 21

    Pyspark - saveAsTable throws index error while show() dataframe works perfectly

  22. 22

    How to run application in debug mode and release mode with different api's in ios

  23. 23

    Passwordless SSH works only in debug mode

  24. 24

    C# Program Only Works in Debug Mode

  25. 25

    Code Parallel.For works only in Debug mode

  26. 26

    Javascript only works in Google Chrome in debug mode

  27. 27

    WebForms scripts only works in debug mode

  28. 28

    opacity fade only works in debug mode

  29. 29

    Action class works in debug mode in selenium webdriver

HotTag

Archive