0

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

Kirby
  • 15,127
  • 10
  • 89
  • 104
Alexandru
  • 11
  • 2
  • 5

2 Answers2

0

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.

  1. Install Maven brew install maven
  2. Install Glassfish brew install glassfish
  3. 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
  1. Import so36290127-app into IntelliJ as a Maven project. File, New, Project from Existing Sources, choose so36290127-app/pom.xml. Accept all the defaults

  2. In Intellij, go to Run, Edit Configurations

  3. Click +

  4. Choose "more...", GlassFish Server, Local

  5. Click Configure button

  6. Enter the path to the GlassFish libexec directoy, /usr/local/opt/glassfish/libexec in my case.enter image description here

  7. Set Server Domain to default domain1enter image description here

  8. Click Deployment

  9. Click +, choose Artifact

  10. Choose so36290127-app:war explodedenter image description here

  11. Click Okenter image description here

  12. Go to Run, Debug and then Hello, World! opens in my browserenter image description here

Kirby
  • 15,127
  • 10
  • 89
  • 104
0

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,

Alexandru
  • 11
  • 2
  • 5