Don, 



javax.management is provided by the API. However, it is exported as version 
0.0.0.  For this reason, com.springsource.org.apache.activemq.web  can't wire 
to it because it is looking for a version between 1.0.1 and 2.0.0. 



Most bundles in Karaf don't specify the version number for api provided 
packages. This is to allow everyone to upgrade the version of Java used by 
Karaf without having to rewrite and redistribute all the application bundles.  



Here is what is happening inside Karaf.  When karaf sees an import with no 
version number, it automatically starts looking for that package, starting at 
0.0.0 and incrementing up until it finds a package with a version number.  It 
appears from the error that com.springsource.org.apache.activemq.web is looking 
for a version of javax.management between versions 1.0.1 and 2.0.0.  This tells 
me that it is expecting to see a javax.management package other than that 
provided by the API. 



To verify that your version of Karaf doesn't have this version of 
javax.management inside it already, you can grep the exports for 
javax.management like this: 



exports | grep javax.management 



Once you've done this and proven that you don't already have that version of 
javax.management installed, there are a couple of things you can do to fix this 
error.  First, if you're using a provisioning file (will likely end with 
features.xml), search in that file for a bundle that would contain 
javax.management and make sure it is using the correct version number.  Failing 
that, if you are installing the set of bundles manually, I would go to the 
spring forums and ask them what package they are using for 
com.springsource.org.apache.activemq.web.  They've probably got something 
wrapped up that has the proper version number. 



As an absolute last resort (meaning don't do this unless you really have to), 
you may want to "hack" the /etc/jre.properties file and next to the 
javax.management entry for the version of Java you are using type 
;version="1.0.1".  This last statement is absolutely not the best way to handle 
the issue and should only be used as a last resort. I'm sure there will be some 
posts STRONGLY suggesting you not do this. 



v/r, 



Karafman 


----- Original Message ----- 
From: "DonDiego761 [via Karaf]" 
<[email protected]> 
To: "karafman" <[email protected]> 
Sent: Tuesday, January 4, 2011 12:08:27 PM 
Subject: Unable to resolve 
package=javax.management)(version>=1.0.1)(!(version>=2.0.0) 

Hi, 

In Karaf 2.1.2, I installed the bundle Apache ActiveMQ Web Connector for REST 
API and Streamlets support (5.3.0). When I start it, I get the following error: 
Error executing command: Unresolved constraint in bundle 
com.springsource.org.ap 
ache.activemq.web [353]: Unable to resolve 353.0: missing requirement [353.0] 
pa 
ckage; (&(package=javax.management)(version>=1.0.1)(!(version>=2.0.0))) 

But I didn't find the bundle which contents the package "javax.management". 

I hope I was clear. 

Regards, 





View message @ 
http://karaf.922171.n3.nabble.com/Unable-to-resolve-package-javax-management-version-1-0-1-version-2-0-0-tp2192781p2192781.html
 
To start a new topic under Karaf - User, email 
[email protected] 
To unsubscribe from Karaf - User, click here .

-----
Karafman
Slayer of the JEE
Pounder of the Perl Programmer

-- 
View this message in context: 
http://karaf.922171.n3.nabble.com/Unable-to-resolve-package-javax-management-version-1-0-1-version-2-0-0-tp2192781p2192979.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to