Glassfish 3.1.2上使用Jackrabbit OSGi Bundle的MalformedURLException

时间:2013-02-08 09:20:56

标签: glassfish osgi jackrabbit jcr malformedurlexception

我正在尝试使用最新的Jackrabbit稳定版本(2.4.3)并将其部署为Glassfish v3.1.2上的OSGi软件包。

首先,我尝试了 jackrabbit-standalone 捆绑包,但我遇到了一些奇怪的依赖项(com.ibm.jvm!?)。然后我注意到 jackrabbit-bundle 项目,并使用其所需的依赖项(Commons Logging,SLF4J,JCR API,DB2 Driver)进行部署。

虽然捆绑软件似乎在安装后就开始了,但是当我重新启动Glassfish服务器时,会抛出以下异常:

[#|2013-02-08T09:49:12.559+0100|SEVERE|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=18;_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:2018)
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
|#]

搜索此错误并没有让我感到惊讶。我已经尝试将bundle startlevel增加到10,假设它开始得太早,但这没有帮助。

有没有人知道可能是什么问题? 有人甚至使用Jackrabbit作为纯OSGi Bundle(不包括Apache Sling的东西)吗?

2 个答案:

答案 0 :(得分:0)

这个问题并非特定于长耳兔。请参阅http://java.net/jira/browse/GLASSFISH-18880,详细讨论此错误。它已在GlassFish主干版本中修复。如果您使用的是GlassFish 3.1.2.x,请使用bug状态白板中提到的解决方法。实际上,您必须通过运行以下命令禁用管理控制台作为服务器启动的一部分自动启动:

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

希望这有帮助,

Sahoo

答案 1 :(得分:0)