Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » java.lang.NoClassDefFoundError: javax/management/ObjectName
java.lang.NoClassDefFoundError: javax/management/ObjectName [message #990178] Tue, 11 December 2012 10:03 Go to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 21
Registered: April 2012
Location: Zürich
Junior Member
Hi

I am getting java.lang.NoClassDefFoundError: javax/management/ObjectName when trying to work with a ObjectName instance from javax.management in a bundle, although using springs mechanism to auto-export annotated beans is working in the same bundle.

As for my understanding of Virgo, as long as the java6-server.profile file under "org.osgi.framework.system.packages" contains an entry for the java.management* packages, these should be available to bundles using classes of it. Or am i completely wrong?

I also tried to add javax.management as bundle dependency, but also this results in a class not found exception?

Anyone any suggestions what im doing wrong here?

Cheers Dani
Re: java.lang.NoClassDefFoundError: javax/management/ObjectName [message #990202 is a reply to message #990178] Tue, 11 December 2012 11:50 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 21
Registered: April 2012
Location: Zürich
Junior Member
Ok, found the correct info by myself. If anyone else has the same question, here is the solution.

In the Virgo user docuemntation:

Table 13.3. Framework Profile Properties

Although the system bundle is typically imported into the User Region, any additional packages will not be visible in the User Region unless you also import them using the packagedImports property. See Configuring the User Region for instructions.

which brings me to:

packageImports in the $SERVER_HOME/configuration/org.eclipse.virgo.kernel.userregion.properties

there i had to add following two lines:

javax.management;version="0",\
javax.management.*;version="0"
Re: java.lang.NoClassDefFoundError: javax/management/ObjectName [message #990249 is a reply to message #990202] Tue, 11 December 2012 15:25 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 21
Registered: April 2012
Location: Zürich
Junior Member
Well, i have now listed all javax.management packages under packageImports
javax.management;version="0",\
javax.management.loading;version="0",\
javax.management.modelmbean;version="0",\
javax.management.monitor;version="0",\
javax.management.openmbean;version="0",\
javax.management.relation;version="0",\
javax.management.remote;version="0",\
javax.management.remote.rmi;version="0",\
javax.management.timer;version="0"

Now when i try to work with ModelMBean Interface i still get a java.lang.NoClassDefFoundError: javax/management/modelmbean/ModelMBean.

Does anybody have an idea where the problem is???

Regards Dani
Re: java.lang.NoClassDefFoundError: javax/management/ObjectName [message #990520 is a reply to message #990249] Wed, 12 December 2012 20:54 Go to previous message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 21
Registered: April 2012
Location: Zürich
Junior Member
One (hopefully) last correction.

I somehow got it all wrong before. Problem is solved by adding all needed packages to the "org.osgi.framework.bootdelegation" located under "$SERVER_HOME/configuration/java6-server.profile".

regards
dani
Previous Topic:3.6.0.M05 released
Next Topic:3.6.0.RC1 available
Goto Forum:
  


Current Time: Sun Dec 21 23:15:57 GMT 2014

Powered by FUDForum. Page generated in 0.02828 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software