Issue Details (XML | Word | Printable)

Key: GLASSFISH-18880
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Sanjeeb Sahoo
Reporter: LeoInside
Votes: 4
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
glassfish

Fail to open OSGi console from GF admin console or URL

Created: 10/Jul/12 02:54 PM   Updated: 11/Feb/13 05:33 AM   Resolved: 07/Nov/12 02:39 AM
Component/s: OSGi, packaging, web_container
Affects Version/s: 3.1.2, 4.0
Fix Version/s: 4.0_b62_ms6

Time Tracking:
Not Specified

File Attachments: 1. Text File DirContextURLStreamHandlerService.java.patch (1 kB) 16/Oct/12 05:07 AM - Sanjeeb Sahoo
2. XML File domain_t.xml (37 kB) 10/Jul/12 02:54 PM - LeoInside
3. Text File GLASSFISH-18880.patch (17 kB) 16/Oct/12 05:53 PM - Sanjeeb Sahoo
4. Text File server_t.log (837 kB) 10/Jul/12 02:54 PM - LeoInside

Environment:

Solaris 10

Issue Links:
Duplicate
 

Status Whiteboard:

Workaround:
----------
Run the following command so that the admin console does not start as part of server start up. Let it start when user explicitly accesses it:

asadmin set configs.config.server-config.admin-service.property.adminConsoleStartup=NEVER

Tags:
Participants: cleciovarjao, LeoInside, marcond, rcbandit, Sanjeeb Sahoo and TangYong


 Description  « Hide

Can not open OSGi console (i.e. HTTP 404) from GlassFish admin console or through http://masterservice:50500/osgi/system/console/bundles

Exceptions are found in server.log when trying to open the OSGi console:

[#|2012-07-03T11:05:16.195-0400|SEVERE|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Failed to start Bundle Id [329] State [RESOLVED] [org.glassfish.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin):3.1.1]
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [329] State [RESOLVED] [org.glassfish.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin):3.1.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 com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:200)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:213)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:198)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:346)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

Caused by: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.admingui.glassfish-osgi-console-plugin [329] because its start level is 2, which is greater than the framework's start level of 1.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1698)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
... 12 more
---------------------------------------------------------------------------------------------------------------------------------

Please find JVM options below:
--------------------------------------------------------------------------------------------------------------------------------------------
<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50501" system-classpath="" classpath-suffix="">
<jvm-options>-Djava.awt.headless=true</jvm-options>
<jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
<jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options>
<jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options>
<jvm-options>-XX:NewRatio=2</jvm-options>
<jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options>
<jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options>
<jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options>
<jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
<jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
<jvm-options>Dgosh.args=-nointeractive</jvm-options>
<jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options>
<jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options>
<jvm-options>-XX:MaxPermSize=192m</jvm-options>
<jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options>
<jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options>
<jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options>
<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
<jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options>
<jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options>
<jvm-options>-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.fileinstall,org.apache.felix.shell.remote</jvm-options>
<jvm-options>-client</jvm-options>
<jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options>
<jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
<jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options>
</java-config>
---------------------------------------------------------------------------------------------------------------------------------



Sanjeeb Sahoo added a comment - 10/Jul/12 03:16 PM

Have you modified the property called glassfish.osgi.start.level.final in glassfish/config/osgi.properties file? Could you check what's the value there?

Where is glassfish-osgi-console-plugin.jar installed? modules/autostart/ or autodeploy/bundles/? Can you try moving that glassfish-osgi-console-plugin.jar to modules/ dir and let me know whether it works? What might be happening is that adminconsole is coming up before the startlevel is reached to 2.


LeoInside added a comment - 11/Jul/12 12:05 PM

Hi Sanjeeb,

Thank you very much for your quick reply..

I checked the property: glassfish.osgi.start.level.final=2..

and the jar file is under ./glassfish/modules/autostart/glassfish-osgi-console-plugin.jar

should I change the glassfish.osgi.start.level.final to "1" and move the jar file to ./glassfish/modules ?..

Best Regards.


Sanjeeb Sahoo added a comment - 11/Jul/12 02:30 PM

Copy the jar to modules/ and leave everything else unchanged. Restart server. It should work.

Could you also describe the exact steps to reproduce your original problem? That will help us analysing the issue as well as fixing the document if need be.

Thanks much,
Sahoo


rcbandit added a comment - 19/Jul/12 11:22 AM

Yes, moving the jar to /modules directory solves the problem.


Sanjeeb Sahoo added a comment - 19/Jul/12 02:07 PM

rcbadit:

Thanks for confirming the workaround.

LeoInside:

Could reply to the questions I had asked earlier?

Sahoo


cleciovarjao added a comment - 26/Jul/12 09:51 PM - edited

I am also having problems starting the webconsole. I was wondering if there have been any progress?
I just download glassfish-3.1.2.2.zip, start domain, and then install glassfish-osgi-gui component.


Sanjeeb Sahoo added a comment - 27/Jul/12 01:32 AM

Pl. see the workaround mentioned in "Status Whiteboard."


cleciovarjao added a comment - 27/Jul/12 04:57 AM

I did try the workaround, the Felix Web Console works, but the GlassFish Server Administration Console (http://localhost:4848) doesn't.

---------

[#|2012-07-26T21:53:33.173-0700|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0172: Virtual server [server] loaded default web module []|#]

[#|2012-07-26T21:53:33.201-0700|SEVERE|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=21;_ThreadName=Thread-2;|WEB0161: Error loading web module [__default-web-module]
java.lang.IllegalArgumentException: addChild: Child name '' is not unique
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:911)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadStandaloneWebModule(WebContainer.java:1573)
at com.sun.enterprise.web.WebContainer.updateDocroot(WebContainer.java:3334)
at com.sun.enterprise.web.WebContainer.updateHost(WebContainer.java:2828)
at com.sun.enterprise.web.reconfig.WebConfigListener$1.changed(WebConfigListener.java:138)
at org.jvnet.hk2.config.ConfigSupport.sortAndDispatch(ConfigSupport.java:332)
at com.sun.enterprise.web.reconfig.WebConfigListener.changed(WebConfigListener.java:114)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:401)
at org.jvnet.hk2.config.Transactions$ConfigListenerJob.process(Transactions.java:391)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:281)
at org.jvnet.hk2.config.Transactions$ConfigListenerNotifier$1$1.call(Transactions.java:279)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

#]

