OSGI bundle activiti-engine/5.14 failed to deploy due to duplicated imported org.activiti.osgi + WorkAround

Description

Using OSGI example from ActivitiInAction book,
When importing the feature book-osgi the error Duplicated import is triggered.

[root@pierrePC opt]# cd apache-karaf-2.3.3/bin/
[root@pierrePC bin]# ./karaf start
karaf: JAVA_HOME not set; results may vary
__ __ ____
/ ///___ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ // / / / // / __/
// ||_,// _,//

Apache Karaf (2.3.3)

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'osgi:shutdown' or 'logout' to shutdown Karaf.

karaf@root> features:addurl mvn:org.bpmnwithactiviti/book-osgi-features/1.0.0/xml/features
karaf@root> features:install -v book-osgi
Installing feature book-osgi 1.0.0
Installing feature activiti 5.14
Installing feature spring 3.2.4.RELEASE
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_6
Installing bundle mvn:org.springframework/org.springframework.core/3.2.4.RELEASE
Installing bundle mvn:org.springframework/org.springframework.expression/3.2.4.RELEASE
Installing bundle mvn:org.springframework/org.springframework.beans/3.2.4.RELEASE
Installing bundle mvn:org.springframework/org.springframework.aop/3.2.4.RELEASE
Installing bundle mvn:org.springframework/org.springframework.context/3.2.4.RELEASE
Installing bundle mvn:org.springframework/org.springframework.context.support/3.2.4.RELEASE
Installing bundle mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/0.3
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.wsdl4j/1.6.2_3
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.mybatis/3.2.2_1
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools/5.5.0.Final_2
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdt-core/3.2.3_5
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/1.8.4_2
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.antlr/2.7.7_4
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.asm/3.3_2
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.junit/4.11_1
Installing bundle mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javassist/3.12.1.ga_1
Installing bundle wrap:mvn:org.postgresql/postgresql/9.2-1002-jdbc4
Installing bundle mvn:com.fasterxml.uuid/java-uuid-generator/3.1.2
Installing bundle mvn:javax.mail/mail/1.4.3
Installing bundle mvn:org.codehaus.groovy/groovy-all/2.1.7
Installing bundle mvn:org.activiti/activiti-bpmn-converter/5.14
Installing bundle mvn:org.activiti/activiti-bpmn-model/5.14
Installing bundle mvn:org.activiti/activiti-engine/5.14
Error executing command: Duplicate import: org.activiti.osgi

After having reviewed the bundle manifest inside activiti-engine, I found twice org.activiti.osgi.

Workaround:
===========

I manually removed the duplicate key, repackaged the bundle jar, force the redeployment of the bundle in my maven repository.

After a maven clean install on the project and a complete redeployment on a brand new karaf instance, the error has disappeared.

Both example project and patched bundle are attached for review

Environment

Apache karaf 2.3.3

Assignee

Tijs Rademakers

Reporter

Pierre Colot

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure