Exception when adding org.json to JBoss AS7 (EAP-6.1)
ffrench.mathilde May 26, 2013 6:45 AMHello guys !
I'm currently trying to add org.json.20090211 to my JBoss environment.
First, as the default package you can find on the web is not OSGI compliant I OSGIfy it with bundlor.sh. Result is attached to that thread.
So my new json bundle is located in my local maven repository : ~/.m2/repository/org/json/json/1.0.0/json-1.0.0.jar. When I deploy it through the JBoss web app there is no problem (checked through the felix web app)...
First problem comes when I reboot my AS7 : then my json bundle can't be activated for some reason I don't understand yet. Bellow the error raised on the jboss console (sorry for the english / french mix, I translate when it's french):
12:21:30,506 INFO [org.jboss.osgi.framework] (MSC service thread 1-7) JBOSGI011001: Bundle installed: org.json.json:1.0.0
12:21:30,956 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Déploiement de "json" (runtime-name: "json-1.0.0.jar") [json deployment]
12:21:30,960 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Rapport de statut de service [status report]
JBAS014775: Nouvelles dépendances manquantes/non complétées : [new dependencies missing]
Dépendances service [Service dependency] jbosgi.PersistentBundles.COMPLETE (manquantes)[missing] : [service jbosgi.internal.framework.INIT, service jboss.deployment.unit."json-1.0.0.jar".CONFIGURE_MODULE]
Dépendances service [Service dependency] jboss.osgi.as.initial.deployments.COMPLETE (manquantes)[missing] : [service jbosgi.PersistentBundles.INSTALL]
So here's the first error I would like to understand but as finally I want my JSON bundle to be in the OSGI capabilities this is not the worst one from my point of view...
So I removed my json bundle thanks the jboss web app and tried to add it as an osgi capability. As there seems to be dependencies problems I defined this capabilitie with startlevel 4 for test :
<capability name="org.json:json:1.0.0" startlevel="4"/>
Unfortunately I get this new error when I restarted JBoss :
12:30:23,570 INFO [org.jboss.osgi.repository] (MSC service thread 1-1) JBOSGI020400: Find maven providers for: MavenCoordinates[org.json:json:jar:1.0.0]
12:30:23,572 ERROR [org.jboss.osgi.repository] (MSC service thread 1-1) JBOSGI020402: Cannot create resource for: MavenCoordinates[org.json:json:jar:1.0.0]: java.lang.IllegalStateException: Cannot create capability from: file:/home/echinopsii/.m2/repository/org/json/json/1.0.0/json-1.0.0.jar
at org.jboss.osgi.repository.URLResourceBuilderFactory.create(URLResourceBuilderFactory.java:82) [jbosgi-repository-api-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
at org.jboss.osgi.repository.core.MavenArtifactRepository.findProviders(MavenArtifactRepository.java:83) [jbosgi-repository-core-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
at org.jboss.osgi.repository.spi.AggregatingRepository.findProviders(AggregatingRepository.java:48) [jbosgi-repository-api-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
at org.jboss.osgi.repository.spi.AbstractPersistentRepository.findProviders(AbstractPersistentRepository.java:65) [jbosgi-repository-api-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
at org.jboss.as.osgi.service.BootstrapBundlesIntegration.getInitialBundleDeployment(BootstrapBundlesIntegration.java:251) [jboss-as-osgi-service-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.osgi.service.BootstrapBundlesIntegration.start(BootstrapBundlesIntegration.java:156) [jboss-as-osgi-service-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: java.lang.IllegalArgumentException: JBOSGI010700: manifest is null
at org.jboss.osgi.metadata.OSGiMetaDataBuilder.load(OSGiMetaDataBuilder.java:92) [jbosgi-metadata-2.2.0.Final-redhat-1.jar:2.2.0.Final-redhat-1]
at org.jboss.osgi.repository.URLResourceBuilderFactory.create(URLResourceBuilderFactory.java:79) [jbosgi-repository-api-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
... 10 more
At the end, I see that message "manifest is null" so I checked my bundle again to check the MANIFEST.MF generated by bundlor.sh but I didn't see anything wrong. So this is the second error I don't understand and this is the most blocking currently.
Any help would be much appreciate. Thank you !
-
json-1.0.0.jar 45.0 KB