Vishal Chepuri
Vishal Chepuri

Reputation: 320

Glassfish starting domain failed in windows 7

I am trying to install Glassfish 3.1 and ended up in configuration fail. I am running it on Windows 7 behind corporate proxy.

It created a default domain successfully but when attempted to start domain it failed showing following message.

Starting domain
_______________
Executing command :C:\glassfish6\glassfish\bin\asadmin.bat start-domain domain1

C:\glassfish6\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....

nothing happens after this. Below is my asadmin file.

REM Always use JDK 1.6 or higher
REM Depends on Java from ..\config\asenv.bat
VERIFY OTHER 2>nul
setlocal ENABLEEXTENSIONS
if ERRORLEVEL 0 goto ok
echo "Unable to enable extensions"
exit /B 1
:ok
call "%~dp0..\config\asenv.bat" 
if "%AS_JAVA%" == "C:\Program Files\Java\jdk1.8.0_102" goto UsePath
set JAVA="%AS_JAVA%\bin\java"
goto run
:UsePath
set JAVA=java
:run
%JAVA% -jar "%~dp0..\modules\admin-cli.jar" %*

server logs

Aug 29, 2017 11:02:39 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-XX:PermSize=64m
-Xmx512m
-javaagent:C:/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djava.security.auth.login.config=C:\glassfish6\glassfish\domains\jmsnew/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Djavax.net.ssl.trustStore=C:\glassfish6\glassfish\domains\jmsnew/config/cacerts.jks
-Dfelix.fileinstall.dir=C:\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=C:\glassfish6\glassfish\domains\jmsnew
-Dosgi.shell.telnet.port=6666
-Dgosh.args=--nointeractive
-Dcom.sun.aas.installRoot=C:\glassfish6\glassfish
-Dfelix.fileinstall.poll=5000
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.endorsed.dirs=C:\glassfish6\glassfish/modules/endorsed;C:\glassfish6\glassfish/lib/endorsed
-Djava.security.policy=C:\glassfish6\glassfish\domains\jmsnew/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
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.8.0_102/lib/ext;C:\Program Files\Java\jdk1.8.0_102/jre/lib/ext;C:\glassfish6\glassfish\domains\jmsnew/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.net.ssl.keyStore=C:\glassfish6\glassfish\domains\jmsnew/config/keystore.jks
Aug 29, 2017 11:02:39 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 10 msec.
Aug 29, 2017 11:02:53 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-XX:PermSize=64m
-Xmx512m
-javaagent:C:/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djava.security.auth.login.config=C:\glassfish6\glassfish\domains\jmsnew/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Djavax.net.ssl.trustStore=C:\glassfish6\glassfish\domains\jmsnew/config/cacerts.jks
-Dfelix.fileinstall.dir=C:\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=C:\glassfish6\glassfish\domains\jmsnew
-Dosgi.shell.telnet.port=6666
-Dgosh.args=--nointeractive
-Dcom.sun.aas.installRoot=C:\glassfish6\glassfish
-Dfelix.fileinstall.poll=5000
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.endorsed.dirs=C:\glassfish6\glassfish/modules/endorsed;C:\glassfish6\glassfish/lib/endorsed
-Djava.security.policy=C:\glassfish6\glassfish\domains\jmsnew/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
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.8.0_102/lib/ext;C:\Program Files\Java\jdk1.8.0_102/jre/lib/ext;C:\glassfish6\glassfish\domains\jmsnew/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.net.ssl.keyStore=C:\glassfish6\glassfish\domains\jmsnew/config/keystore.jks
Aug 29, 2017 11:02:53 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 17 msec.
Aug 29, 2017 11:05:17 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
-XX:+UnlockDiagnosticVMOptions
-XX:NewRatio=2
-XX:MaxPermSize=192m
-XX:PermSize=64m
-Xmx512m
-javaagent:C:/glassfish6/glassfish/lib/monitor/flashlight-agent.jar
-client
-Djava.security.auth.login.config=C:\glassfish6\glassfish\domains\jmsnew/config/login.conf
-Dfelix.fileinstall.disableConfigSave=false
-Djavax.net.ssl.trustStore=C:\glassfish6\glassfish\domains\jmsnew/config/cacerts.jks
-Dfelix.fileinstall.dir=C:\glassfish6\glassfish/modules/autostart/
-Dfelix.fileinstall.bundles.new.start=true
-Dcom.sun.aas.instanceRoot=C:\glassfish6\glassfish\domains\jmsnew
-Dosgi.shell.telnet.port=6666
-Dgosh.args=--nointeractive
-Dcom.sun.aas.installRoot=C:\glassfish6\glassfish
-Dfelix.fileinstall.poll=5000
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.endorsed.dirs=C:\glassfish6\glassfish/modules/endorsed;C:\glassfish6\glassfish/lib/endorsed
-Djava.security.policy=C:\glassfish6\glassfish\domains\jmsnew/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
-Dosgi.shell.telnet.ip=127.0.0.1
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Djava.awt.headless=true
-Djava.ext.dirs=C:\Program Files\Java\jdk1.8.0_102/lib/ext;C:\Program Files\Java\jdk1.8.0_102/jre/lib/ext;C:\glassfish6\glassfish\domains\jmsnew/lib/ext
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.net.ssl.keyStore=C:\glassfish6\glassfish\domains\jmsnew/config/keystore.jks
Aug 29, 2017 11:05:17 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 6 msec.

and the error on cmd:

Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

Aug 29, 2017 11:05:18 AM BundleProvisioner install
WARNING: Failed to install file:/C:/glassfish6/glassfish/modules/glassfish-extra
-jre-packages.jar
org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2785)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:165)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
(BundleProvisioner.java:446)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
Bundles(BundleProvisioner.java:208)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:139)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

Aug 29, 2017 11:05:18 AM BundleProvisioner install
WARNING: Failed to install file:/C:/glassfish6/glassfish/modules/glassfish-oracl
e-jdbc-driver-packages.jar
org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2785)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:165)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
(BundleProvisioner.java:446)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
Bundles(BundleProvisioner.java:208)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:139)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

Aug 29, 2017 11:05:18 AM BundleProvisioner install
WARNING: Failed to install file:/C:/glassfish6/glassfish/modules/javax.transacti
on.jar
org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2785)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:165)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
(BundleProvisioner.java:446)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
Bundles(BundleProvisioner.java:208)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:139)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

Aug 29, 2017 11:05:18 AM BundleProvisioner install
WARNING: Failed to install file:/C:/glassfish6/glassfish/modules/performance-tun
er-extra-jre-packages.jar
org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2785)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:165)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
(BundleProvisioner.java:446)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
Bundles(BundleProvisioner.java:208)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:139)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

Aug 29, 2017 11:05:18 AM BundleProvisioner install
WARNING: Failed to install file:/C:/glassfish6/glassfish/modules/webservices-ext
ra-jdk-packages.jar
org.osgi.framework.BundleException: Could not create bundle object.
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2785)
        at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:165)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
(BundleProvisioner.java:446)
        at com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.install
Bundles(BundleProvisioner.java:208)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:139)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.apache.felix.framework.ExtensionManager.addExtensionBundle(Extens
ionManager.java:401)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2751)
        ... 13 more

org.osgi.framework.BundleException: Unresolved constraint in bundle jaxb-api [2]
: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (osgi.wi
ring.package=javax.activation)
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:382
6)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:295)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfis
h.metro.webservices-api-osgi [3]: Unable to resolve 3.0: missing requirement [3.
0] osgi.wiring.package; (&(osgi.wiring.package=javax.xml.bind)(version>=2.2.0))
[caused by: Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package
; (osgi.wiring.package=javax.activation)]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:382
6)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:295)
        at java.lang.Thread.run(Thread.java:745)
java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findCla
ss(BundleWiringImpl.java:2128)
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDele
gation(BundleWiringImpl.java:1432)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringIm
pl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadCla
ss(BundleWiringImpl.java:1843)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(Bund
leWiringImpl.java:1317)
        at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:417
0)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1972)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:295)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator
not found by org.glassfish.main.core.glassfish [108]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDele
gation(BundleWiringImpl.java:1460)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringIm
pl.java:72)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadCla
ss(BundleWiringImpl.java:1843)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 14 more
org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfis
h.hk2.osgi-adapter [210]: Unable to resolve 210.0: missing requirement [210.0] o
sgi.wiring.package; (&(osgi.wiring.package=com.sun.enterprise.module)(version>=1
.1.0)) [caused by: Unable to resolve 128.0: missing requirement [128.0] osgi.wir
ing.package; (&(osgi.wiring.package=org.jvnet.hk2.config)(version>=1.1.0)) [caus
ed by: Unable to resolve 38.0: missing requirement [38.0] osgi.wiring.package; (
osgi.wiring.package=javax.management)]]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:382
6)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:295)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMa
in.java:97)
        at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: org.glassfish.embeddable.GlassFishException: org.glassfish.embeddable
.GlassFishException: No GlassFishRuntime available
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:164)
        at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime
.java:157)
        at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.
java:110)
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
GlassFishMain.java:112)
        ... 6 more
Caused by: org.glassfish.embeddable.GlassFishException: No GlassFishRuntime avai
lable
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.getGlassFishRuntime(OSGiGlassFishRuntimeBuilder.java:202)
        at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuild
er.build(OSGiGlassFishRuntimeBuilder.java:162)
        ... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
        at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(G
lassFishMain.java:203)
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; sup
port was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=64m; support
 was removed in 8.0

Command start-domain failed.

Upvotes: 1

Views: 1608

Answers (2)

Aman Adhikari
Aman Adhikari

Reputation: 3280

I had exact same problem and I resolved it by downgrading java from version 8 to 7 as this glassfish server seems to be working on java 7 only. To be exact I changed AS_JAVA(located at ./glassfish/config/asenv.conf) from C:\Program Files\Java\jdk1.8.0_102 to C:\Program Files\Java\jdk1.7.0_80

And also for me there was a reference to Java 8 in domain.xml(my custom setting, reminding just in case you might also have it).

It is only glassfish where you can reference Java 7 you don't need to change entire JAVA_HOME if you don't want it.

I also found a thread , Will it be possible to use Java 8 on Glassfish 3?

Upvotes: 0

Old Schooled
Old Schooled

Reputation: 1272

1st try:

How did you create the domain? From a fresh install of glassfish, you shouldn't need to create the domain. The domain1 should be ready right out of the box. If you've created it, there may be somewhere you went wrong with the configuration during the creation.

First, make sure you're working with a fresh, up to date, full copy. You can find the latest version (ATM 4.1.2) here. Download that "Full Platform" version.

Unzip the downloaded folder to your chosen directory. (I directly unzipped into my C directory.)

Then navigate to your glassfish bin. After the install (unzipping), mine is here:

C:\glassfish4\glassfish\bin

Then without creating or configuring anything, start the server:

asadmin start-domain

Bam! Your domain should be started.

One more thing if that doesn't work. Try navigating to the outer glassfish bin directory instead. For me it would be:

C:\glassfish4\bin

and running the asadmin command from there. I've noticed that I have both on my classpath (environment variable) so I can't be sure which one is being used, although I think its the first.

As a side note, I've added the glassfish bin above to my environment variables so that I'm able to issue glassfish commands without having to navigate to the glassfish bin. Makes things much easier when you use it often.

2nd Try:

EDIT #2: OK, you're getting a bind error that I've seen before. Using the same fresh install that we've just done, do the following:

Find your domain.xml which should be located ->

\glassfish4\glassfish\domains\domain1\config\domain.xml

I would save a copy of this file just in case you mess something up(habit but shouldn't matter here). Once you are ready, open that puppy up and search the document until you find the following:

<network-listeners>
      <network-listener protocol="http-listener-1" port="8080" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
      <network-listener protocol="http-listener-2" port="8181" name="http-listener-2" thread-pool="http-thread-pool" transport="tcp"></network-listener>
      <network-listener protocol="admin-listener" port="4848" name="admin-listener" thread-pool="admin-thread-pool" transport="tcp"></network-listener>
</network-listeners>

then change the port numbers to something different. Save it, close it out and try to start the server again... Any luck?

3rd Try (extra credit?)

Also worth trying, you can check to see if there is something already running on those ports. Open your windows command prompt and enter the command:

netstat -aon

Now look through that entire list of ip numbers (there are ways to export to text file if it's too much) and see if you find any of them that use 4848 at the end of the address. If so, you can kill that process by taking the PID number that is on the far right of the listing and using it in this command:

taskkill /f /PID INSERT_PID_#_HERE_FROM_FAR_LEFT_ON_LIST

Be careful. I once had my IDE responsible for the blocked port and killed the port blocking app with this command, whilst not realizing that the IDE was responsible and it quit immediately without save.

Basically, the bind exception is saying, "Hey buddy, you've got another glassfish running around here somewhere or at the very list, somebody's stealing my port homie."

Check to make sure the other, earlier versions of glassfish that you tried are no longer in the way, in the classpath or somehow using ports. Or try changing default port numbers in the domain.xml.

Upvotes: 2

Related Questions