This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Problems to setup transitive dependency across bundlesPage Title Module

Problems to setup transitive dependency across bundles

Sep 8th, 2008, 07:58 AM

I have maven project with multiple modules that I want to turn into OSGi bundles and deploy to the S2AP to be available to web modules. In order to follow the migration steps carefully, I started with one exported service from one module and created a new project with a simple web module to test it.

Having the Eclipse AP tool to deploy the web module, I received a classpath not found error from the installed bundle. I did not understand why the class loader was not able to find a class that should be available through the spring library, since I included the <Import-Library: org.springframework.spring;version="[2.5.4,3.0)"> header in the manifest file. To get rid of this, I included one Import-Package after every successive complaint from the class loader. So far, my manifest file looks like this:

But from the last error report (see below) I see that now the required dependency comes from a spring bundle, not from the bundle I deployed. I certainly missed the point to set up this the right way. I also found a discussion topic having a similar issue: http://www.springsource.com/beta/applicationplatform/comments.php?DiscussionID=216&page=1#Item_0

My question: where in the documentation or discussions can I look for a missing step on my setup?

Just out of curiosity, are you certain you've properly copied the Hibernate library (e.g., org.hibernate.ejb-library-3.3.2.GA.libd) and all corresponding bundles to the correct locations in the Platform (e.g., repository/libraries/usr and repository/bundles/usr, respectively)?

After doing so, did you restart the Platform as well?

Regards,

Sam

Comment

Well, I missed that. At the time of my previous question, I did not realize the library has only references to bundles actually installed under repository/bundles/usr. But, yes, now I assured -> I properly copied the Hibernate library (e.g., org.hibernate.ejb-library-3.3.2.GA.libd) and all corresponding bundles to the correct locations in the Platform (e.g., repository/libraries/usr and repository/bundles/usr, respectively), and also restarted Eclipse and the Platform (also using Eclipse -clean option). But the error remains: