Closed glassfishrobot closed 13 years ago
@glassfishrobot Commented bbissett said: Starting the server with the --upgrade flag implies the --verbose flag, so that case is affected too.
@glassfishrobot Commented ss141213 said:
@glassfishrobot Commented scatari said: Please mark the "Fix in version" with appropriate build #, 3.1_b08 will be starting @7:00 PM PST 06/15/2011.
@glassfishrobot Commented ss141213 said: This bug is fixed as part of the following check in which addresses a few other similar bugs as well. See svn log for details. 3.1.1 checkin details: Sending core/bootstrap/osgi.bundle Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/ASMainHelper.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/AutoProcessor.java Sending core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/Constants.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/EmbeddedOSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishDecorator.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMainActivator.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishRuntimeDecorator.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiFrameworkLauncher.java Deleting core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/OSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/BundleProvisioner.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Constants.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntime.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/EmbeddedOSGiGlassFishRuntimeBuilder.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/GlassFishMainActivator.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/Jar.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiFrameworkLauncher.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishImpl.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntime.java Adding core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/osgi/OSGiGlassFishRuntimeBuilder.java Sending core/bootstrap/src/main/resources/META-INF/services/org.glassfish.embeddable.spi.RuntimeBuilder Sending core/kernel/osgi.bundle Sending core/kernel/pom.xml Deleting core/kernel/src/main/java/org/glassfish/kernel/GlassFishActivator.java Sending osgi-platforms/equinox/src/main/resources/glassfish/osgi/equinox/configuration/config.ini Sending osgi-platforms/felix/src/main/resources/glassfish/osgi/felix/conf/config.properties Sending packager/glassfish-nucleus/pom.xml Sending pom.xml Transmitting file data ...................... Committed revision 47494.
@glassfishrobot Commented ss141213 said: Forward ported to trunk in svn rev #47505.
@glassfishrobot Commented chaoslayer said: Hi,
I was just testing the 3.1.1-b09 for our application but still I get a lot of those exceptions during shutdown.
I think the reason is the felix fileinstall threads, as they hit the "start button" again during shutdown and those messages are, of course, correct in a technical sense.
To note: I have set up multiple instances of felix fileinstall using the config file:
**osgi/felix/conf/config.properties**# We have stopped using FileInstall to monitor autostart/. Because we can't change domain.xml
# in 3.1.1, we have to rely on configuring FileInstall using this file.
#felix.fileinstall.dir=${com.sun.aas.instanceRoot}/autodeploy/bundles/
felix.fileinstall.dir=${com.sun.aas.instanceRoot}/osgi-config/
felix.fileinstall.poll=5000
felix.fileinstall.filter=.*\\.cfg
felix.fileinstall.bundles.new.start=false
felix.fileinstall.noInitialDelay=true
felix.fileinstall.log.level=3
felix.fileinstall.bundles.startTransient=true
felix.fileinstall.disableConfigSave=false
In that directory I have two configuration files:
**ls -l domains/domain1/osgi-config/**org.apache.felix.fileinstall-autodeploy-bundles.cfg
org.apache.felix.fileinstall-vdc.cfg
Inside those files I configured the directories and their bundle start level appropriately and everything starts up nicely.
However, during shutdown I still get these:
[...]
Error while starting bundle: file:/srv/server/glassfish/3.1.1-b09/glassfish/domains/domain1/autodeploy/bundles/activiti-osgi-5.6.jar: org.osgi.framework.BundleException: Cannot start bundle org.activiti.osgi [280] because its start level is 3, which is greater than the framework's start level of 0.
org.osgi.framework.BundleException: Cannot start bundle org.activiti.osgi [280] because its start level is 3, which is greater than the framework's start level of 0.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1698)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Error while starting bundle: file:/srv/server/glassfish/3.1.1-b09/glassfish/domains/domain1/autodeploy/bundles/org.apache.aries.transaction.blueprint-0.3.jar: org.osgi.framework.BundleException: Cannot start bundle org.apache.aries.transaction.blueprint [281] because its start level is 3, which is greater than the framework's start level of 0.
org.osgi.framework.BundleException: Cannot start bundle org.apache.aries.transaction.blueprint [281] because its start level is 3, which is greater than the framework's start level of 0.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1698)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Error while starting bundle: file:/srv/server/glassfish/3.1.1-b09/glassfish/domains/domain1/autodeploy/bundles/stax-utils-20060502.jar: org.osgi.framework.BundleException: Cannot start bundle com.something.stax-utils [283] because its start level is 3, which is greater than the framework's start level of 0.
org.osgi.framework.BundleException: Cannot start bundle com.something.stax-utils [283] because its start level is 3, which is greater than the framework's start level of 0.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1698)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
[...]
I think the best way would be to shutdown all fileinstall instances before hitting the "stop button".
Does this sound mean?
@glassfishrobot Commented ss141213 said: Hi chaoslayer,
Nice to hear from you after a long time.
The problem is no longer with GlassFish. FileInstall is configured to start at start level 2. Since the log messages indicate that framework has reached start level 0, FileInstall bundle has been stopped. Looking at the code in FileInstall, I do see that FileInstall interrupts all the threads spawned by it and those threads return upon getting interrupted. So, it is likely that someone is eating an InterruptedException and clearing the interrupted status of the thread. I see following code in Felix.acquireBundleLock() :
try
{ m_bundleLock.wait(); }
catch (InterruptedException ex)
{ // Ignore and just keep waiting. }
I am not sure if this is the code that's swallowing the interruption, but it may be the one. I will let Richard tell us why we are ignoring the interruption.
Sahoo
@glassfishrobot Commented chaoslayer said: Thanx a lot.
@glassfishrobot Commented chaoslayer said: Hm, some clean startups later I don't get this issue anymore (could be that my system now handles the shutdown procedure fast enough before any fileinstall poll time has been reached).
However, for every new installation the problem persists.
@glassfishrobot Commented heavy said: For what it's worth, that code was changed in Felix framework 3.0.9 and now throws an IllegalStateException when the requesting thread is interrupted.
@glassfishrobot Commented ss141213 said: The new code in Felix clears the interrupt status of the thread. So any thread checking isInterrupted() will not notice the interruption. So, I think acquireBundleLock should throw IllegalStateException after calling Thread.interrupt().
@glassfishrobot Commented ancoron said: Hm, I just tested with Felix 3.0.9 and here I got the same result.
However, I notice that it seems that only one of the fileinstall threads is complaining, which is the lower one.
I have two different fileinstall directories configured:
...and only the thread for startlevel 3 is complaining, which is a bit strange.
The only other difference is that the first one is configured with "felix.fileinstall.disableConfigSave=false" whereas the other one isn't.
Does that help a bit?
@glassfishrobot Commented ss141213 said: As I said in my previous comment, I don't think Felix 3.0.9 has the right fix. Anyway, it is not a big issue as those warnings can be safely ignored.
@glassfishrobot Commented Issue-Links: is duplicated by GLASSFISH-16867
@glassfishrobot Commented Was assigned to ss141213
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-15519
@glassfishrobot Commented Reported by ss141213
@glassfishrobot Commented Marked as fixed on Wednesday, June 15th 2011, 7:56:28 pm
Sometimes shutting down a server started with "java -jar" a bunch of exceptions appear in console as shown below:
^CCompleted shutdown of Log manager service Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-cdi.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-cdi [242] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-cdi [242] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/org.apache.felix.eventadmin.jar: org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.eventadmin [243] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.eventadmin [243] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-jta.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jta [244] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jta [244] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-jdbc.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jdbc [245] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jdbc [245] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-ee-resources.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-ee-resources [246] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-ee-resources [246] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-ejb-container.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-ejb-container [247] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-ejb-container [247] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/org.apache.felix.bundlerepository.jar: org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.bundlerepository [248] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.bundlerepository [248] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-web-container.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-web-container [249] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-web-container [249] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-jpa.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jpa [250] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-jpa [250] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/org.apache.felix.scr.jar: org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.scr [251] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.apache.felix.scr [251] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241) Error while starting bundle: file:/Users/dochez/java/svn/v3/distributions/glassfish/glassfish3/glassfish/modules/autostart/osgi-javaee-base.jar: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-javaee-base [252] because its start level is 1, which is greater than the framework's start level of 0. org.osgi.framework.BundleException: Cannot start bundle org.glassfish.osgi-javaee-base [252] because its start level is 1, which is greater than the framework's start level of 0. at org.apache.felix.framework.Felix.startBundle(Felix.java:1690) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1136) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1122) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1115) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:433) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:241)
These are harmless exceptions. They only appear in console if server is started in -verbose mode or using "java -jar" mode.
Affected Versions
[3.1_dev]