Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » File not found
File not found [message #649398] Wed, 19 January 2011 06:34 Go to next message
Eva Troels is currently offline Eva Troels
Messages: 17
Registered: December 2010
Junior Member
I have an old version of BC4J used by a legacy app that I'm currently am trying to port til a Virgo environment.

As the BC4J libraries are not OSGi ready, I have chosen to put them in the META-INF/lib folder of my application.

One of these libraries tries to load an XML file. I have tried to copy the file to just about every possible directory of my bundle - but still the BC4J library reports that it cannot find the XML file.

I had this working at some point but cannot quite pinpoint what I did in order to break it Sad

I suppose that it is either a bug in the STS tooling???

Or due to some classloader issue..

Any ideas how to proceed?

/Eva
Re: File not found [message #649413 is a reply to message #649398] Wed, 19 January 2011 07:56 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo Iliev
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

I guess you meant WEB-INF/lib?

The problem may be indeed caused by classloader issue. Can you check how the XML is loaded - via classloader or directly from the filesystem?
Re: File not found [message #649445 is a reply to message #649413] Wed, 19 January 2011 09:21 Go to previous messageGo to next message
Eva Troels is currently offline Eva Troels
Messages: 17
Registered: December 2010
Junior Member
Actually, my dependencies are in META-INF/lib (I have the jars added to my bundle classpath):

Bundle-ClassPath: .,
META-INF/lib/bc4j.jar,
META-INF/lib/taglibs-log-1.0.0.jar,
WEB-INF/classes

I don't have the source for the bc4j code Sad

Any suggestions?

I had it working at some point....that's what annoys med the most!

/Eva
Re: File not found [message #649656 is a reply to message #649445] Thu, 20 January 2011 07:03 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta Georgieva
Messages: 242
Registered: October 2010
Senior Member
Hi,

Can you provide the exception that is thrown?

Thanks
Regards
Violeta
Re: File not found [message #649663 is a reply to message #649656] Thu, 20 January 2011 07:58 Go to previous message
Eva Troels is currently offline Eva Troels
Messages: 17
Registered: December 2010
Junior Member
I solved my problem.

I decompiled the bc4j class where the exception was thrown. The class used the servletcontext to locate the resource. But I initialized the BC4J stuff in the top context (outside the servletcontext). Thus, the context was null - and the XML file could not be located...

/Eva
Previous Topic:Virgo ignores OSGI-INF
Next Topic:[virgo kernel] ExtensionsHookConfigurator breaks resource loading in Pax Web/Felix Webconsole
Goto Forum:
  


Current Time: Fri Oct 24 07:59:29 GMT 2014

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

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