Hi, If I understoot the problem correctly, the solution could be to declare the DynamicImport-package manifest header in the bundle that contains the JADE-Core and specify * as its value. This should allow the JADE-Core bundle to load classes from all exported packages. Let me know if this works. In case it does :-), would you be interested in making your work available to the community. I think it could be useful for many people.
Bye Giovanni -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stefano Lenzi Sent: martedì 17 aprile 2007 18.55 To: felix-dev@incubator.apache.org; [EMAIL PROTECTED] Subject: [jade-develop] Felix/OSGi and JADE Second Part Hi All, I had a chance to clarify my idea and to do more tests. Here is what I got and I hope that you can help me to find a solution. GOAL: The Goal is to run JADE over OSGi so that agents can be installed as bundle and executed when the bundle starts. APPROCH: I have created a JADE-Core bundle that contains all the library used by JADE(e.g.: core, toosl and MTPs). Then I have created a JADE-Example bundle that contains all the example that came with JADE and it also contains a BundleActivator that during the start method executes the setup of the JADE Platform and launches all the agent required by the example. THE PROBLEM: During the start up of the JADE Platform I get the Class Not Found error message that states: "GRAVE: Cannot create agent Buyer-Alpha: Class examples.bookTrading.BookBuyerAgent for agent ( agent-identifier :name [EMAIL PROTECTED]:1099/JADE ) not found [nested java.lang.ClassNotFoundException: *** Class 'examples.bookTrading.BookBuyerAgent' was not found because bundle 12 does not import 'examples.bookTrading' even though bundle 13 does export it. Additionally, the class is also available from the system class loader. There are two fixes: 1) Add an import for 'examples.bookTrading' to bundle 12; imports are necessary for each class directly touched by bundle code or indirectly touched, such as super classes if their methods are used. 2) Add package 'examples.bookTrading' to the 'org.osgi.framework.bootdelegation' property; a library or VM bug can cause classes to be loaded by the wrong class loader. The first approach is preferable for preserving modularity. ***]" DEPLOY AND RUNTIME INFORMATION: As you already know I have 2 bundles: JADE-Core and JADE-Examples. The former contains the Boot class that is the class in charge of the startup of the JADE platform, the latter contains some of the Agent that I want to run on the JADE Platform. JADE-Examples imports all the packages exported by JADE-Core, thus the Boot class. But during the JADE Platform startup (made by Boot and other classes) the method Class.loadForName() is invoked and it returns the the above error. TIP or IDEA? Stefano "Kismet" Lenzi P.S.: Sorry for the long post... If you want I can give you more details... P.P.S.: It's my first Class Loading headache :S P.P.P.S.: As you can see I have cross posted the message to Felix and JADE _______________________________________________ jade-develop mailing list [EMAIL PROTECTED] https://avalon.cselt.it/mailman/listinfo/jade-develop UNSUBSCRIBE INSTRUCTIONS AT http://jade.tilab.com/community-mailinglist.htm -------------------------------------------------------------------- CONFIDENTIALITY NOTICE This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to [EMAIL PROTECTED] Thank you www.telecomitalia.it --------------------------------------------------------------------