[#|2012-07-26T21:53:36.221-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1002: Security Manager is OFF.|#]

[#|2012-07-26T21:53:36.233-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1010: Entering Security Startup Service|#]

[#|2012-07-26T21:53:36.242-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2012-07-26T21:53:36.485-0700|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=20;_ThreadName=Thread-2;|defaultVirtualServer = server|#]

[#|2012-07-26T21:53:36.824-0700|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=20;_ThreadName=Thread-2;|No default web.xml|#]

[#|2012-07-26T21:53:36.863-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2012-07-26T21:53:36.876-0700|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=20;_ThreadName=Thread-2;|standardContext = StandardEngine[glassfish-web].StandardHost[server].StandardContext[/osgi]|#]

[#|2012-07-26T21:53:36.885-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2012-07-26T21:53:36.913-0700|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=20;_ThreadName=Thread-2;|No default web.xml|#]

[#|2012-07-26T21:53:36.963-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]

[#|2012-07-26T21:53:37.127-0700|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1011: Security Service(s) Started Successfully|#]

[#|2012-07-26T21:53:37.216-0700|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=20;_ThreadName=Thread-2;|standardContext = StandardEngine[glassfish-web].StandardHost[__asadmin].StandardContext[/osgi]|#]

[#|2012-07-26T21:53:45.928-0700|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=17;_ThreadName=Thread-2;|Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''|#]

[#|2012-07-26T21:53:47.615-0700|SEVERE|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=17;_ThreadName=Thread-2;|Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)
... 19 more
Caused by: java.net.MalformedURLException: Unknown protocol: jndi
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1081)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)
... 19 more

#]

[#|2012-07-26T21:53:47.641-0700|SEVERE|glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1306: Startup of context failed due to previous errors|#]

[#|2012-07-26T21:53:47.646-0700|SEVERE|glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1305: Exception during cleanup after start failed
org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:873)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

[#|2012-07-26T21:53:47.647-0700|SEVERE|glassfish3.1.2|org.apache.catalina.core.ContainerBase|_ThreadID=17;_ThreadName=Thread-2;|ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
... 14 more
Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
... 17 more
Caused by: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)
... 19 more
Caused by: java.net.MalformedURLException: Unknown protocol: jndi
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1081)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)
... 19 more

#]

[#|2012-07-26T21:53:47.650-0700|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

[#|2012-07-26T21:53:47.651-0700|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

Sanjeeb Sahoo added a comment - 27/Jul/12 05:22 AM

Can you do an "rm -rf glassfish/domains/domain1/osgi-cache" and restart the server before opening admin console?


cleciovarjao added a comment - 27/Jul/12 05:27 AM

I did that, and got exactly the same exceptions. (I am running on windows 7, jdk1.6.0_25)


Sanjeeb Sahoo added a comment - 27/Jul/12 05:37 AM

Enough. I want to get to the bottom of this problem for good. Could you please document clearly the steps to reproduce both the problems? I will give it a try next week and am sure can find out what's going on. Thanks much. Pl. include all the URLs you used to download the stuff and how you installed any extra stuff, etc.


cleciovarjao added a comment - 27/Jul/12 05:43 AM

I simply downloaded the zip file from http://download.java.net/glassfish/3.1.2.2/release/glassfish-3.1.2.2.zip, unzip it (with winrar), start domain, and then install glassfish-osgi-gui component, and restart.
Didn't actually do any modification, or extra stuff, in any file.


cleciovarjao added a comment - 27/Jul/12 05:44 AM

install the component through http://localhost:4848, and I try this from my workstation, and now from my laptop, with same problems.


marcond added a comment - 03/Aug/12 09:39 PM

This issue is confirmed on GF 3.1.2.2 running on Ubuntu 12.04 64 bits, install done with glassfish-3.1.2.2-web-unix.sh.

Steps: Plain vanilla install (next-next-finish); update tool enabled; install glassfish-osgi-gui. Restart server. Bang!

The workaround solves the problem, though I had to wipe osgi-cache. I also had an Unknown protocol error in one point, but I wasn't able to track how to reproduce it.

You can count on me to apply any other tests. Thanks.


marcond added a comment - 03/Aug/12 09:42 PM

Sorry, forgot to mention the jdk:

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)

There are no other jdks on the system. I use only the JAVA_HOME/PATH to set-up java.


marcond added a comment - 04/Aug/12 12:49 AM - edited

I've managed to spot the spurious java.net.MalformedURLException: Unknown protocol: jndi.

Even after applying the workaround, it happens on about 30% of the start-domain sequences, breaking the Glassfish admin console. It appears to be some race condition between the bundles. It occurs on a clean Glassfish install, after the glassfish-osgi-gui install. Aside from the glassfish-osgi-gui install, the GF server is absolutely untouched, without any changes. The hardware I used for these tests is a Core2 Duo, 2.6GHz (Ubuntu 12.04, described earlier).

To reproduce the problem:

1) Make a standard install of Glassfish 3.1.2.2;
2) Start domain1
3) Install glassfish-osgi-gui using the GF gui (http://localhost:4848/);
4) ./asadmin stop-domain domain1
5) ./asadmin start-domain domain1 => Error
6) ./asadmin stop-domain domain1
7) Apply workaround: mv ./glassfish/modules/autostart/glassfish-osgi-console-plugin.jar to ./glassfish/modules/)
8) ./asadmin start-domain domain1 => Everything looks fine...
9) ./asadmin stop-domain domain1
10) ./adasmin start-domain domain1 => Now we get the exception 30% of the times we do this start-domain, just repeat steps 9 and 10.

The exception:

[#|2012-08-03T21:26:45.244-0300|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=43;_ThreadName=Thread-2;|Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context ''|#]

[#|2012-08-03T21:26:46.286-0300|SEVERE|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=43;_ThreadName=Thread-2;|Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)
... 19 more
Caused by: java.net.MalformedURLException: Unknown protocol: jndi
at java.net.URL.<init>(URL.java:617)
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:429)
at java.net.URI.toURL(URI.java:1096)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)
... 19 more
Caused by: java.lang.IllegalStateException: Unknown protocol: jndi
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:372)
at java.net.URL.<init>(URL.java:612)
... 27 more

#]

