glassfish 3.1 not working with intellij

Hi,

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

groupid:org.codehaus.mojo.archetypes

artifactid:webapp-jee6

version:1.4

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|javax.enterprise.system.tools.admin.com.sun.enterprise.container.common|_ThreadID=100;_ThreadName=Thread-1;|User [admin] from host 127.0.0.1 does not have administration access|#]

Regards

Asif

3 comments
Comment actions Permalink

Hello,

For me, "User [***] from host 127.0.0.1 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"/>
</category>

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 - javax.security.auth.login.CredentialException
        at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.parseResponse(Glassfish3AgentBase.java:151)

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

Regards,
Michael

0
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 -  
javax.security.auth.login.CredentialException

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.parseResponse(Glassfish3AgentBase.java:214)

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.invoke(Glassfish3AgentBase.java:162)

    at com.intellij.javaee.oss.glassfish.agent.Glassfish3AgentBase.doConnect(Glassfish3AgentBase.java:43)

    at com.intellij.javaee.oss.agent.SimpleAgentBase$1.doJob(SimpleAgentBase.java:21)

    at com.intellij.javaee.oss.agent.SimpleAgentBase$1.doJob(SimpleAgentBase.java:17)

    at com.intellij.javaee.oss.agent.SimpleAgentJob.perform(SimpleAgentJob.java:16)

    at com.intellij.javaee.oss.agent.SimpleAgentBase.connect(SimpleAgentBase.java:17)

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

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at com.intellij.javaee.oss.agent.ContextThreadAgentProxyFactory$1$1.invoke(ContextThreadAgentProxyFactory.java:44)

    at $Proxy124.connect(Unknown Source)

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

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:601)

    at com.intellij.javaee.oss.agent.ThreadAgentProxyFactory$ThreadInvocationHandler$1.call(ThreadAgentProxyFactory.java:169)

    at com.intellij.javaee.util.SequentialTaskExecutor$2.run(SequentialTaskExecutor.java:61)

    at com.intellij.javaee.util.SequentialTaskExecutor$1.run(SequentialTaskExecutor.java:32)

    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)

    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

    at java.util.concurrent.FutureTask.run(FutureTask.java:166)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

    at java.lang.Thread.run(Thread.java:722)

    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)

0
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.

0

Please sign in to leave a comment.