Cannot deploy ear on WildFly 8 due to failures when processing its structure - maven

I'm having the following error on Wildfly when trying to deploy an EAR that currently works on Glassfish 4:
09:04:08,976 ERROR [org.jboss.as.controller.management-operation]
(DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment")
failed - address: ([]) - failure description: {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"planoa.ear\".STRUCTURE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"planoa.ear\".STRUCTURE: JBAS018733: Failed to process phase
STRUCTURE of deployment \"planoa.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011037: Unable to process modules in application.xml for EAR
[\"/home/psoto/Programs/wildfly-8.1.0.Final/standalone/deployments/planoa.ear\"],
module file planoa-update-ejb.jar not found"}}
09:04:09,071 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565:
Replaced deployment "planoa.ear" with deployment "planoa.ear"
09:04:09,072 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1)
JBAS014774: Service status report
JBAS014777: Services which failed to start:
service jboss.deployment.unit."planoa.ear".STRUCTURE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."planoa.ear".STRUCTURE: JBAS018733: Failed to process phase
STRUCTURE of deployment "planoa.ear"
service jboss.deployment.unit."planoa.ear".STRUCTURE
This is the content of my application.xml (generated with maven ear plugin):
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6">
<display-name>planoa-ear</display-name>
<module>
<ejb>planoa-update-ejb.jar</ejb>
</module>
<module>
<ejb>planoa-core-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>planoa-web.war</web-uri>
<context-root>/</context-root>
</web>
</module>
<library-directory>lib</library-directory>
</application>
This is the output of jar -tf myearfile.ear:
META-INF/
META-INF/MANIFEST.MF
lib/
lib/planoa-messages.jar/
lib/planoa-messages.jar/META-INF/
lib/planoa-messages.jar/META-INF/maven/
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/
lib/planoa-pu.jar/
lib/planoa-pu.jar/com/
lib/planoa-pu.jar/com/gi/
lib/planoa-pu.jar/com/gi/planoa/
lib/planoa-pu.jar/com/gi/planoa/pu/
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/
lib/planoa-pu.jar/META-INF/
lib/planoa-pu.jar/META-INF/maven/
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/
lib/planoa-log.jar/
lib/planoa-log.jar/META-INF/
lib/planoa-log.jar/META-INF/maven/
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/
planoa-web.war
META-INF/application.xml
META-INF/jboss-app.xml
META-INF/glassfish-application.xml
META-INF/jboss-deployment-structure.xml
planoa-core-ejb.jar
planoa-update-ejb.jar
lib/commons-codec-1.5.jar
lib/gson-2.2.4.jar
lib/gi-commons-ejb-jee7-3.0.37.jar
lib/gi-commons-logback-3.0.37.jar
lib/gi-commons-jsf2-3.0.37.jar
lib/poi-3.10-FINAL.jar
lib/planoa-core-service.jar
lib/commons-lang3-3.1.jar
lib/gi-commons-utils-3.0.37.jar
lib/gi-commons-jaxws-3.0.37.jar
lib/planoa-messages.jar/WebMessageResources.properties
lib/planoa-messages.jar/META-INF/MANIFEST.MF
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/pom.properties
lib/planoa-messages.jar/META-INF/maven/com.gi.planoa/planoa-messages/pom.xml
lib/planoa-messages.jar/ValidationMessages.properties
lib/providers-io-geonames-1.0.03-20141008.234431-86.jar
lib/joda-time-2.4.jar
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/PlanoASqlSessionLog.class
lib/planoa-pu.jar/com/gi/planoa/pu/eclipselink/logger/PlanoASqlSessionCustomizer.class
lib/planoa-pu.jar/META-INF/MANIFEST.MF
lib/planoa-pu.jar/META-INF/persistence.xml
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/pom.properties
lib/planoa-pu.jar/META-INF/maven/com.gi.planoa/planoa-pu/pom.xml
lib/slf4j-api-1.7.7.jar
lib/logback-core-1.1.2.jar
lib/commons-logging-1.1.3.jar
lib/primefaces-5.0.6.jar
lib/planoa-log.jar/logback_desarrollo.xml
lib/planoa-log.jar/META-INF/MANIFEST.MF
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/pom.properties
lib/planoa-log.jar/META-INF/maven/com.gi.planoa/planoa-log/pom.xml
lib/planoa-log.jar/logback.xml
lib/gi-commons-beanvalidation-3.0.37.jar
lib/commons-lang-2.6.jar
lib/gi-commons-validation-3.0.37.jar
lib/logback-classic-1.1.2.jar
lib/planoa-core-model.jar
lib/primefaces-extensions-2.1.0.jar
META-INF/maven/
META-INF/maven/com.gi.planoa/
META-INF/maven/com.gi.planoa/planoa-ear/
META-INF/maven/com.gi.planoa/planoa-ear/pom.xml
META-INF/maven/com.gi.planoa/planoa-ear/pom.properties
The error says that planoa-update-ejb.jar was not found, but as you can see, its inside the ear.
Moreover, if I pick the generated ear, and deploy it through the web interface it works perfectly. So I think its a problem with netbeans wildfly plugin.

After hours of searching I think I found what the issue is.
Its important to understand that the EE 7 plugins for Netbeans seem to deploy the EARs and WARs as exploded artifacts (This makes development fast). The reason why the packaged EAR will work and the exploded ear doesn't is in fact exactly what its telling you (it cannot find the module(s)).
You have to look your application server's deployment directory.
NOTE: running jar -tf on you packaged EAR will give you misleading information, because that's NOT what's deployed when using an IDE to deploy
The root cause of this issue is in the way you build your project. I know in Maven some of us like the do away with version information by doing something like this:
<build>
<!-- This is replicated to your packing mechanisms (May cause problems in Exploded deployments) -->
<finalName>${project.artifactId}</finalName>
</build>

Related

Webapp fails with "JBAS011232: Only one JAX-RS Application Class allowed" after adding a maven dependency to hadoop-azure

I have a webapp that runs fine in JBoss EAP 6.4. I want to add some functionality to my webapp so that it can process Parquet files that reside in AzureBlob storage. I add a single dependency to my pom.xml:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-azure</artifactId>
<version>3.1.0</version>
</dependency>
If I now try to start my webapp, it fails at start up:
09:29:43,703 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-10) MSC000001: Failed to start service
jboss.deployment.unit."myApp-0.0.1-SNAPSHOT.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."myApp-0.0.1-SNAPSHOT.war".POST_MODULE:
JBAS018733: Failed to process phase POST_MODULE of deployment
"myApp-0.0.1-SNAPSHOT.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
[jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
... Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011232: Only one JAX-RS Application Class allowed.
com.sun.jersey.api.core.ResourceConfig
com.sun.jersey.api.core.DefaultResourceConfig
com.sun.jersey.api.core.PackagesResourceConfig
com.mycompany.myapp.rest.RestApplication
com.sun.jersey.api.core.ClassNamesResourceConfig
com.sun.jersey.api.core.ScanningResourceConfig
com.sun.jersey.api.core.servlet.WebAppResourceConfig
com.sun.jersey.api.core.ApplicationAdapter
com.sun.jersey.server.impl.application.DeferredResourceConfig
com.sun.jersey.api.core.ClasspathResourceConfig at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:206)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21] ...
5 more
09:29:43,709 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) JBAS014612: Operation ("deploy") failed -
address: ([("deployment" => "myApp-0.0.1-SNAPSHOT.war")]) - failure
description: {"JBAS014671: Failed services" =>
{"jboss.deployment.unit."myApp-0.0.1-SNAPSHOT.war".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit."myApp-0.0.1-SNAPSHOT.war".POST_MODULE:
JBAS018733: Failed to process phase POST_MODULE of deployment
"myApp-0.0.1-SNAPSHOT.war"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011232: Only one JAX-RS Application Class allowed.
com.sun.jersey.api.core.ResourceConfig
com.sun.jersey.api.core.DefaultResourceConfig
com.sun.jersey.api.core.PackagesResourceConfig
com.mycompany.myapp.rest.RestApplication
com.sun.jersey.api.core.ClassNamesResourceConfig
com.sun.jersey.api.core.ScanningResourceConfig
com.sun.jersey.api.core.servlet.WebAppResourceConfig
com.sun.jersey.api.core.ApplicationAdapter
com.sun.jersey.server.impl.application.DeferredResourceConfig
com.sun.jersey.api.core.ClasspathResourceConfig"}}
The message "JBAS011232: Only one JAX-RS Application Class allowed" seems to be caused by my webapp trying to use both RestEasy and Jersey. JBoss uses RestEasy by default. Apparently, hadoop-azure must have a Jersey application class. How can I eliminate this problem by indicating that I don't want to use the Jersey-based application class?
hadoop-azure pulls in hadoop-common, which pulls in Jersey. In the version of hadoop-azure you're using, hadoop-common is in compile <scope>. In new version, it is in provided scope. So you can just upgrade the hadoop-azure dependency to the latest one. If you need hadoop-common to compile, then you can redeclare hadoop-common and put it in provided scope.

Error deploying Spring boot application in Websphere 8.5.5

I am getting following error message in stdout while starting my application in Websphere 8.5.5:
1/9/20 11:56:48:437 UTC] 000000c0 SystemOut O 11:56:48.435 [WebContainer : 3] ERROR
org.springframework.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.xml'
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:545)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:494)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:464)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$7(ConfigFileApplicationListener.java:443)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader$$Lambda$290.0000000000368730.accept(Unknown Source)
at java.lang.Iterable.forEach(Iterable.java:86)
at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$load$8(ConfigFileApplicationListener.java:443)
The version of spring boot that I am using is 2.2.2.
Why is Spring Boot trying to load the ear deployment descriptor, which is in the META-INF folder?
As M. Deinum says, the problem it is giving is because Spring Boot is trying to load the ear artifact's application.xml file to get properties and gives a parsing error as it does not have the expected format.
I have had this same error when displaying in application servers and it is solved by taking from the MANIFEST.MF file the path /META-INF
In my case, I was including the war plugin with this:
<manifestEntries>
<Class-Path>./ META-INF/</Class-Path>
</manifestEntries>
Try deleting that entry and redeploying.

JBoss AS 7 not using WEB-INF hibernate lib and throwing "Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]"

I'm migrating a Spring+Hibernate application from Weblogic 12c to JBoss AS 7, and I'm getting the following error:
20:07:47,395 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."connecta-presenter-2.2.1.war#ConnectaPresenterPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."connecta-presenter-2.2.1.war#ConnectaPresenterPU": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_95]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ConnectaPresenterPU] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
Caused by: org.hibernate.service.UnknownServiceException: Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:126)
at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:49)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:294)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
The Unknown service requested [org.hibernate.boot.registry.classloading.spi.ClassLoaderService] message thrown by line 126 of org.hibernate.service.internal.AbstractServiceRegistryImpl is an exception thrown only in version 4.0.1 of Hibernate Core, which is the version that is in my JBoss AS 7 modules folder.
The thing is that my application uses Hibernate 4.3.10, and this specific line doesn't exist more in this version (I could see comparing the source code on Github).
The following documentation on JBoss AS 7 site states that when you migrate from Weblogic to JBoss:
https://docs.jboss.org/author/display/AS72/How+do+I+migrate+my+application+from+WebLogic+to+AS+7#HowdoImigratemyapplicationfromWebLogictoAS7-Migrateweblogic.xmlDescriptorFileConfigurations
So there's no such code as the following in jboss-web.xml file:
<prefer-application-packages>
<package-name>javassist.*</package-name>
</prefer-application-packages>
It says that JBoss always uses WEB-INF/classes and WEB-INF/lib before the internal modules.
Any idea of what's happening?
If you want to use your own specific version of Hibernate (or any other service/software for that matter), you can do that instead of depending on JBoss AS 7 modules.
Create a new folder structure, say org/myhibernate/main in your $JBOSS_HOME\modules\system\layers\base\ directory. Put the needed jar (say my.jar) in the main folder and create a module.xml file like this:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.myhibernate">
<resources>
<!-- Modules -->
<resource-root path="my.jar" />
</resources>
<dependencies>
<module name="javax.api"/>
<module name="sun.jdk"/>
</dependencies>
</module>
Now create a jboss-deployment-structure.xml in your EAR/web folder in your workspace and include this dependency -
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<sub-deployment name="yourfile.war">
<dependencies>
<module name="org.myhibernate" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>

Karaf Feature install throwing Unsupported 'Bundle-ManifestVersion' value: 1

Hi guys i am getting the below error while using feture install in karaf
org.apache.karaf.features.internal.util.MultiException: Error
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:358)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.region.Subsystem.downloadBundles(Subsystem.java:355)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:191)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1079)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:975)[9:org.apache.karaf.features.core:4.0.3]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: java.lang.Exception: Unable to create resource for bundle mvn:org.dt.dummy/Diff-Blueprint/0.0.1-SNAPSHOT
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:567)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.region.Subsystem$1.downloaded(Subsystem.java:376)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListeners(DefaultFuture.java:329)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.DefaultFuture.setValue(DefaultFuture.java:255)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.AbstractDownloadTask.setFile(AbstractDownloadTask.java:61)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:59)[9:org.apache.karaf.features.core:4.0.3]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_79]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_79]
... 3 more
Caused by: org.osgi.framework.BundleException: Unable to build resource for mvn:org.dt.dummy/Diff-Blueprint/0.0.1-SNAPSHOT: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:80)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:69)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.region.Subsystem.createResource(Subsystem.java:565)[9:org.apache.karaf.features.core:4.0.3]
... 15 more
Caused by: org.osgi.framework.BundleException: Unsupported 'Bundle-ManifestVersion' value: 1
at org.apache.karaf.features.internal.resolver.ResourceBuilder.doBuild(ResourceBuilder.java:88)[9:org.apache.karaf.features.core:4.0.3]
at org.apache.karaf.features.internal.resolver.ResourceBuilder.build(ResourceBuilder.java:78)[9:org.apache.karaf.features.core:4.0.3]
... 17 more
feature.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="Diff-Blueprint">
<feature name="Diff-Blueprint" description="Diff-Blueprint" version="0.0.1.SNAPSHOT">
<feature prerequisite="true" dependency="false">wrap</feature>
<bundle>mvn:org.dt.dummy/Diff-Blueprint/0.0.1-SNAPSHOT</bundle>
<bundle>wrap:mvn:osgi/osgi/3.0.1</bundle>
<bundle>wrap:mvn:javax.xml/xml/3.1.0</bundle>
<bundle>wrap:mvn:xmlunit/xmlunit/1.6</bundle>
<bundle>wrap:mvn:junit/junit/4.11</bundle>
<bundle>wrap:mvn:org.hamcrest/hamcrest-core/1.3</bundle>
<bundle>mvn:com.googlecode.json-simple/json-simple/1.1.1</bundle>
<bundle>wrap:mvn:de.odysseus.staxon/staxon-jackson/1.2</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.0.6</bundle>
<bundle>wrap:mvn:de.odysseus.staxon/staxon/1.2</bundle>
<bundle>mvn:log4j/log4j/1.2.17</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-mapper-asl/1.9.13</bundle>
<bundle>mvn:org.codehaus.jackson/jackson-core-asl/1.9.13</bundle>
<bundle>wrap:mvn:org.unitils/unitils/2.4</bundle>
<bundle>wrap:mvn:commons-logging/commons-logging/1.1</bundle>
<bundle>wrap:mvn:commons-dbcp/commons-dbcp/1.2.2</bundle>
<bundle>wrap:mvn:commons-pool/commons-pool/1.3</bundle>
<bundle>wrap:mvn:commons-lang/commons-lang/2.3</bundle>
<bundle>wrap:mvn:commons-collections/commons-collections/3.2</bundle>
<bundle>wrap:mvn:ognl/ognl/2.6.9</bundle>
<bundle>wrap:mvn:ant/ant/1.6.5</bundle>
</feature>
</features>
Appreciate that I am resurrecting an old thread here, but to elaborate on #Charity's answer, for anybody who discovers this at a later date (as I did)...
The problem is that we are trying to deploy a non-OSGi compliant bundle, to the container. The solution is to "wrap" the bundle that is causing you problems, by using the Wrap protocol described in the OPS4J Wiki.
JAR Example
A simple example using Maven is shown below:
wrap:mvn:commons-logging/commons-logging/1.1
Note that we have to prefix the bundle with "wrap:", and that is all. See the wiki for more complex examples which override settings defined in the manifest.
WAR Example
Deploy a non-OSGi compliant WAR file in much the same way, using the "webbundle" URI handler instead:
webbundle:mvn:com.example/example-web-app/1.0/war
I have found a solution if we wrap the jars which throw Bundle-ManifestVersion: 1 then this will work
Evidently the Diff-Blueprint bundle has Bundle-ManifestVersion: 1 as a MANIFEST.MF header. This indicates that it predates OSGi Release 4.0, which was released in 2005, so it's unsurprising that a modern version of Karaf does not support it.
So you will have to look into the tool that produced that bundle.
Try to edit MANIFEST.MF file of problematic bundle, just change Bundle-ManifestVersion with value of 2 instead of 1.

Issue with resource-ref om web.xml - Failed to process bindings for metadata

I have resource-ref to the datasource in my deployment descriptor.
web.xml
<resource-ref>
<description></description>
<res-ref-name>jdbc/myAppDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
When I try to publish the ear in my local RAD - websphere environment, I'm getting below exception.
Caused by: com.ibm.wsspi.injectionengine.InjectionException: CWNEN0044E: A resource reference binding could not be found for the following resource references [jdbc/myAppDS], defined for the MyApp Web Application component.
at com.ibm.wsspi.injectionengine.InjectionProcessor.collectInjectionNBindingData(InjectionProcessor.java:1042)
at com.ibm.ws.injectionengine.InjectionEngineImpl.processBindings(InjectionEngineImpl.java:516)
... 77 more
datasource myAppDS is registered with the Websphere and test connection is also successful. Is there any reason why the war is unable to find the resource?
I solve the problem adding the datasource in this file
/WebContent/WEB-INF/ibm-web-bnd.xmi
<resRefBindings xmi:id="rr_jdbc.dataSourceName_jdbc.dataSourceName" jndiName="jdbc.dataSourceName">
<bindingResourceRef href="WEB-INF/web.xml#rr_jdbc.dataSourceName"/>
</resRefBindings>

Resources