IDE : Eclipse Luna, JDK & JRE : 1.8.0_25, Glassfish : Glassfish 4.0
I can start Glassfish Server externally. But when I deploy my project, Glassfish cannot start running or debugging from Eclipse.
Here is the log :
!ENTRY org.eclipse.ant.launching 4 120 2014-12-24 10:42:28.715
!MESSAGE Error logged from Ant UI:
!STACK 0
java.net.SocketTimeoutException: Accept timed out
at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntBuildListener$ServerConnection.run(RemoteAntBuildListener.java:89)
!ENTRY oracle.eclipse.tools.glassfish 4 1 2014-12-24 10:59:44.187
!MESSAGE GlassFish: in SunAppServerBehaviour restart
!STACK 1
org.eclipse.core.runtime.CoreException: Unable to start server due following issues:
at oracle.eclipse.tools.glassfish.GlassfishServerLaunchDelegate.abort(GlassfishServerLaunchDelegate.java:75)
at oracle.eclipse.tools.glassfish.GlassfishServerLaunchDelegate.startDASAndTarget(GlassfishServerLaunchDelegate.java:233)
at oracle.eclipse.tools.glassfish.GlassfishServerLaunchDelegate.launch(GlassfishServerLaunchDelegate.java:133)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:731)
at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate$3.run(GlassfishServerBehaviourDelegate.java:366)
Caused by: java.lang.NullPointerException
at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate$StartJob.call(GlassfishServerBehaviourDelegate.java:801)
at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate$StartJob.call(GlassfishServerBehaviourDelegate.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
!SUBENTRY 1 oracle.eclipse.tools.glassfish 4 150 2014-12-24 10:59:44.187
!MESSAGE Unable to start server due following issues:
!STACK 0
java.lang.NullPointerException
at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate$StartJob.call(GlassfishServerBehaviourDelegate.java:801)
at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate$StartJob.call(GlassfishServerBehaviourDelegate.java:1)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
By the way, i'm using vaadin 7.3.3. I've tried to deploy the project with both JDK compliances 1.7 and 1.8 What I'm doing wrong?
Here is the server.log when i start Glassfish manually (the log doesn't change when i restart Glassfish server from Eclipse):
[2014-12-24T14:47:27.336+0200] [] [INFO] [NCLS-GFLAUNCHER-00005] [javax.enterprise.launcher] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425247336] [levelValue: 800] [[
JVM invocation command line:
C:\Program Files\Java\jdk1.8.0_25\bin\java.exe
-cp
D:/glassfish4/glassfish/modules/glassfish.jar
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-Xmx512m
-javaagent:D:/glassfish4/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djavax.xml.accessExternalSchema=all
-Djavax.net.ssl.trustStore=D:\glassfish4\glassfish\domains\domain1/config/cacerts.jks
-Djdk.corba.allowOutputStreamSubclass=true
-Dfelix.fileinstall.dir=D:\glassfish4\glassfish/modules/autostart/
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command,org.apache.felix.shell.remote,org.apache.felix.fileinstall
-Dcom.sun.aas.installRoot=D:\glassfish4\glassfish
-Dfelix.fileinstall.poll=5000
-Djava.endorsed.dirs=D:\glassfish4\glassfish/modules/endorsed;D:\glassfish4\glassfish/lib/endorsed
-Djava.security.policy=D:\glassfish4\glassfish\domains\domain1/config/server.policy
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.bundles.startTransient=true
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dfelix.fileinstall.log.level=2
-Djavax.net.ssl.keyStore=D:\glassfish4\glassfish\domains\domain1/config/keystore.jks
-Djava.security.auth.login.config=D:\glassfish4\glassfish\domains\domain1/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=D:\glassfish4\glassfish\domains\domain1
-Dosgi.shell.telnet.port=6666
-Dgosh.args=--nointeractive
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Dcom.ctc.wstx.returnNullForDefaultNamespace=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.8.0_25/lib/ext;C:\Program Files\Java\jdk1.8.0_25/jre/lib/ext;D:\glassfish4\glassfish\domains\domain1/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djava.library.path=D:/glassfish4/glassfish/lib;C:/Program Files/Java/jdk1.8.0_25/bin;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;C:/ProgramData/Oracle/Java/javapath;C:/Program Files/Common Files/Microsoft Shared/Windows Live;C:/Program Files (x86)/Common Files/microsoft shared/Windows Live;C:/oracle/product/10.2.0/client_1;C:/Windows/System32/wbem;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files/Java/jdk1.6.0_32/bin;C:/Program Files/TortoiseSVN/bin;C:/Program Files/Java/jdk1.6.0_32;D:/glassfish4/bin;C:/Program Files (x86)/Windows Live/Shared;C:/Program Files (x86)/QuickTime/QTSystem;C:/Users/User
com.sun.enterprise.glassfish.bootstrap.ASMain
-upgrade
false
-domaindir
D:/glassfish4/glassfish/domains/domain1
-read-stdin
true
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--watchdog=false,,,--debug=true,,,--domaindir,,,D:\glassfish4\glassfish\domains,,,domain1
-domainname
domain1
-instancename
server
-type
DAS
-verbose
false
-asadmin-classpath
D:/glassfish4/glassfish/lib/client/appserver-cli.jar
-debug
true
-asadmin-classname
com.sun.enterprise.admin.cli.AdminMain]]
[2014-12-24T14:47:29.505+0200] [glassfish 4.0] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249505] [levelValue: 800] [[
Running GlassFish Version: GlassFish Server Open Source Edition 4.0 (build 89)]]
[2014-12-24T14:47:29.508+0200] [glassfish 4.0] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249508] [levelValue: 800] [[
Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]
[2014-12-24T14:47:29.627+0200] [glassfish 4.0] [INFO] [realm.loaded.successfully] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249627] [levelValue: 800] [[
SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]
[2014-12-24T14:47:29.627+0200] [glassfish 4.0] [INFO] [realm.loaded.successfully] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249627] [levelValue: 800] [[
SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]
[2014-12-24T14:47:29.627+0200] [glassfish 4.0] [INFO] [realm.loaded.successfully] [javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249627] [levelValue: 800] [[
SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]
[2014-12-24T14:47:29.982+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249982] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 65ms - bound to [/0.0.0.0:8,080]]]
[2014-12-24T14:47:29.999+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249999] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:8,181]]]
[2014-12-24T14:47:29.999+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425249999] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:4,848]]]
[2014-12-24T14:47:30.191+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core.security.org.glassfish.security.services.impl.authorization] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425250191] [levelValue: 800] [[
Authorization Service has successfully initialized.]]
[2014-12-24T14:47:30.221+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425250221] [levelValue: 800] [[
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:3,700]]]
[2014-12-24T14:47:32.124+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252124] [levelValue: 800] [[
visiting unvisited references]]
[2014-12-24T14:47:32.189+0200] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252189] [levelValue: 1000] [[
Exception while visiting javax.swing.JTable]]
[2014-12-24T14:47:32.653+0200] [glassfish 4.0] [INFO] [security.secmgroff] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252653] [levelValue: 800] [[
SEC1002: Security Manager is OFF.]]
[2014-12-24T14:47:32.653+0200] [glassfish 4.0] [INFO] [sec.service.startup.enter] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252653] [levelValue: 800] [[
SEC1010: Entering Security Startup Service]]
[2014-12-24T14:47:32.663+0200] [glassfish 4.0] [INFO] [policy.loading] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252663] [levelValue: 800] [[
SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.]]
[2014-12-24T14:47:32.693+0200] [glassfish 4.0] [INFO] [sec.service.startup.exit] [javax.enterprise.system.core.security.com.sun.enterprise.security] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425252693] [levelValue: 800] [[
SEC1011: Security Service(s) Started Successfully]]
[2014-12-24T14:47:33.027+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425253027] [levelValue: 800] [[
visiting unvisited references]]
[2014-12-24T14:47:34.179+0200] [glassfish 4.0] [INFO] [] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425254179] [levelValue: 800] [[
visiting unvisited references]]
[2014-12-24T14:47:34.583+0200] [glassfish 4.0] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425254583] [levelValue: 800] [[
HV000001: Hibernate Validator 5.0.0.Final]]
[2014-12-24T14:47:35.015+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=1 _ThreadName=Thread-4] [timeMillis: 1419425255015] [levelValue: 1000] [[
log4j:WARN No appenders could be found for logger (org.jboss.logging).]]
[2014-12-24T14:47:35.015+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=1 _ThreadName=Thread-4] [timeMillis: 1419425255015] [levelValue: 1000] [[
log4j:WARN Please initialize the log4j system properly.]]
[2014-12-24T14:47:35.015+0200] [glassfish 4.0] [SEVERE] [] [] [tid: _ThreadID=1 _ThreadName=Thread-4] [timeMillis: 1419425255015] [levelValue: 1000] [[
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.]]
[2014-12-24T14:47:47.565+0200] [glassfish 4.0] [INFO] [jts.startup_msg] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1419425267565] [levelValue: 800] [[
JTS5014: Recoverable JTS instance, serverId = [3700]]]
ps: I also tried it with Glassfish 4.1 but still the same problem exists.
Yes, finally I solved the problem by helps of a friend after a day. After fresh installations of Glassfish 4.0 (not web, the full one) and Eclipse Juno; GF is now running on JDK 1.7_u67 with Eclipe Juno. I can start and debug the Glassfish from Eclipse internally. By the way NullPointerException is irrelevant.
Adding that line to domain.xml
<jvm-options>-Duser.language=en</jvm-options>
and that line to eclipse.ini
-Duser.language=en
solved the problem.
Thank you for all!