[#|2012-08-03T21:26:46.306-0300|SEVERE|glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=43;_ThreadName=Thread-2;|PWC1306: Startup of context failed due to previous errors|#]


TangYong added a comment - 15/Oct/12 03:09 AM

Thanks marcond's steps and I have reproduced the problem ("Unknown protocol: jndi") on marcond's steps 9 and what LeoInside said on description also happened on marcond's steps 5(" ./asadmin start-domain domain1 => Error") , and using workaround can make effect.

In addition, my env is windows xp, jdk 1.6, and gf 3.1.2.2.

So, we will confirm it on current gf trunk.

sahoo, once I confirmed that the problem still happened on current gf trunk, then, I suggest that:

1) close the issue because titile is not related to the problem
2) I will re-create the problem ("Unknown protocol: jndi")

Agree with me?


TangYong added a comment - 15/Oct/12 03:59 AM

The result of confirmation on current gf trunk is the problem ("Unknown protocol: jndi") can not be reproduced, in addition, on current gf trunk, under inner proxy, "Install glassfish-osgi-gui using the GF gui (http://localhost:4848/);" can not be installed successfully, so I manually copied glassfish-osgi-gui related bundles (as the same steps as possible) into autostart.

However, going back 3.1.2.2, the problem must be reproduced rather than 30%.

So, I want to ask sahoo whether needing to investigate the problem or not?


marcond added a comment - 15/Oct/12 04:38 AM

So, this problem is solved on current GF trunk. This is good news.

However, it would be very good to document how this bug was solved, or what was its nature.

While this "Unknown protocol: jndi" was reported regarding the OSGi Console, I added my feedback because this was the most reproducible case. Actually we had lots of this error on our OSGi application, enough to drop GF 3.1.2.x and go back to GF 3.1.1. However, it was not practical to open bug reports for these cases since the application is very complex and it would be really hard to describe how to reproduce the error.

Anyway, after two months I must say that GF 3.1.1 is rock-solid for all OSGi tasks we demanded until now, and was a safe fallback for GF 3.1.2.2 with OSGi problems.

Thanks
Marcond


TangYong added a comment - 15/Oct/12 05:24 AM

Although this problem did not happen on current GF trunk, I have been not still investigated the reason that this problem happened on 3.1.2.2 and now did not know its nature. There is a problem that must be confirmed :

On 3.1.2.2, whether because of glassfish-osgi-console-plugin.jar, the problem happened.

I will continue to keep trace the problem and also wait for sahoo's comments.

Thanks.

BTW:
> Actually we had lots of this error on our OSGi application, enough to drop GF 3.1.2.x and go back to GF 3.1.1.
I wish you can summary these problems if possible one by one and we need such use cases to improve quality.


TangYong added a comment - 15/Oct/12 06:26 AM

Sahoo,

We firstly look at the exception of "Failed to start Bundle Id [329]State [RESOLVED][org.glassfish.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin)".

A new finding and confirmation about the issue("Failed to start Bundle Id [329]State [RESOLVED][org.glassfish.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin)"):

I have made a compare on 3.1.2.2:

1) First executing http://localhost:4848/, then put "glassfish-osgi-console-plugin.jar","org.apache.felix.webconsole.jar" and "felix-webconsole-extension.jar" into autostart directory directly rather than using updatecenter using, the result of start-domain is exception still happen.

com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [256] State [INSTALLED] [org.glassfish.main.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin):3.1.2.1-SNAPSHOT]
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:78)
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:200)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:216)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:199)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:346)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.main.admingui.glassfish-osgi-console-plugin [256] because its start level is 2, which is greater than the framework's start level of 1.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1807)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)

2) Not executing http://localhost:4848/, then put "glassfish-osgi-console-plugin.jar","org.apache.felix.webconsole.jar" and "felix-webconsole-extension.jar" into autostart directory, the result of start-domain is that the above exception did not happen.

In addition, about the problem ("Unknown protocol: jndi"), based the above compare, if after 2), I moved "glassfish-osgi-console-plugin.jar" into module/ and start-domain, the problem ("Unknown protocol: jndi") did not happen.

So, I have confirmed that on 3.1.2.2, once executing http://localhost:4848/ (loading admingui) and putting gf-osgi-gui related bundles regardless of using updatecenter of copying directly, the issue and problem will happen.

I also want to know the reason executing 2) successfully not using Workaround .


TangYong added a comment - 15/Oct/12 12:42 PM

