Tag: osgi bundle

OSGI捆绑错误 – ojdbc6.jar

我正在尝试将我的ojdbc6.jar转换为捆绑包,如此处的步骤所述 http://fusesource.com/docs/esb/4.2/deploy_osgi/DeployJar-Convert.html 不幸的是我收到如下错误。 请帮助 一个错误 1:未解析的对[com.sun.security.auth.module,javax.resource,java x.resource.spi,javax.resource.spi.endpoint,javax.resource.spi.security,oracle .i18n.text,oracle的引用.i18n.text.converter,oracle.ons,oracle.security.pki] by Bunds-Classpath [Jar:OJDBC_PLUGIIN_1.0.0.jar]上的clas s:[oracle / jdbc / connect或/ OracleResourceAdapter.class, ORACLE / JDBC /游泳池/ OracleConnectionCacheManager $ 1 class,oracle / net / ano / AuthenticationService.class,oracle / jdbc / pool / OracleRuntim eLoadBalancingEventHandlerThread $ 1.class,oracle / sql / converter / CharacterSetMetaD ata.class,oracle / jdbc / connector / OracleManagedConnection.class,oracle / jdbc […]

Spring组件扫描在osgi容器中被破坏

我正在尝试将spring DI集成到现有的jaxws项目中。 我已经在tomcat本地工作但是当我部署到远程容器时,它似乎没有进行类路径扫描。 我可以在日志中看到,在tomcat上它将我的@Components注册为bean,但是在远程服务器上它们根本没有被提及。 我看到的是下面的堆栈跟踪。 它看起来像是我必须使用的古怪的Web容器。 它是“IBM i的集成应用程序服务器”。 http://www-03.ibm.com/systems/i/software/ias/我相信这是建立在eclipse架构上的,当你安装war文件时,它会将每个应用程序转换为一个包。 这很棒,但它打破了我的类路径扫描。 🙁 有人有解决方案吗? 谢谢 673 [Thread-6] WARN org.springframework.core.io.support.PathMatchingResourcePatternResolver – Cannot search for matching files underneath URL [bundleresource://32/com/company/application/] because it does not correspond to a directory in the file system java.io.FileNotFoundException: URL [bundleresource://32/com/company/application/] cannot be resolved to absolute file path because it does not reside in the […]

如何使用maven bundle插件在OSGi包中包含一个依赖jar?

我有一个OSGi兼容的包(jar),我想在其中添加一个依赖的jar。 我要添加的依赖是数据库驱动程序。 我正在使用的Karaf容器的lib文件夹中没有该jar,并且无法手动将其添加到那里。 我只能访问deploy文件夹,在那里我可以部署我的bundle。 我正在使用maven bundle插件来打包我的包。 所以,我想知道是否有办法在我的包中添加依赖jar。 目前,我通过在7zip中打开包并通过在jar中复制它来添加jar来手动将jar添加到包中,并且它工作正常。 我尝试使用标签,但在这之后,捆绑包没有被部署。 有什么办法吗? 以下是我想要在包中添加的pom.xml中的依赖项: com.h2database h2 1.3.158 以下是pom.xml的build标记: install org.apache.felix maven-bundle-plugin true com.ct.service.userService.*, org.h2.* *, org.codehaus.jackson.jaxrs h2 我尝试部署它时收到以下错误: ERROR: Bundle com.ge.dsp.userService [205] Error starting file:D:Karaf/deploy/userService-0.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.ge.dsp.userService [205]: Unable to resolve 205.2: missing requirement [205.2] osgi.wiring.package; (osgi.wiring.package=org.apache.lucene.analysis)) org.osgi.framework.BundleException: Unresolved constraint in bundle com.ct.service.userService [205]: […]

OSGi容器中的Camel:将InterceptStrategy应用于所有驼峰上下文

我有几个软件包(A,B和C)部署到OSGi容器,每个包含一个CamelContext和一些路由。 我有另一个包(M),带有一个CamelContext ,一个路由(用于收集监控数据)和一个InterceptStrategy bean。 我希望M中的InterceptStrategy bean能够自动应用于容器中的所有其他CamelContext (即A,B和C中的那些),而不必修改其他bundle。 最终,目标是将每个CamelContext数据窃听到M中的路由,而无需对A,B或C进行任何更改以显式路由Exchange 。 这种方法或类似的方法是否可行? 所有CamelContext都是使用Spring XML配置的。 更新:附加上下文 捆绑包A,B和C包含负责处理数据的核心产品。 Bundle M包含一个可选的监控工具,用于测量流经A,B和C的数据的某些参数。目前,添加可选工具需要更改A,B和C中的路由以添加额外的Processor以丰富Exchange与监控数据并在端点之前读取监控数据。 目标是能够将Bundle M放入已经过validation的A,B和C系统; 并使其自动应用于现有路由,而无需修改现有工作包的配置。 只要更改不会导致A,B和C依赖于M来运行(即,ABC必须仍然在没有M的情况下运行),对A,B和C进行修改以支持这一点是可以接受的。 如果有比使用拦截器更好的方法,我对此持开放态度。 主要目标是: 保持A,B和C与M分离(特别是在开发期间) 确保将M与A,B和C集成在一起尽可能简单 允许集成M而无需手动更改A,B或C.

karaf在组件工厂示例时不显示任何错误

我从这个链接尝试过组件工厂示例。 接口: package com.java.examplefactoryservice; public interface ExampleFactoryService { public void start(); public void stop(); } 工厂提供者: package com.java.examplecomponentfactoryserviceprovider; import java.util.Map; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import com.java.examplefactoryservice.ExampleFactoryService; @Component(name = “ExampleComponentFactoryServiceProvider”, factory = “example.factory.provider”) public class ExampleComponentFactoryServiceProvider implements ExampleFactoryService { @Activate public void activate(Map properties) { System.out.println(“Actiavted!!!”); } @Override public void start() { System.out.println(“Started !!!!”); } @Override […]

osgi应用程序中的非osgi库使用

是否可以将非osgi库与OSGi应用程序一起使用? 举个例子,我正在开发一个基于语义的搜索引擎,我正在使用第三方自然语言处理库( http://wiki.opencog.org/w/RelEx_Dependency_Relationship_Extractor )。 是否有可能将这样一个不支持OSGi的库作为几个jar文件与我的OSGi应用程序接口?

bundle的激活器无效

我正试图在eclipse中创建一个简单的插件。 当我运行应用程序时,我在日志文件中看到此错误: org.osgi.framework.BundleException:bundle org.xy的bundle org.xyActivator的激活器无效。 你对这个错误有任何想法吗?

将现有JAR转换为OSGi-bundle

我有一个JAR文件,我需要转换为OSGi包。 我没有JAR文件的原始源代码。 我尝试使用以下答案: 如何从jar库创建OSGi包? 但是,它们已经过时了。 编辑:我需要转换几个,但固定数量的jar子。