Skip to main content

Starting local Glassfish 3.1.2.2 from Eclipse

5 replies [Last post]
tobix
Offline
Joined: 2011-09-13
Points: 0

I am trying to start a local Glassfish from Eclipse.

I am always ending up in Communication error
"The Eclipse plugin cannot communicate with the GlassFish server...."

When searching the log file and browsing the source code of the plugin I see,
that the plugin thinks, Glassfish is already running:

!ENTRY oracle.eclipse.tools.glassfish 1 1 2012-11-28 13:50:24.147
!MESSAGE GlassFish: in SUN SunAppServerLaunch launch

!ENTRY oracle.eclipse.tools.glassfish 1 1 2012-11-28 13:50:24.150
!MESSAGE GlassFish: in SUN SunAppServerLaunch Forcing a STOP!!!!

"Forcing a STOP" can only be entered, if SunAppServer.isRunning returns true.

Definitely there is no server running on my machine!
If I take code snippets out of "isRunning" and let it run in a stand alone app, the method returns false.

Even it is a firewall issue - at least the plugin should try to spawn a new JVM for Glassfish. But there is no child JVM process started.

I am running Win7/64 with a JDK 1.7.0_04-b22.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mithel
Offline
Joined: 2006-04-03
Points: 0

This problem seems to be biting a lot of people for several years. I jumped through lots of hoops to check that nothing is using port 8080, disabled anti-virus, checked firewall, all the documented "tricks" but the problem persists. GlassFish works fine when manually started, but the Eclipse launch fails.

dm.java.net
Offline
Joined: 2013-04-11
Points: 0

Created Jira Issue : https://java.net/jira/browse/GLASSFISHPLUGINS-364
Fixed in GlassFish Tools 5.2.2.201304271125

sdoca
Offline
Joined: 2010-04-22
Points: 0

I am having the same/very similar problem. I am running Eclipse Juno EE Service Release 1 on Win7/64 with jdk1.6.0_24. I have installed the Glassfish plugin from http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/. I have no other plugins installed.

To keep things as simple as possible, I only installed the GlassFish 3.1.2.2 Application Server runtime component.

When I try to run the server using the embedded Glassfish runtime I get ConnectException and RuntimeException errors (see below for full log details). I installed the Oracle GlassFish Server Tools to see if that would help, but it didn't.

Does anybody have any ideas why we are getting this problem???

---------------

!ENTRY oracle.eclipse.tools.glassfish 1 1 2012-12-12 16:24:41.620
!MESSAGE GlassFish: in SUN SunAppServerLaunch launch

!ENTRY oracle.eclipse.tools.glassfish 1 1 2012-12-12 16:24:41.670
!MESSAGE GlassFish: in SUN SunAppServerLaunch Forcing a STOP!!!!

!ENTRY oracle.eclipse.tools.glassfish 4 1 2012-12-12 16:24:43.713
!MESSAGE GlassFish: error
!STACK 0
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:607)
at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

!ENTRY oracle.eclipse.tools.glassfish 1 1 2012-12-12 16:24:43.720
!MESSAGE GlassFish: CREDENTIAL_ERROR or CONNECTION ERROR

!ENTRY oracle.eclipse.tools.glassfish 4 150 2012-12-12 16:24:43.728
!MESSAGE The Eclipse plugin cannot communicate with the GlassFish server....
!STACK 0
java.lang.RuntimeException: The Eclipse plugin cannot communicate with the GlassFish server.Please, check for other software blocking or using this port, or firewall configuration, or VPN setup which might block some ports...
at com.sun.enterprise.jst.server.sunappsrv.SunAppServerLaunch.launch(SunAppServerLaunch.java:155)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:697)
at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3484)
at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3420)
at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:367)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

dm.java.net
Offline
Joined: 2013-04-11
Points: 0

I have very similar problem:
- Eclipse Juno Service Release 2
- Win7/64 with jdk 1.7.0_17
- Glassfish plugin from http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/ (GlassFish Tools 5.2.2.201304050358)
- GlassFish 3.1.2.2

When I try to run/debug the Glassfish server using the Glassfish plugin I am getting "Wrong user name or password." pop-up message.

Hier is extract fom the eclipse log file
.metadata\.log :

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.080
!MESSAGE GlassFish: in SUN SunAppServerLaunch launch

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.095
!MESSAGE GlassFish: reading from domain.xml adminServerPortNumber=7048

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.095
!MESSAGE GlassFish: in SunAppServer initialize done readServerConfiguration

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:45:00.807
!MESSAGE GlassFish: apparently CREDENTIAL_ERROR

!ENTRY oracle.eclipse.tools.glassfish 4 150 2013-04-11 13:45:00.807
!MESSAGE Wrong user name or password.

I am receiving the same message always :
- with correct Admin Name/Admin Password (I have checked this in browser http://localhost:7048/login.jsf)
- with incorrect Admin Name/Admin Password
- with Anonymous Connection for Admin Commands (anonymous-user-enabled on Glassfish)

But in the Eclipse server console I see server output and after approx. 70 sec. Glassfish is running. Unfortunately Eclipse servers view displays Glassfish instance as "stopped".

It seems like as the asadmin command used to start Glassfish from pluging is missing some parameters.

dm.java.net
Offline
Joined: 2013-04-11
Points: 0

I have very similar problem:
- Eclipse Juno Service Release 2
- Win7/64 with jdk 1.7.0_17
- Glassfish plugin from http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/ (GlassFish Tools 5.2.2.201304050358)
- GlassFish 3.1.2.2

When I try to run/debug the Glassfish server using the Glassfish plugin I am getting "Wrong user name or password." pop-up message.

Hier is extract fom the eclipse log file
.metadata\.log :

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.080
!MESSAGE GlassFish: in SUN SunAppServerLaunch launch

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.095
!MESSAGE GlassFish: reading from domain.xml adminServerPortNumber=7048

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:44:37.095
!MESSAGE GlassFish: in SunAppServer initialize done readServerConfiguration

!ENTRY oracle.eclipse.tools.glassfish 1 1 2013-04-11 13:45:00.807
!MESSAGE GlassFish: apparently CREDENTIAL_ERROR

!ENTRY oracle.eclipse.tools.glassfish 4 150 2013-04-11 13:45:00.807
!MESSAGE Wrong user name or password.

I am receiving the same message always :
- with correct Admin Name/Admin Password (I have checked this in browser http://localhost:7048/login.jsf)
- with incorrect Admin Name/Admin Password
- with Anonymous Connection for Admin Commands (anonymous-user-enabled on Glassfish)

But in the Eclipse server console I see server output and after approx. 70 sec. Glassfish is running. Unfortunately Eclipse servers view displays Glassfish instance as "stopped".

It seems like as the asadmin command used to start Glassfish from pluging is missing some parameters.