sahoo, marcond

About reason of the issue("Failed to start Bundle Id [329]State [RESOLVED][org.glassfish.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin)"), I have done a investigation on 3.1.2.2, combined with sahoo's workaround, I explained in detailed.

(1) Firstly, why the issue related to gf admin gui loading?
Simply saying(because code structure is very complex), gf admin gui offered a @contract called org.glassfish.api.admingui.ConsoleProvider, and glassfish-osgi-console-plugin implemented a hk2 service of the ConsoleProvider called org.glassfish.osgi.admingui.OSGIConsoleProvider, then after loading admin gui,and while re-start domain, gf will load admin gui app, and also load glassfish-osgi-console-plugin because of @contract ConsoleProvider.

Needing to note a fact, while gf is loading admin gui app using a thread, gf self has a thread(kernel thread) to set glassfish.osgi.start.level.final(defaultly, is "2") in order to start ${osgi-ee.bundles}, and autostart directory into which glassfish-osgi-console-plugin will be downloaded by using updatecenter is listed in ${osgi-ee.bundles}. That is to say, loading admin gui app and setting glassfish.osgi.start.level.final are seperately done in two threads.

So, because of multi-thread's nature, as to my machine or marcond's machine, starting glassfish-osgi-console-plugin is done before setting glassfish.osgi.start.level.final, and because autostart directory's start level is 2, so at that time, glassfish-osgi-console-plugin can not be started. This also explained what sahoo said: "What might be happening is that adminconsole is coming up before the startlevel is reached to 2."

(2) Secondly, why using workaround can resolve the problem?
Moving glassfish-osgi-console-plugin into module/ can resolve the problem because on osgi.properties, you will find on glassfish.osgi.auto.start.level.n(1,2,3), glassfish-osgi-console-plugin is not related to these start level definition, because on felix, if you do not define start level explicitly, the bundle's start level is the value("1") of felix.startlevel.bundle. And it is also equal to the value of org.osgi.framework.startlevel.beginning. So, regardless of whether setting glassfish.osgi.start.level.final=2 or not, glassfish-osgi-console-plugin can be started.

There is an interesting thing to say: while I am debugging start-domain(asadmin start-domain --debug, and make debugging pending), if you do not add breakpoint on "sl.setStartLevel(finalStartLevel);" of OSGiGlassFishImpl.start() and only add breakpoint on line of the issue's stacktrace, you can find that the issue does not happen. This is because of multi-thread's nature.

Finally, there is still a question: why the issue does not happen on current gf trunk?


TangYong added a comment - 15/Oct/12 01:48 PM

>Finally, there is still a question: why the issue does not happen on current gf trunk?

After investigating the change between 3.1.2.2 souce and current gf trunk, I have found that on starting domain, current gf will not start a thread to execute "com.sun.enterprise.v3.admin.adapter.InstallerThread.run" , that is to say, gf will not
load admin gui app while starting domain and only while user truely accessed http://localhost:4848/, gf executes "com.sun.enterprise.v3.admin.adapter.InstallerThread.run". This is a ondemand loading!

Backing to the problem, since when starting domain, gf will not load admin gui, setting glassfish.osgi.start.level.final=2 will be executed before starting glassfish-osgi-console-plugin( in reality, at that time, gf will not start glassfish-osgi-console-plugin bundle at all).

So, the issue can not happen on current gf trunk.

BTW: the problem ("Unknown protocol: jndi") maybe happen because when glassfish-osgi-console-plugin resolved failed, gf system is a part-started state. However, about the concreate reason, I think that we need not investigate it because of the change from 3.1.2.2 mode to current trunk mode.


marcond added a comment - 15/Oct/12 02:41 PM

TangYong,

Thanks for your interest on solving this problem.

I looked back for the artifacts about this error and they were discarded shortly after the migration to GF 3.1.1. As far I can remember, we had logs and some environment setups. About the errors, what we found at the time was that we had boot order problems, conflicting with OSGi HTTP Services (we use some of them). The errors were random and ocurred during GF startup time.

After stripping out module after module, we ended up with only OSGi Admin and GF, and the same random erros. It was when we filled the bug report.

I'll try to recover some files from the backups, which can be helpful.

Thanks
Marcond


