2013-03-22 77 views
1

我一直在通過處女座配置問題的方式工作,並有一個庫,只是拒絕合作 - 阿帕奇速度。阿帕奇速度拒絕與處女座

我的包的清單是這樣(我已經改變或刪除一些內部庫的名稱):

Manifest-Version: 1.0 
Web-ContextPath: blah 
Bundle-ManifestVersion: 2 
Bundle-Name: thebundle 
Bundle-SymbolicName: blahblah 
Bundle-Version: 0.1.0 
Bundle-Activator: blah.Activator 
Import-Package: mydatasource, 
javax.crypto, 
javax.jms;version="[1.1.0,2.0.0)", 
javax.naming;version=0, 
javax.naming.directory;version=0, 
javax.servlet;version="[2.6.0,2.6.0]", 
javassist.util.proxy;version="[3.15.0.GA,3.15.0.GA]", 
javax.servlet.http;version="[2.6.0,2.6.0]", 
org.hibernate.validator;version="[4.2.0.Final,4.2.0.Final]", 
org.osgi.framework;version="[1.7.0,1.7.0]", 
org.osgi.util.tracker, 
org.slf4j.impl;version="[1.7.2,1.7.2]" 
Export-Package: .... (stuff removed) 
Bundle-ClassPath: ., 
WEB-INF/classes, 
WEB-INF/lib/velocity.jar <--- THIS IS APACHE VELOCITY 
WEB-INF/lib/blahblah.jar 
Import-Bundle: org.eclipse.virgo.web.dm;version="3.5.0.RELEASE";resolution:=optional, 
a bunch of other bundles I've removed 

而且我會在很長的堆棧跟蹤的結尾以下異常:

Caused by: java.lang.ClassNotFoundException: org.apache.velocity.exception.VelocityException 
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) 
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) 
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) 
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) 
    at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135) 

我已驗證velocity.jar獲取發佈在我的包中。我沒有任何其他圖書館的問題。它似乎看到一些類速度,但沒有其他類。我試過在導入包中引入所有單獨的速度包,沒有效果。我已經嘗試了苛刻的語言,沒有效果。

回答

1

您必須導入包和包放到你的包,(之前你可以下載速度包和部署到您的皮卡文件夾)

see this example 


Import-Bundle: 
org.springframework.web.servlet;version="[3.0.0.RELEASE,3.0.5.RELEASE]" 
com.springsource.org.apache.velocity;version="[1.5.0,1.5.0]" 

Import-Package: 
org.springframework.web.servlet.view.velocity;version="[3.0, 3.5)" 

Import-Bundle: com.springsource.javax.ejb;version="[3.0.0,3.0.0]",com. 
springsource.org.apache.catalina;version="[7.0.26,7.0.26]",com.spring 
source.org.apache.commons.lang;version="[2.6.0,2.6.0]",com.springsour 
ce.org.apache.velocity;version="[1.5.0,1.5.0]",org.eclipse.virgo.web. 
dm;version="[3.0.3.RELEASE,3.0.3.RELEASE]",org.springframework.contex 
t;version="[3.0.5.RELEASE,3.0.5.RELEASE]",org.springframework.web;ver 
sion="[3.0.5.RELEASE,3.0.5.RELEASE]",**org.springframework.web.servlet; 
version="[3.0.0.RELEASE,3.0.5.RELEASE]"** 
Bundle-Vendor: Roshka 
Bundle-Version: 1.0.0 
Build-Jdk: 1.6.0_37 
Bundle-ManifestVersion: 2 
Bundle-SymbolicName: helloworld-bundlor 
Import-Package: javax.ejb,org.apache.commons.lang,org.apache.naming.ja 
va,org.apache.velocity,org.apache.velocity.servlet,org.eclipse.virgo. 
web.dm;version="[3.0.0, 4.0.0)",org.springframework.beans.factory.ann 
otation;version="[3.0, 3.5)",org.springframework.context,org.springfr 
amework.core.io;version="[3.0, 3.5)",org.springframework.ejb.access,o 
rg.springframework.stereotype;version="[3.0, 3.5)",org.springframewor 
k.web.bind.annotation;version="[3.0, 3.5)",org.springframework.web.co 
ntext;version="[3.0, 3.5)",org.springframework.web.servlet;version="[ 
    3.0, 3.5)",org.springframework.web.servlet.view;version="[3.0, 3.5)", 
**org.springframework.web.servlet.view.velocity;version="[3.0, 3.5)",or 
g.springframework.web.servlet.mvc.annotation;version="[3.0, 3.5)" 
+1

是的,這是它。當然,我在幾個月前就知道它了:) – 2013-11-01 01:26:05

+0

我仍然無法用速度來完成我的項目工作,我還有其他問題,我會發布求助。你能與處女座速度一起工作嗎?問候。 – jrey 2013-11-01 11:27:16