Apache camel 用于为ServiceMix创建捆绑包的导入包/导出包
我想创建一个使用hibernate进行数据库事务的包。在进入hibernate之前,我使用的是普通的Apache camel 用于为ServiceMix创建捆绑包的导入包/导出包,apache-camel,osgi,apache-felix,osgi-bundle,apache-servicemix,Apache Camel,Osgi,Apache Felix,Osgi Bundle,Apache Servicemix,我想创建一个使用hibernate进行数据库事务的包。在进入hibernate之前,我使用的是普通的sql。在camel.xml中提到hibernate和相关配置之后,我尝试在ServiceMix中部署该捆绑包。当我尝试使用start 525启动此捆绑包时,收到一条错误消息,提示: Error executing command: Error executing command on bundles: Error starting bundle 525: Unable to resolv
sql
。在camel.xml
中提到hibernate和相关配置之后,我尝试在ServiceMix中部署该捆绑包。当我尝试使用start 525
启动此捆绑包时,收到一条错误消息,提示:
Error executing command: Error executing command on bundles:
Error starting bundle 525: Unable to resolve my.package.artifactid [525](R 525.0): missing requirement [my.package.artifactid [525](R 525.0)] osgi.wiring.package; (osgi.wiring.package=javax.interceptor) Unresolved requirements: [[my.package.artifactid [525](R 525.0)] osgi.wiring.package; (osgi.wiring.package=javax.interceptor)]
这是针对javax.interceptor的。我把这个包放在
的maven bundle felix plugin的pom.xml
中。这解决了问题,但后来org.hibernate和其他软件包也出现了同样的错误。
我的问题是,当我把它放在
标签中时,我做得对吗?如果这是正确的,我必须为大量的软件包继续这样做。有没有办法摆脱这种繁忙的程序?
如果我做错了,我该怎么办?是的。你做错了 错误表明,包javax.interceptor是您的包所必需的(例如,包中的类通过直接引用包javax.interceptor中的类,或通过使用任何框架(如hibernate)间接引用包javax.interceptor中的类),如果没有这些类,包将无法加载引用的类 现在,按照以下步骤解决此问题
该错误似乎表明您的模块需要导入javax.inteceptor。您可以尝试放置“javax.interceptor”吗关于导入:您可以让maven bundle插件在maven bundle插件的配置中指定*来填充大部分清单条目。如果maven bundle插件遗漏了一些必需的包,请将它们添加到星号:*、package1、package2之后
missing requirement [my.package.artifactid [525](R 525.0)] osgi.wiring.package; (osgi.wiring.package=javax.interceptor)