This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 196603

Summary: after GF update to 3.1, NB can't start server
Product: serverplugins Reporter: bbissett <bbissett>
Component: GlassFishAssignee: Vince Kraemer <vkraemer>
Status: VERIFIED FIXED    
Severity: normal CC: Alniks, jskrivanek, uniap
Priority: P1    
Version: 7.0   
Hardware: Other   
OS: Linux   
URL: http://java.net/projects/glassfish/lists/dev/archive/2011-03/message/85
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 196733    

Description bbissett 2011-03-11 18:02:13 UTC
Download and unzip 3.0.1 from here:
http://glassfish.java.net/downloads/3.0.1-final.html

Add the server to the Servers list in NB and start/stop the server once.

Head into glassfishv3/bin and run ./updatetool -- this will install the update tool. After installation, run the command again to start the tool.

Click "Available Updates" and wait while it loads the list.

Leave all the updates checked and click "Install marked components" button (the green arrow). Wait while it does the installation. Then quit the installer.

Normally the user is now supposed to run "asadmin start-domain --upgrade." If the user forgets/doesn't know, the server output:

hostname% ./asadmin start-domain
The configuration data for this domain must be upgraded to run with this
version of the software. To upgrade the data, run:
	asadmin start-domain --upgrade
Then start the domain normally.
Command start-domain failed.

Skip this and go back to NB. Try to start the server and it fails. Server log:

INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1 (build 43)
[#|2011-03-11T12:49:42.969-0500|WARNING|glassfish3.1|null|_ThreadID=1;_ThreadName=Thread-1;|Cannot read maxHistoryFiles property from logging config file. Using default.|#]

[#|2011-03-11T12:49:43.030-0500|INFO|glassfish3.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=11;_ThreadName=Thread-1;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2011-03-11T12:49:43.453-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=22;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 127ms - bound to [0.0.0.0:8080]|#]

[#|2011-03-11T12:49:43.481-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 9ms - bound to [0.0.0.0:8181]|#]

[#|2011-03-11T12:49:43.495-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=30;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 2ms - bound to [0.0.0.0:4848]|#]

[#|2011-03-11T12:49:43.528-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=33;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 18ms - bound to [0.0.0.0:3700]|#]

[#|2011-03-11T12:49:43.545-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=36;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 10ms - bound to [0.0.0.0:7676]|#]

[#|2011-03-11T12:49:43.729-0500|INFO|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-1;|GlassFish Server Open Source Edition 3.1 (43) startup time : Felix (10,924ms), startup services(1,722ms), total(12,646ms)|#]

[#|2011-03-11T12:49:44.114-0500|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1;_ThreadName=Thread-1;|Exception in thread "main" |#]

[#|2011-03-11T12:49:44.216-0500|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=1;_ThreadName=Thread-1;|java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)
Caused by: com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [6]	 State [INSTALLED]	 [org.glassfish.web.weld-integration(Weld integration for glassfish):3.1]
	at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177)
	at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344)
	at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124)
	at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111)
	at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135)
	at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
	at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:701)
	at java.util.AbstractList$Itr.next(AbstractList.java:345)
	at java.util.AbstractCollection.toArray(AbstractCollection.java:124)
	at java.util.ArrayList.addAll(ArrayList.java:472)
	at com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(SnifferManagerImpl.java:92)
	at com.sun.enterprise.v3.server.PostInitializer.postConstruct(PostInitializer.java:63)
	at com.sun.hk2.component.AbstractCreatorImpl.inject(AbstractCreatorImpl.java:131)
	at com.sun.hk2.component.ConstructorCreator.initialize(ConstructorCreator.java:91)
	at com.sun.hk2.component.AbstractCreatorImpl.get(AbstractCreatorImpl.java:82)
	at com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:67)
	at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:139)
	at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
	at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:326)
	at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:135)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
	... 6 more
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.glassfish.web.weld-integration [6]: Unable to resolve 6.1: missing requirement [6.1] package; (&(package=com.sun.enterprise.security)(version>=3.1.0)) [caused by: Unable to resolve 20.1: missing requirement [20.1] package; (&(package=com.sun.jaspic.config.factory)(version>=3.1.0)) [caused by: Unable to resolve 247.0: missing requirement [247.0] package; (package=com.sun.security.auth.login)]]
	at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
	at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
	... 27 more
