Plugin classpath [message #661189] |
Wed, 23 March 2011 14:06 |
Thom Hehl Messages: 8 Registered: November 2010 |
Junior Member |
|
|
This takes a bit of explaining.
I am using the echo framework and echo developer studio which is an AJAX-based gui development platform. When I download the echo studio plugin it comes with jetty 6.1.23 to run the web applications inside the eclipse framework.
So the plugins directory under eclipse contains two jar files that support jetty, which we'll just call server and util.
Now I'm running spring framework to supply services to my echo based web application. Inside the java code for the screens, I use spring's bean factory to load items out of my beans xml files. This has all been working fine.
The issue arises because, up until now, I've hardcoded the database connection information into spring's configuration so that I could get up and running. Now I'm trying to transition this to a JNDI lookup.
While this works with no problem under tomcat, which is my deployment system, I'm having a little difficulty getting it to work under jetty in my test environment.
I've pieced together some code from the web that has my jndi definition in the jetty-web.xml file. This requires me to add this to the eclipse run configuration VM parameter: -Djava.naming.factory.initial=org.mortbay.naming.InitialCont extFactory, which, I'm assuming, set's up the jetty stuff to be the source of the JNDI classes.
This class is in a jetty jar called naming, which wasn't deployed with my original plugin. So I went to the web and downloaded all of jetty and grabbed the naming jar and stuck it in my classpath and thought all should be good.
Wrong!!!
It turns out that now the naming context classes can not find the classes contained in the util and server jars that are inside the plugin directory.
I don't really understand this, but it appears somehow that eclipse is actually using two different classpaths, one for my app and one for the plugins. Does this make sense to anyone?
So, when all else fails, push really hard. So I go into my project settings and add jetty server and util jars to my classpath and try again. Now it tells me that the util package is sealed. I did some reading on this and it looks like this is caused by it showing up on the classpath twice.
(I checked the util.jar manifest file and it is not marked as sealed.)
So now I don't really understand what the issue is let alone how to make progress. Please help?
Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.02775 seconds