13

When setting up Glassfish in IntelliJ IDEA I get the following Error message ´Admin port configuration not found´.

Now I searched high an low but I found no place where I can set the admin port.

Searching Google all I found was a dead link on the JavaRanch. So Im not the first but the solution is lost.

Does anybody know what is to be done?

Patrick Stalder
  • 415
  • 1
  • 5
  • 19

5 Answers5

20

IDEA GlassFish integration detects admin port from the file: <domain folder>/config/domain.xml

XPaths checked:

/configs/config[@name='server-config']/http-service/http-listener[@id='admin-listener']/@port
/configs/config[@name='server-config']/network-config/network-listeners/network-listener[@protocol='admin-listener']/@port

If domain.xml can't be found or both XPaths aren't valid you'll be warned with the message Admin port configuration not found.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
1

It was happening to me because my domain.xml was not in the /domain1/config folder.

Instead I had this two files domain.xml.bak and domain.xml~.

What I did is create a new domain.xml with the content of domain.xml~. Then remove the two fields (.bak and .xml~) And then run again glassfish.

That worked for me.

Why my domain.xml sundenly disappear stills a mistery to me. :S

Sal81
  • 101
  • 1
  • 1
  • 7
1

First, you can delete domain.xml.bak Second, go to IDEA - Edit Configurations - GlassFish. Set an absolute path in the field "Server Domain", for example: C:\glassfish5\glassfish\domains\domain1. So, check field "JRE" if you wrote path to JDK in file "asenv". This path must be the same as the value from server configuraton.

Cursor
  • 11
  • 1
  • Hi Cursor, welcome to Stack Overflow! Can you provide an explanation as to why your answer is different / more relevant than the previous answers? This is a very old question, so if something has changed it would be helpful for other readers to have that context :) – Tori Henri Nov 03 '20 at 15:12
1

I think the broken link should be http://youtrack.jetbrains.net/issue/IDEA-25807 and points to the Glassfish HOME configuration as the issue.

JKW
  • 11
  • 2
0

A simple and straightforward way to handle this error in IntelliJ IDEA is changing

domain1

to equivalent full path, e.g.:

C:\glassfish6\glassfish\domains\domain1

in Run/Debug Configurations pane of Glassfish integration:

enter image description here

Mehdi Rahimi
  • 1,453
  • 5
  • 20
  • 31