Skip to main content



      Home
Home » Eclipse Projects » Virgo » ClassNotFoundException inside PAR
ClassNotFoundException inside PAR [message #588074] Tue, 13 July 2010 12:30 Go to next message
Eclipse UserFriend
We are trying to use Dozer in an OSGi application and are experiencing class path visibility issues. The objects are exported in one of our manifests; however, Dozer bundle does not import the object types being mapped (via it's manifest). According to some other threads on the Spring dm Server forum this should be addressed by using a PAR. We checked and the types are imported through the PAR's synthetic context; however, we still get a runtime exception:

org.dozer.MappingException: java.lang.ClassNotFoundException: ca.company.object.

What is the suggested way to address this?

Thanks in advance.

- Paul
Re: ClassNotFoundException inside PAR [message #588088 is a reply to message #588074] Tue, 13 July 2010 12:53 Go to previous messageGo to next message
Eclipse UserFriend
You might need to import dozer classes in your bundle similar to hibernate set-up

http://www.eclipse.org/virgo/documentation/virgo-documentati on-2.1.0.M02-incubation/docs/virgo-programmer-guide/html/ch0 8.html#common-libraries-hibernate

i.e. import-scope:=application should do the trick for you.
FIXED - Re: ClassNotFoundException inside PAR [message #590414 is a reply to message #588074] Tue, 13 July 2010 16:15 Go to previous messageGo to next message
Eclipse UserFriend
K, I resolved my issue.

While debugging the issue I noticed that the BundleClassLoader that was being used to instantiate the object type inside the dozer bundle had visibility of only the webapp imported components even though it was located inside a PAR where the synthetic context should have caused all included bundle's exports to be imported. Further, the webapp was calling a service (inside a service bundle) that was using dozer and hence this should have been abstracted from the webapp. I'm not sure why this is the case, but adding the dozer (application scope) imports explicitly to the webapp manifest satisfied the classloader.

For reference, this is what I added to both the service and webapp bundle to resolve my issue:
org.dozer;import-scope:=application,
org.dozer.util;import-scope:=application,
ca.company.types;import-scope:=application

Thanks,
- Paul
Re: FIXED - Re: ClassNotFoundException inside PAR [message #590434 is a reply to message #590414] Wed, 14 July 2010 04:32 Go to previous message
Eclipse UserFriend
I would be surprised if there was a bug in the synthetic context bundle. If you are interested, please examine the wiring in the failing case and see if the synthetic context bundle really is in error and raise a bug with details if so.

However glad to see you are in business now!
Previous Topic:ClassNotFoundException inside PAR
Next Topic:Virgo tooling for Eclipse
Goto Forum:
  


Current Time: Wed Jul 23 14:03:18 EDT 2025

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

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

Back to the top