|#]


This leaves a Java process running, but the server of course isn't working.
Comment 1 Vince Kraemer 2011-03-11 19:00:42 UTC
which build of NB are you using?
Comment 2 bbissett 2011-03-11 19:04:59 UTC
Here you go:
NetBeans IDE 6.9.1 (Build 201011082200)
Comment 3 Vince Kraemer 2011-03-11 23:11:08 UTC
I have been able to replicate this issue on Solaris.

Will attempt to find a way to determine that the failure is due to missing --upgrade and add something about that to the message.

I did notice something kind of strange though.  A second request to start the server from inside NB was 'successful'... (The server started completely and the admin console could be opened)

Is that 'safe' or are we in uncharted territory with that?
Comment 4 bbissett 2011-03-14 01:35:41 UTC
Unless you see the upgrade in the server log, I wouldn't trust that. A 3.0.1 domain is mostly compatible with a 3.1 server, so some things will work and some won't. I expect that such an installation won't support clustering, which is bad. If somehow a default-config showed up in domain.xml during this process, I'd be really surprised.
Comment 5 Vince Kraemer 2011-03-15 16:05:23 UTC
adding code to detect that a domain.xml does not match the install and trigger an update prior to the start.
Comment 6 Vince Kraemer 2011-03-15 16:18:07 UTC
the server is in a very inconsistent state and will start to act unpredictably in the web based admin console.  Users can open the admin console from inside the IDE, so we should try to resolve the inconsistencies... even if the IDE continues to treat the server as a 3.0 server after the upgrade (issue 196733)
Comment 7 uniap 2011-03-16 13:38:44 UTC
Same situation in linux, after glassfish server update and netbeans running in the same machine. But using another netbeans installation in a remote PC (Windows XP) it works fine. In this PC when I try to add the server, was necessary to install a local glassfish to register the remote server.
Comment 8 Quality Engineering 2011-03-17 09:53:07 UTC
Integrated into 'main-golden', will be available in build *201103170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fc2bd7839e54
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #196603 : domain fails to start after server bits are updated via the GF update center
Comment 9 Vince Kraemer 2011-03-17 17:13:41 UTC
BBISSETT and UNIAP: please download the nightly build and let me know whether the change addresses the issue.  Please be sure to post that feedback in this issue.  At this point in the 7.0 release cycle, all changes are getting vetted and must be verified BEFORE they will be integrated into the 7.0 release.
Comment 10 Vince Kraemer 2011-03-17 17:23:01 UTC
added keyword
Comment 11 bbissett 2011-03-17 20:00:12 UTC
Hi Vince,

I just verified that it worked for me with NetBeans IDE Dev (Build 201103170400). I updated my GF installation, started up NB, and ran my web project. I could see the upgrade happening and the normal startup, and then the web app ran just fine.

Thanks,
Bobby
Comment 12 Vince Kraemer 2011-03-17 22:52:04 UTC
verified by filer.

tested on solaris, mac and windows 7
Comment 13 David Konecny 2011-03-18 00:06:04 UTC
I tested it on Ubuntu and it works fine now. I did also code review and it is OK as well. Two minor comments:

* when moving files use NetBeans or hg move command otherwise file history is lost (ie. ServerDetails.java)

* when doing changes for code review try to avoid unnecessary code changes like indentation or whitespaces
Comment 14 Vince Kraemer 2011-03-19 00:08:13 UTC
http://hg.netbeans.org/releases/rev/df97200ffacb
Comment 15 Jiri Skrivanek 2011-03-25 14:38:35 UTC
I tried it in NetBeans 7.0 RC1 201103250000 (WindowsXP, JDK6.0u24). After GlassFish update I went back to IDE and tried to start server but nothing is printed to server log console. Just progress bar is running and java.exe proccess is running. If I shutdown IDE, the second java.exe process appears and after while both java processes are gone. When I start IDE again, I can start GlassFish server normally. Any explanation?
Comment 16 Vince Kraemer 2011-03-25 18:33:51 UTC
Explanation? not without more info from you.

Install location of glassfish?
Install location of NB?
What is the path to the domain?

