Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 196603 - after GF update to 3.1, NB can't start server
after GF update to 3.1, NB can't start server
Product: serverplugins
Classification: Unclassified
Component: GlassFish
Other Linux
: P1 (vote)
: 7.0
Assigned To: Vince Kraemer
Depends on:
Blocks: 196733
  Show dependency treegraph
Reported: 2011-03-11 18:02 UTC by bbissett
Modified: 2011-06-13 17:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description bbissett 2011-03-11 18:02:13 UTC
Download and unzip 3.0.1 from here:

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||_ThreadID=11;_ThreadName=Thread-1;|Registered for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2011-03-11T12:49:43.453-0500|INFO|glassfish3.1||_ThreadID=22;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 127ms - bound to []|#]

[#|2011-03-11T12:49:43.481-0500|INFO|glassfish3.1||_ThreadID=26;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 9ms - bound to []|#]

[#|2011-03-11T12:49:43.495-0500|INFO|glassfish3.1||_ThreadID=30;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 2ms - bound to []|#]

[#|2011-03-11T12:49:43.528-0500|INFO|glassfish3.1||_ThreadID=33;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 18ms - bound to []|#]

[#|2011-03-11T12:49:43.545-0500|INFO|glassfish3.1||_ThreadID=36;_ThreadName=Thread-1;|Grizzly Framework 1.9.31 started in: 10ms - bound to []|#]

[#|2011-03-11T12:49:43.729-0500|INFO|glassfish3.1||_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||_ThreadID=1;_ThreadName=Thread-1;|Exception in thread "main" |#]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(
	at com.sun.enterprise.glassfish.bootstrap.ASMain.main(
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(
	at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(
	at com.sun.hk2.component.LazyInhabitant.loadClass(
	at com.sun.hk2.component.LazyInhabitant.fetch(
	at com.sun.hk2.component.EventPublishingInhabitant.get(
	at com.sun.hk2.component.AbstractInhabitantImpl.get(
	at org.jvnet.hk2.component.Habitat$5.get(
	at java.util.AbstractList$
	at java.util.AbstractCollection.toArray(
	at java.util.ArrayList.addAll(
	at com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(
	at com.sun.enterprise.v3.server.PostInitializer.postConstruct(
	at com.sun.hk2.component.AbstractCreatorImpl.inject(
	at com.sun.hk2.component.ConstructorCreator.initialize(
	at com.sun.hk2.component.AbstractCreatorImpl.get(
	at com.sun.hk2.component.SingletonInhabitant.get(
	at com.sun.hk2.component.EventPublishingInhabitant.get(
	at com.sun.hk2.component.AbstractInhabitantImpl.get(
	at com.sun.enterprise.v3.server.AppServerStartup.start(
	at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(
	at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(
	... 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; (&(>=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; (]]
	at org.apache.felix.framework.Felix.resolveBundle(
	at org.apache.felix.framework.Felix.startBundle(
	at org.apache.felix.framework.BundleImpl.start(
	at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(
	... 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 (upload may still be in progress)
User: Vince Kraemer <>
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.

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.

* 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
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?
> Install location of NB?
> What is the path to the domain?
> 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:
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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo