Hi,

I've been developing with geotools for a while now, and have had much
success with it. However, I'm now in the process of porting our
mapping code into a JSR-168 compatible web portlet, under Gridsphere
(which runs on Apache Tomcat).

My code (which simply reads a shapefile, renders it with some styling
info, and saves it as a PNG image, with associated imagemap HTML code)
works fine as an application, but crashes when run in Gridsphere (and
hence, Tomcat).

The line of code that causes the problem is simple:


LiteRenderer theLiteRenderer = new LiteRenderer(theMapContext);


The following code (in its place) will also cause the same crash:


StreamingRenderer theStreamingRenderer = new StreamingRenderer();



The problem is the following (I've cut the stack trace at the point
where my code is creating the LiteRenderer):


WARNING: Failed to bind a "jdbc/EPSG" entry.
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
        at org.apache.naming.NamingContext.bind(NamingContext.java:842)
        at org.apache.naming.NamingContext.bind(NamingContext.java:170)
        at org.apache.naming.NamingContext.bind(NamingContext.java:186)
        at org.apache.naming.SelectorContext.bind(SelectorContext.java:170)
        at javax.naming.InitialContext.bind(InitialContext.java:359)
        at 
org.geotools.referencing.factory.epsg.DefaultFactory.createFactory(DefaultFactory.java:297)
        at 
org.geotools.referencing.factory.epsg.DefaultFactory.createBackingStore(DefaultFactory.java:328)
        at 
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:188)
        at 
org.geotools.referencing.factory.BufferedAuthorityFactory.isReady(BufferedAuthorityFactory.java:206)
        at 
org.geotools.referencing.factory.DeferredAuthorityFactory.isReady(DeferredAuthorityFactory.java:176)
        at 
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:86)
        at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:793)
        at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:787)
        at 
javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:491)
        at 
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:126)
        at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:223)
        at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:202)
        at 
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:95)
        at 
org.geotools.referencing.FactoryFinder.getCoordinateOperationAuthorityFactory(FactoryFinder.java:405)
        at 
org.geotools.referencing.operation.AuthorityBackedFactory.getAuthorityFactory(AuthorityBackedFactory.java:124)
        at 
org.geotools.referencing.operation.AuthorityBackedFactory.isReady(AuthorityBackedFactory.java:238)
        at 
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:86)
        at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:793)
        at javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:787)
        at 
javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:491)
        at 
org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:126)
        at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:223)
        at 
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:202)
        at 
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:95)
        at 
org.geotools.referencing.FactoryFinder.getCoordinateOperationFactory(FactoryFinder.java:280)
        at 
org.geotools.renderer.lite.LiteRenderer.<clinit>(LiteRenderer.java:148)
        at 
moses.demonstrator.portlets.SelectionPortlet.createPNGImage(SelectionPortlet.java:329)



It would appear to be a problem with the JDBC/EPSG name... I don't
know if I need to make some kind of configuration change to Tomcat, or
do something within the Geotools code.

I noticed that Pascal Neis posted what appears to be an identical
query to this on the 3rd of May on this mailing list, but I don't
think any replies were forthcoming.

It'd be really great if someone could give us some pointers, as we
need to demo this software at SuperComputing 2006, in Tampa, FL, in a
few weeks time, so we're really pressed for time.

Thanks!!

Dr Paul Townend
University of Leeds

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to