The update does take time.
Comment 17 Jiri Skrivanek 2011-03-25 21:10:03 UTC
(In reply to comment #16)
> Install location of glassfish?
C:\appServers\aa\glassfishv3
> Install location of NB?
D:\Development\builds\NB70\netbeans
> What is the path to the domain?
C:\appServers\aa\glassfishv3\glassfish\domains\domain1
> The update does take time.
I waited couple minutes but there was no processor load and I even was not able to make thread dump with VisualVM.
Comment 18 Jiri Skrivanek 2011-03-30 08:11:23 UTC
Verified by filer and works for me on windows after restart. If someone reports some issue with update, we will track it in separate issue with lower priority.
Comment 19 rweaver 2011-04-25 16:16:03 UTC
I'm having a similar problem. Downloaded 7.0 (fresh install), ran update tool, GF 3.1 was starting OK.

Ran update to add GF verifier and a couple of other plugins, now GF won't start (from command line get the "waiting for domain1 to start" followed by dots (let it run for several minutes with no startup).

Apr 25, 2011 9:06:33 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: JVM invocation command line:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
-cp
/Applications/NetBeans/glassfish-3.1/glassfish/modules/glassfish.jar
-XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m
-XX:NewRatio=2
-Xmx512m
-d32
-client
-javaagent:/Applications/NetBeans/glassfish-3.1/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Dfelix.fileinstall.disableConfigSave=false
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=/Applications/NetBeans/glassfish-3.1/glassfish/modules/autostart/
-Djavax.net.ssl.keyStore=/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666
-Djava.security.policy=/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1/config/server.policy
-Dfelix.fileinstall.log.level=2
-Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1
-Dosgi.shell.telnet.ip=127.0.0.1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Djava.endorsed.dirs=/Applications/NetBeans/glassfish-3.1/glassfish/modules/endorsed:/Applications/NetBeans/glassfish-3.1/glassfish/lib/endorsed
-Dcom.sun.aas.installRoot=/Applications/NetBeans/glassfish-3.1/glassfish
-Dfelix.fileinstall.bundles.startTransient=true
-Djava.ext.dirs=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jre/lib/ext:/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1/lib/ext
-Dfelix.fileinstall.bundles.new.start=true
-Djavax.net.ssl.trustStore=/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1/config/cacerts.jks
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell,org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell,org.apache.felix.gogo.command
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as
-Djava.security.auth.login.config=/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1/config/login.conf
-DANTLR_USE_DIRECT_CLASS_LOADING=true
-Dgosh.args=--nointeractive
-Djava.library.path=/Applications/NetBeans/glassfish-3.1/glassfish/lib:/Applications/NetBeans/glassfish-3.1/glassfish/bin:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
com.sun.enterprise.glassfish.bootstrap.ASMain
-domainname
domain1
-asadmin-args
--host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,/Applications/NetBeans/glassfish-3.1/glassfish/domains,,,domain1
-instancename
server
-verbose
false
-debug
false
-asadmin-classpath
/Applications/NetBeans/glassfish-3.1/glassfish/modules/admin-cli.jar
-asadmin-classname
com.sun.enterprise.admin.cli.AsadminMain
-upgrade
false
-type
DAS
-domaindir
/Applications/NetBeans/glassfish-3.1/glassfish/domains/domain1
-read-stdin
true
Apr 25, 2011 9:06:33 AM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 78 msec.

RobLeopard:bin newadminaccount$ ./asadmin start-domain
Waiting for domain1 to start ..........................................................................................................................................................................................................................................................................................................................................................................^CRobLeopard:bin newadminaccount$
Comment 20 Alniks 2011-06-13 17:08:02 UTC
I am having problems with GF 3.1 and maven EAR project. After couple of redeployments GF refuses to start either from NB 7.0 or from console. I have to delete and create the default domain to make the GF start.
Comment 21 Vince Kraemer 2011-06-13 17:24:26 UTC
(In reply to comment #20)
> I am having problems with GF 3.1 and maven EAR project. After couple of
> redeployments GF refuses to start either from NB 7.0 or from console. I have to
> delete and create the default domain to make the GF start.

the issue that you are describing sounds very different from the issue that is described here.  Please open a new issue and provide data about your specific circumstances, like the IDE log and server log (the actual file... not the content of the Log view window in NB)
Comment 22 Vince Kraemer 2011-06-13 17:25:35 UTC
resetting status to Verified/Fixed