java bundle id_java – bundle中未解决的约束,缺少要求osgi.wiring.package

我正在使用OSGi-(felix),SpringDM,hibernate,maven的项目.当我安装bundle时,没关系,我运行bundle id时的输出是:

LastModified 1384619994484

Headers [Manifest-Version=1.0,Bundle-Vendor=NguyenVinhLinh,Bnd-LastModified=1384619954778,Tool=Bnd-2.1.0.20130426-122213,Bundle-Name=DrugManager,Built-By=nguyenvinhlinh,Import-Package=org.hibernate,org.hibernate.classic,org.hibernate.criterion,org.springframework.beans.factory;version="[2.5,3)",org.springframework.core.io;version="[2.5,org.springframework.transaction.annotation;version="[2.5,Bundle-SymbolicName=DrugManagerDAO,Export-Package=drug,drugGroup,model;version="1.0.0",Bundle-Version=1.0.0,Build-Jdk=1.7.0_45,Created-By=Apache Maven Bundle Plugin,Bundle-ManifestVersion=2]

BundleContext null

Revisions [169.0]

BundleId 169

SymbolicName DrugManagerDAO

RegisteredServices null

ServicesInUse null

Version 1.0.0

Location file:/home/nguyenvinhlinh/Projects/felix-framework-4.2.1/bundle/DrugManager-1.0.jar

State 2

Bundle 169|Installed | 1|DrugManagerDAO (1.0.0)

这就是我看到的,当我开始这个包时:

org.osgi.framework.BundleException: Unresolved constraint in bundle DrugManagerDAO [169]: Unable to resolve 169.0: missing requirement [169.0] osgi.wiring.package; (osgi.wiring.package=org.hibernate)

这是我的beans.xml:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:osgi="http://www.springframework.org/schema/osgi"

xmlns:tx="http://www.springframework.org/schema/tx"

xsi:schemaLocation="

http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd

http://www.springframework.org/schema/osgi

">

这是我的pom文件:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0

DrugManager

DrugManager

1.0

bundle

org.osgi

org.osgi.core

4.3.0

hsqldb

hsqldb

1.8.0.10

org.springframework

spring

2.5.6

commons-dbcp

commons-dbcp

20030825.184428

commons-pool

commons-pool

20030825.183949

org.hibernate

hibernate

3.2.6.ga

MysqL

MysqL-connector-java

5.1.27

org.apache.maven.plugins

maven-compiler-plugin

2.0.2

1.6

1.6

org.apache.felix

maven-bundle-plugin

2.4.0

true

DrugManagerDAO

NguyenVinhLinh

"drug,model"

org.hibernate

java.net

http://download.java.net/maven/2/

另外,felix中有一个完整的bundle错误.

g! ERROR: Bundle DrugManagerDAO [190] Error starting file:DrugManager-1.0.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle DrugManagerDAO [190]: Unable to resolve 190.0: missing requirement [190.0] osgi.wiring.package; (osgi.wiring.package=org.hibernate))

org.osgi.framework.BundleException: Unresolved constraint in bundle DrugManagerDAO [190]: Unable to resolve 190.0: missing requirement [190.0] osgi.wiring.package; (osgi.wiring.package=org.hibernate)

at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)

at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)

at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)

at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)

at java.lang.Thread.run(Thread.java:744)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值