Do any body knows how to create a "Run/Remote" Configuration IntelIj to connect wildfly server,please let me know - intellij-idea

I want to create a "Run/Remote" Configuration IntellIj to connect remote wildfly server running in Ubuntu the code is in Intellij in windows,want to debug,please let me know
I have created a Remote Gradle task in Intellij,and imported and builded the WAR file project in Linux,then i started wildfky server in linux & i run the gradle task in Intellij,although when i click the debug gradle task all the threads are instantiated & debug is suddenly stopping in Intellij without any breakpoint hit in Intellij IDEenter image description here

Related

How to enable JRebel with gradle and tomcat plugin for IntelliJ

I have a IntelliJ Community Edition with Gradle 4.3.1 and com.bmuschko.tomcat plugin running. My application will be deployed currently and its working, now I want to enable JRebel for this. So that changes on my webapp folder will be hot-deployed.
At the plugin site is a description for this
Edit your Gradle startup script and add the following line to it to
tell Gradle to use the JRebel agent. Please make sure to set the
environment variable REBEL_HOME that points to your JRebel
installation directory.
JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS"
Currenty its not clear for me where do I need to change this? Obiously JRebel is not active when I start my tomcat with the pluging.
What I did:
installed the jrebel plugin in intellij
enabled the jrebel functionality with the ide
manually added a rebel.xml file (as described on the plugin site) in the build/classes/main folder
Where do I need to edit the gradle start up so that jrebel is active for gradle builds?
There are two ways you can run gradle that will affect how to add the arguments, with the daemon and without.
If you run gradle tomcatRun --no-daemon the arguments for JRebel must be added via JAVA_OPTS or GRADLE_OPTS environment variables. So this means either running as GRADLE_OPTS=-agentpath:/path/to/jrebel/lib/libjrebel64.so gradle tomcatRun --no-daemon or specifying the variable in a script(gradlew if you are using it). If you run the gradle task directly from IntelliJ, you can specify environment variables there.
If you run with the daemon, the GRADLE_OPTS variable will set JVM arguments for the launcher process, not the daemon. This will mean that JRebel is included in the wrong process and your changes aren't monitored. One way to set JVM arguments for the daemon is by adding the following to your gradle.properties
org.gradle.jvmargs='-agentpath:/path/to/jrebel/lib/libjrebel64.so'
Running with the daemon will mean that the JRebel banner is not displayed so don't be alarmed as the changes will still be monitored.
Also since JRebel 7.0 the folder structure was changed and the jrebel.jar located in installation root is the new core which requires additional bootstrapping provided by the included native agents in the jrebel/lib dir. It is suggested to use the corresponding native agent for your OS/arch using the agentpath argument and not the javaagent argument as in the tomcat plugin docs.

Cannot connect Intellij to Glassfish 4

I have Intellij IDEA and I cannot connect it to Glassfish 4.
When I try to Debug, the error message that I get is:
Artifact exploded: Server is not connected. Deploy is not available.
I've started Intellij using JDK 8.
I don't know what can I do to be able to debug directly from Intellij.
I have set up the Glassfish 4 Server in IDEA and put the domain URL and the credentials. Then I've set the war as exploded and set the URL to localhost:8082
It's working with Glassfish 3.
Glassfish 4 is the problem.
I have the last version, 4.1.1, of Glassfish
Here is what I did to get a simple Java web application running in Glassfish 4.1.1 inside IntelliJ 15.0.4 with ultimate license running on JDK 1.8 on a Mac.
Install Maven brew install maven
Install Glassfish brew install glassfish
Create a simple web application through Maven in shell
cd
mvn archetype:generate -DgroupId=so36290127-org -DartifactId=so36290127-app -DarchetypeArtifactId=maven-archetype-webapp
cd so36290127-app
mvn install
Import so36290127-app into IntelliJ as a Maven project. File, New, Project from Existing Sources, choose so36290127-app/pom.xml. Accept all the defaults
In Intellij, go to Run, Edit Configurations
Click +
Choose "more...", GlassFish Server, Local
Click Configure button
Enter the path to the GlassFish libexec directoy, /usr/local/opt/glassfish/libexec in my case.
Set Server Domain to default domain1
Click Deployment
Click +, choose Artifact
Choose so36290127-app:war exploded
Click Ok
Go to Run, Debug and then Hello, World! opens in my browser
Thank you Kirby,
Actually is still not working.
I am using IDEA 14.1.5 on a Windows 8 64-bit
Glassfish version is 4.1.1
I put the JDK / JRE 8 in the Glassfish configuration in IDEA.
I also set IDEA_JDK to point to Java JDK 8 in System Environment variables.
Do you think that I should switch to IDEA 15 and try again?
Or there are some special configuration that have to be done on the Glassfish side?
Best regards,

debugging project without eclipse debugger

I am using maven project in eclipse mars . My Project is not building in the eclipse so i am compiling my project through dos mode. I not being able to debug the code.so somebody please help me to solve issue
You can debug a tomcat server even if you don't run it inside Eclipse, using remote debug.
Please take a look at Remote debugging Tomcat with Eclipse or this blog for Intellij / this one for Eclipse
The idea is to start your tomcat server in debug mode then connecting your debugger to the "remote" (even if on your local PC) JVM (The JVM of the server).

why running a maven spring project on intellij giving "connection refused on port" error

I am running a sample "hello world" spring maven project from my machine and debugger port is allowing to run or debug the class also browser gives blank screen
To debug a maven project:
start a maven project in debug mode using 'mvnDebug' command instead of 'mvn'.
For your case should be:
mvnDebug jetty:run
It should open a debug port of 8000 by default on your machine.
tell your IDE to remotely connect to the running JVM of your server like you did in the picture (make sure you got the correct port).
The connection refused happens because there is no actual running JVM listening on 8081, as described in your picture.
You mentioned that you get a blank screen in the browser. Maybe you also have a misconfiguration in your pom file. The myspringlearning plugin definition doesn't seem right. You should just make sure you:
have a maven webapp project in your pom.xml (packaging should be war)
the jetty plugin should automatically pick it by default, on port 8080, just 'mvn jetty:run' in your project root

how to debug maven tycho plugin?

I followed steps mentioned in http://wiki.eclipse.org/Developing_Tycho and downloaded tycho source code.
To debug eclipse project (which uses maven tycho), I followed steps steps mentioned in
http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+IDE
Now when I run maven build and start remote debug application, it gives error as:
Failed to connect to remote VM. Connection refused.Connection refused: connect
how can I get eclipse-maven port number?
Is there any other approach to debug tycho?
Thanks.
solved! execute mvnDebug command from command line so it will halt at breakpoint and then start eclipse remote debug application. It works..
Previously I executed maven debug command from eclipse maven debug configuration which doesnt work.