glassfish 3.1 not working with intellij


I have got a simple jee6 webapp up from the maven archetype




was trying to run it with glassfish (in c:\java_apps\glassfish\glassfish3) while deploying it to server from within intellij (10.5)

and am getting the following

cmd /c C:\java_apps\glassfish\glassfish3\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
[2011-06-28 09:52:02,143] Artifact jee6webapp:war: Server is not connected. Press 'Deploy' to start deployment.

and in the server.log i am repeatedly getting

[#|2011-06-28T22:04:10.583+0530|INFO|oracle-glassfish3.1||_ThreadID=100;_ThreadName=Thread-1;|User [admin] from host does not have administration access|#]



Comment actions Permalink


For me, "User [***] from host does not have administration access" appears in log only when if I fill in wrong user name and/or password in the server run configuration.
Are you sure its not the case?

If you are confident in the name/password, you may add the following:

<category name="#com.intellij.javaee.oss.admin.JavaeeAgentAdminServerBase">

     <priority value="DEBUG"/> <appender-ref ref="CONSOLE-ALL"/>

to <IDEA HOME>/bin/log.xml before the <root> node at the end.

Then, after IDEA restart, on attempt to start GF again, you should be able to see in the IDEA log file stacktraces like:
DEBUG - min.JavaeeAgentAdminServerBase -
        at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.parseResponse(

IDEA log file is located at <idea system  path>/log/idea.log. <idea.system.path> variable is configured  in <IDEA HOME>/bin/ and by default points to  <user home>/.IntelliJIdea10/system


Comment actions Permalink

When trying to connect to Glassfish 3.1.1 in the debug mode I am getting exactly the same behaviour. Glassfish has no security configured, which means that you don't need to sign on when using admin console which is the default setting for glassfish. In the connection settings of idea I am setting user name to admin and leaving empty password. The problem dissapears for glassfish domains with enabled security where I have to provide both user name and password.

Stacktrace from the log file

2013-05-03 10:56:40,172 [67434532]   WARN - erver.JavaeeServerInstanceImpl -

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.parseResponse(

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.invoke(

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.doConnect(

    at com.intellij.javaee.oss.agent.SimpleAgentBase$1.doJob(

    at com.intellij.javaee.oss.agent.SimpleAgentBase$1.doJob(

    at com.intellij.javaee.oss.agent.SimpleAgentJob.perform(

    at com.intellij.javaee.oss.agent.SimpleAgentBase.connect(

    at sun.reflect.GeneratedMethodAccessor468.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(

    at java.lang.reflect.Method.invoke(

    at com.intellij.javaee.oss.agent.ContextThreadAgentProxyFactory$1$1.invoke(

    at $Proxy124.connect(Unknown Source)

    at sun.reflect.GeneratedMethodAccessor468.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(

    at java.lang.reflect.Method.invoke(

    at com.intellij.javaee.oss.agent.ThreadAgentProxyFactory$ThreadInvocationHandler$

    at com.intellij.javaee.util.SequentialTaskExecutor$

    at com.intellij.javaee.util.SequentialTaskExecutor$

    at com.intellij.openapi.application.impl.ApplicationImpl$

    at java.util.concurrent.Executors$

    at java.util.concurrent.FutureTask$Sync.innerRun(


    at java.util.concurrent.ThreadPoolExecutor.runWorker(

    at java.util.concurrent.ThreadPoolExecutor$


    at com.intellij.openapi.application.impl.ApplicationImpl$1$

Comment actions Permalink

OK. I found solution. In the IDEA in run/debug configuration for glassfish
remove both username and password. Both fields must be empty for the default glassfish configuration.


Please sign in to leave a comment.