2016-01-17 113 views
0

我下載了Apache karaf 4.x和安裝了「戰爭」的特徵和karaf-doc的軟件包使用以下命令:阿帕奇karaf zhcon失敗加載網頁束

feature:install war 
bundle:install -s mvn:org.apache.karaf/manual/4.0.0/war 

但karaf未能加載網頁捆綁:

2016-01-17 17:16:36,167 | ERROR | pool-4-thread-1 | RegisterWebAppVisitorWC   | 64 - org.ops4j.pax.web.pax-web-extender-war - 3.2.6 | Registration exception. Skipping. 
java.lang.NoClassDefFoundError: javax/servlet/Filter 
    at java.lang.ClassLoader.defineClass1(Native Method)[:1.7.0_45] 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)[:1.7.0_45] 
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2279) 
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1501) 
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75) 
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45] 
    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844) 
    at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937) 
    at org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176) 
    at org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45] 
    at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorHS.loadClass(RegisterWebAppVisitorHS.java:244)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:261)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:652)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:237)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:182)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:135)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf-org.osgi.core.jar:] 
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864)[karaf-org.osgi.core.jar:] 
    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf-org.osgi.core.jar:] 
    at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf-org.osgi.core.jar:] 
    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)[karaf-org.osgi.core.jar:] 
    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[karaf-org.osgi.core.jar:] 
    at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:101)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:213)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:175)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:58)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:266)[64:org.ops4j.pax.web.pax-web-extender-war:3.2.6] 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_45] 
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45] 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_45] 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_45] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_45] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_45] 
    at java.lang.Thread.run(Thread.java:744)[:1.7.0_45] 

我該如何解決這個問題?在4.0.0

+0

最後的補充問題不適用於計算器。他們主要是基於意見的。請刪除它們。 –

回答

0

的Karaf文檔捆綁竟然出現了一個問題,如果你這樣做:

feature:install war 
bundle:install -s mvn:org.apache.karaf/manual/4.0.3/war 

它的工作的時候了。 只需轉到

http://localhost:8181/karaf-doc/ 

你能夠通過查看部署的應用程序:

[email protected]()> web:list 
ID | State  | Web-State | Level | Web-ContextPath | Name 
----------------------------------------------------------------------------------------- 
97 | Active  | Deployed | 80 | /karaf-doc  | Apache Karaf :: Manual (4.0.3) 

我懷疑OSGi是奄奄一息,其實反過來想,但是這是有偏頗的看法。
基於它的Apache Karaf和ServiceMix已準備就緒,不知道處女座。

+0

切換到4.0.3後,它現在可以正常工作,但是如果我點擊主頁上的任何鏈接,它會在沒有應用程序上下文根(karaf-doc)的情況下進入錯誤的位置。 – WestFarmer

+0

可能是手冊包的問題,​​請在jira爲apache karaf打開它的問題。該手冊也可以在karaf.apache.org找到 –

+0

如果我手動添加上下文根,我可以看到它...對我來說karaf是越野車。 – WestFarmer