Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Strange problem when plugin is in jar format (works OK in directory format)
Strange problem when plugin is in jar format (works OK in directory format) [message #81364] Thu, 18 January 2007 02:06 Go to next message
Eclipse UserFriend
Originally posted by: olarte.andres.gmail.com

I have a very simple plugin (basically a wrapping for the log4j lib). It
was only exporting one package:

Export-Package: org.apache.log4j

Everything worked nicely, the PDE build worked great, packaged my plugin in
a jar file, and in it worked. However, I needed an extra package, so I
exported that packaged:

Export-Package: org.apache.log4j,

org.apache.log4j.xml



Now I get a ClassNotFound when running my app. I unzipped the jar into a
directory, and my app works fine again. Any idea why it's like that?

Thanks a lot for any help,

Andres
Re: Strange problem when plugin is in jar format (works OK in directory for [message #81419 is a reply to message #81364] Thu, 18 January 2007 10:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

PDE rutime has issues when you change things because of overzealous caching. The fact that you changed it from a jar -> directory would have caused the cache to be rebuilt. You can change it back again and it should still work. Deleting the launch configuration in PDE and then re-running is enough to get rid of the detritus.

PS It's also possible it's a Log4J issue, and that Log4J is expecting to find a java.io.File in part of the e.g. static{} setup.

Alex.
Re: Strange problem when plugin is in jar format (works OK in directory for [message #81462 is a reply to message #81419] Thu, 18 January 2007 17:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olarte.andres.gmail.com

I think (I'm not sure) that I deleted the config folder and still got the
same problem. I'll try to reproduce it to be sure.

Last night I exported all of the log4j packages, rebuilt my app, and the app
ran ok with the plugin in jar format.

Anyway, thanks a lot for your help, and I'll keep your tips in mind if I run
across this again.


> PDE rutime has issues when you change things because of overzealous
caching. The fact that you changed it from a jar -> directory would have
caused the cache to be rebuilt. You can change it back again and it should
still work. Deleting the launch configuration in PDE and then re-running is
enough to get rid of the detritus.
>
> PS It's also possible it's a Log4J issue, and that Log4J is expecting to
find a java.io.File in part of the e.g. static{} setup.
>
> Alex.
Re: Strange problem when plugin is in jar format (works OK in directory for [message #81495 is a reply to message #81462] Fri, 19 January 2007 03:39 Go to previous message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

You'd need to delete the config folder inside the runtime workspace (assuming that it was failing in the PDE). The easiest way to do this is to delete the launch configuration (Run -> Run... to bring the launch config window up, and then delete your entry).

The other approach is to check the box marked 'clean workspace' and 'clean configuration' on the launch config itself. That way, everything gets cleaned out (though it takes marginally longer to get up and going) but you don't see these kind of caching problems.

Alex.
Previous Topic:Specify packages ... without explicitly identifying their orginating plug-in?
Next Topic:Interruptable socket and stream service?
Goto Forum:
  


Current Time: Thu Nov 21 12:20:27 GMT 2024

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

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

Back to the top