It was created to work in Spring and Eclipse when using OSGi ... these systems 
isolate code into different classloaders. GeoTools has a hard time searching 
for its META-INF/services folder in these cases.

I am getting very tired of the GeoTools factory registery system myself and 
would prefer a NetBeans style NLookup class with different backends for 
different environments; kind of like how we handle logging.

Anyone have resources to tackle this problem?

-- 
Jody Garnett

On Thursday, 31 March 2011 at 10:36 PM, [email protected] wrote: 
> Hi Jason,
> 
> i think this is a known issue, see my comment for a workaround:
> http://jira.codehaus.org/browse/GEOT-2817
> ...not sure why the method FactoryRegistry.getClassLoaders() was created 
> in the first place ?
> 
> Jan
> On 31/03/2011 13:19, Jason Ferguson wrote:
> > No special games with classloaders. The application is a GWT-based map
> > display, this code is specifically having trouble during the file
> > upload of the shapefile.
> > 
> > The zip file is uploaded via Servlet to a ShapefileServiceImpl, which
> > then unzips it. The file name of whichever file ends in ".shp" is
> > passed to the above method.
> > 
> > On Thu, Mar 31, 2011 at 6:12 AM, Jody Garnett<[email protected]> wrote:
> > > Perhaps you would like to step through the code in a debugger. Make a 
> > > check
> > > to see what value is being produced by common factory finder by stepping
> > > into the method. Take a careful look at the class, its id and its
> > > classloader.
> > > I think you will find that it is coming out of a different classloader, or
> > > jar, than the DataUtilities method that is being called.
> > > Are you playing any games with classloaders in your own code?
> > ------------------------------------------------------------------------------
> > Create and publish websites with WebMatrix
> > Use the most popular FREE web apps or write code yourself;
> > WebMatrix provides all the features you need to develop and
> > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> > _______________________________________________
> > Geotools-gt2-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself; 
> WebMatrix provides all the features you need to develop and 
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to