Sanjeeb Sahoo added a comment - 15/Oct/12 04:24 PM - edited

First, we have started seeing this issue beginning with GF 3.1.2 because starting with this version, admin console can be configured to start as part of server startup process. See [1] for more details. Earlier, it used to load on demand only. Starting with 3.1.2, if you access the console a couple of times, then it marks it as a frequently used application and loads it next time the server starts. This will explain why we didn't see this issue < 3.1.2.

As Tang said, when the app gets loaded as part of server startup, it happens in a separate thread. There are two competing threads in the system:
one that's setting the start level to 2 or whatever we decide the final startlevel be, the second one is loading the console app. If the 2nd thread runs ahead of 1st thread, then we will get "Can't start bundle because start level of bundle is 2 where as framework start level is 1" kind of error. This error will definitely go away when we move every console related bundles to modules dir.

I have confirmed with adminconsole team that they are yet to port the feature from 3.1.2 branch to trunk, so that explains admin console loading behavior change in trunk. That explains why we are not seeing the issue in trunk as of now. Once they port the fix, we will see the issue, so we need to find a proper solution.

I still can't explain the "Unknown protocol: jndi" issue. I will see if I can find some more about it.

[1] https://blogs.oracle.com/anilam/entry/glassfish_3_1_2_admin


TangYong added a comment - 15/Oct/12 11:01 PM

Sahoo,

>I still can't explain the "Unknown protocol: jndi" issue. I will see if I can find some more about it.
then, continue to make the issue open, and I will also try to look up the reason.

thanks.


TangYong added a comment - 16/Oct/12 02:24 AM

Hi sahoo,

>I still can't explain the "Unknown protocol: jndi" issue. I will see if I can find some more about it.
I made a confirmation:

After happening "Unknown protocol: jndi" issue, I cleared osgi-cache and re-start domain, result is that "Unknown protocol: jndi" issue still existed. So, I will continue to investigate the reason.


Sanjeeb Sahoo added a comment - 16/Oct/12 05:07 AM

Since I don't have a reproducible env for "Unknown protocol:" issue, I need someone's help here. I suspect "jndi" url handler is not getting registered properly and that's causing this error. Please find attached a patched DirContextURLStreamHandlerService.java that prints a message after registering the protocol handler.


TangYong added a comment - 16/Oct/12 05:34 AM

Hi sahoo,

I have applied your patch and the result of executing start-domain is as following:

[#|2012-10-16T14:19:41.828+0900|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=Thread-2;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)|#]

[#|2012-10-16T14:19:41.906+0900|INFO|glassfish3.1.2|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=Thread-2;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2012-10-16T14:19:42.140+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=11;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 31ms - bound to [0.0.0.0:3700]|#]

[#|2012-10-16T14:19:42.140+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=12;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 78ms - bound to [0.0.0.0:8080]|#]

[#|2012-10-16T14:19:42.140+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 47ms - bound to [0.0.0.0:8181]|#]

[#|2012-10-16T14:19:42.140+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=14;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 31ms - bound to [0.0.0.0:4848]|#]

[#|2012-10-16T14:19:42.156+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=15;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 16ms - bound to [0.0.0.0:7676]|#]

[#|2012-10-16T14:19:42.265+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=10;_ThreadName=Thread-2;|The Admin Console is already installed, but not yet loaded.|#]

[#|2012-10-16T14:19:42.312+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=Thread-2;|GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (1,250ms), startup services(687ms), total(1,937ms)|#]

[#|2012-10-16T14:19:43.265+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=16;_ThreadName=Thread-2;|Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false |#]

[#|2012-10-16T14:19:44.203+0900|INFO|glassfish3.1.2|com.sun.jersey.server.impl.application.WebApplicationImpl|_ThreadID=16;_ThreadName=Thread-2;|Initiating Jersey application, version 'Jersey: 1.11.1 03/31/2012 06:49 PM'|#]

[#|2012-10-16T14:19:44.859+0900|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.admin.rest.adapter|_ThreadID=16;_ThreadName=Thread-2;|REST00001: Listening to REST requests at context: /management/domain|#]

[#|2012-10-16T14:19:44.937+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=17;_ThreadName=Thread-2;|The Admin Console is already installed, but not yet loaded.|#]

[#|2012-10-16T14:19:44.937+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=17;_ThreadName=Thread-2;|The Admin Console is starting. Please wait.|#]

[#|2012-10-16T14:19:45.296+0900|INFO|glassfish3.1.2|org.glassfish.osgi.felixwebconsoleextension|_ThreadID=18;_ThreadName=Thread-2;|Registered org.glassfish.osgi.felixwebconsoleextension.GlassFishBrandingPlugin@eae9cc|#]

[#|2012-10-16T14:19:45.437+0900|INFO|glassfish3.1.2|javax.enterprise.system.jmx.org.glassfish.admin.mbeanserver|_ThreadID=19;_ThreadName=Thread-2;|JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://10.167.157.133:8686/jndi/rmi://10.167.157.133:8686/jmxrmi|#]

[#|2012-10-16T14:19:45.546+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]|#]

[#|2012-10-16T14:19:45.562+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]|#]

[#|2012-10-16T14:19:45.562+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]|#]

[#|2012-10-16T14:19:45.593+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0171: Created virtual server [server]|#]

[#|2012-10-16T14:19:45.593+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0171: Created virtual server [__asadmin]|#]

[#|2012-10-16T14:19:45.906+0900|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|WEB0172: Virtual server [server] loaded default web module []|#]

[#|2012-10-16T14:19:46.296+0900|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=18;_ThreadName=Thread-2;|defaultVirtualServer = server|#]

[#|2012-10-16T14:19:46.296+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1002: Security Manager is OFF.|#]

[#|2012-10-16T14:19:46.296+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1010: Entering Security Startup Service|#]

[#|2012-10-16T14:19:46.296+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.|#]

[#|2012-10-16T14:19:46.328+0900|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=18;_ThreadName=Thread-2;|No default web.xml|#]

[#|2012-10-16T14:19:46.343+0900|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=18;_ThreadName=Thread-2;|standardContext = StandardEngine[glassfish-web].StandardHost[server].StandardContext[/osgi]|#]

[#|2012-10-16T14:19:46.359+0900|INFO|glassfish3.1.2|org.apache.catalina.startup.ContextConfig|_ThreadID=18;_ThreadName=Thread-2;|No default web.xml|#]

[#|2012-10-16T14:19:46.359+0900|INFO|glassfish3.1.2|org.glassfish.osgihttp|_ThreadID=18;_ThreadName=Thread-2;|standardContext = StandardEngine[glassfish-web].StandardHost[__asadmin].StandardContext[/osgi]|#]

[#|2012-10-16T14:19:46.406+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2012-10-16T14:19:46.406+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.|#]

[#|2012-10-16T14:19:46.437+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security.auth.realm|_ThreadID=17;_ThreadName=Thread-2;|SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.|#]

[#|2012-10-16T14:19:46.453+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.security.com.sun.enterprise.security|_ThreadID=17;_ThreadName=Thread-2;|SEC1011: Security Service(s) Started Successfully|#]

[#|2012-10-16T14:19:47.640+0900|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=17;_ThreadName=Thread-2;|コンテキスト '' の Mojarra 2.1.6 (SNAPSHOT 20111206) を初期化します|#]

[#|2012-10-16T14:19:48.062+0900|SEVERE|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=17;_ThreadName=Thread-2;|Critical error during deployment:
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)
... 19 more
Caused by: java.net.MalformedURLException: Unknown protocol: jndi
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1080)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)
... 19 more

#]

[#|2012-10-16T14:19:48.078+0900|SEVERE|glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1306: Startup of context failed due to previous errors|#]

[#|2012-10-16T14:19:48.078+0900|SEVERE|glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=17;_ThreadName=Thread-2;|PWC1305: Exception during cleanup after start failed
org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:873)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

[#|2012-10-16T14:19:48.078+0900|SEVERE|glassfish3.1.2|org.apache.catalina.core.ContainerBase|_ThreadID=17;_ThreadName=Thread-2;|ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
... 14 more
Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
... 17 more
Caused by: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:670)
... 19 more
Caused by: java.net.MalformedURLException: Unknown protocol: jndi
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at java.net.URI.toURL(URI.java:1080)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:920)
at com.sun.faces.config.ConfigManager$ParseTask.call(ConfigManager.java:865)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:656)
... 19 more

#]

[#|2012-10-16T14:19:48.078+0900|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-2;|java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

[#|2012-10-16T14:19:48.078+0900|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.net.MalformedURLException: Unknown protocol: jndi
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)

#]

[#|2012-10-16T14:19:48.078+0900|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app|#]

[#|2012-10-16T14:19:48.140+0900|SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app|#]

[#|2012-10-16T14:19:48.140+0900|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.admin.adapter|_ThreadID=17;_ThreadName=Thread-2;|The Admin Console application is loaded.|#]

On the above contents, I have not found "Registered URL handler for jndi", and if starting domain normally, we should find "Registered URL handler for jndi".


Sanjeeb Sahoo added a comment - 16/Oct/12 04:37 PM

With the reproducible environment provided by Tang and his help, I think we now know the cause behind all the issues described here.Let me take a moment to explain things again.

Starting with gf3.1.2, under certain circumastances, adminconsole by a postStartup service [1]. I think starting with gf3.1.2, we also started usig start levels to start autostart bundles. Autostart bundles start by a startlevel thread. So, once server is up, there are two threads which are running concurrently - one the start level thread which is changing the start level to final start level and the other one is loading adminconsole. This is resulting in all sorts of issues.
First - the org.osgi.framework.BundleException: Cannot start bundle org.glassfish.admingui.glassfish-osgi-console-plugin [329] because its start level is 2, which is greater than the framework's start level of 1. This is happening because glassfish-osgi-console-plugin.jar is installed in autostart dir and it gets a start level of 2. It can be activated even at framework start level of 1 when adminconsole installer thread is trying to load the console. So, we should really fix the package to install this jar in modules/ dir.

Second - once we get past the first issue, we see the second issue of "Unknown protocol: jndi." It happens because of a combination of issues. One of the glassfish modules called web-glue has an activator which registers a URL handler service in OSGi service registry. Until this service is registered, we can't use URLs with jndi scheme. Our web container relies on jndi URL scheme internally. We expected web-glue to be activated before web container is used. We have code in HK2/osgi-adapter that actually starts a bundle if a bundle is not started yet before it loads a HK2 service from a bundle. But, due to this Felix bug [2], our bundle is not getting activated. What we noticed is that when webconsole is installed, osgi-http module gets activated when start level changes to 2. During osgi-http module activation, it loads WebContainer. But due to this Felix bug, web-glue's activator is not called, yet WebContainer service has been made available. Later on when console thread tried to start console, it never tried to start web-glue again. As a result, the activator of web-glue never got called and hence nobody registered jndi protocol handler. To fix the second issue, I propose that we register jndi protocol handler via a GlassFish startup service.

[1] https://blogs.oracle.com/anilam/entry/glassfish_3_1_2_admin
[2] https://issues.apache.org/jira/browse/FELIX-3713


Sanjeeb Sahoo added a comment - 16/Oct/12 05:53 PM

Please find attached here with a patch for trunk. Once it is internally reviewed, I can commit it. We have to figure out what to do for 3.1.2.x.


Sanjeeb Sahoo added a comment - 17/Oct/12 03:09 AM - edited

I have fixed the issue on trunk in svn rev #56537 and #56547. You need both the commits, because the first one caused a regression in embedded ejb container tests where OSGi classes were not available. See check-in comments for more details.

I have asked our build team to create a 3.1.x branch. When that's available, I will also fix it there.

I will also ask our sustaining team to include this fix in a future patch release.


TangYong added a comment - 17/Oct/12 04:05 AM

Hi sahoo,

I have used the new workaround and tried more than 10 times, the issue including "Unknown protocol:" all did not happen on 3.1.2.2 any longer. The workaround for 3.1.2.x looks very fine!

Thanks
Tang


Sanjeeb Sahoo added a comment - 07/Nov/12 02:36 AM

After further testing, we discovered that we needed it to be an init service rather than a startup service. So, we fixed it in the following check-in:
Sending appserver/web/web-naming/pom.xml
Sending appserver/web/web-naming/src/main/java/org/apache/naming/resources/WebNamingStartup.java
Transmitting file data ..
Committed revision 56875.


Sanjeeb Sahoo added a comment - 07/Nov/12 02:39 AM

There were multiple check-ins, but the last one was part of b62 and now marking the issue as fixed. Sustaining is back porting it to 3.1.x release.