From: Andrea A. <aa...@op...> - 2006-12-02 16:21:56
|
Christopher Jon Jursa ha scritto: > Hello, > > I am attempting to output an image from a LiteRenderer using Geotools > 2.2-RC3. Hem... it seems you're trying to do something that Geoserver already does? Have you considered building your app on top of it? > I have the same problem that was addressed at > http://www.mail-archive.com/geo...@li.../msg0203 > 1.html. However, I don't understand the poster's solution. > > I am recieving an odd error. Upon the following line of code in my servlet > I recieve a null pointer exception. Stack trace of the NPE please :-) > myLiteRenderer.paint((Graphics2D) g, new Rectangle(0,0,w,h), new > AffineTransform()); > > Also, in my Tomcat command line window, I get the following (first few) > stack trace exceptions. > > ---------------------------------------------------------------------------- > - > Nov 28, 2006 8:01:34 PM null createBackingStore > 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(Unknown Source) > at > org.geotools.referencing.factory.epsg.DefaultFactory.createFactory(De > faultFactory.java:297) > at > org.geotools.referencing.factory.epsg.DefaultFactory.createBackingSto > re(DefaultFactory.java:328) > at > org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingS > tore(DeferredAuthorityFactory.java:188) > at > org.geotools.referencing.factory.BufferedAuthorityFactory.isReady(Buf > feredAuthorityFactory.java:206) > at > org.geotools.referencing.factory.DeferredAuthorityFactory.isReady(Def > erredAuthorityFactory.java:176) > ---------------------------------------------------------------------------- > - > > What is the EPSG? I noticed in my "C:\apache\tomcat\temp" directory, there > is a Databases\Geotools\HSQL directory with ESPG.script, EPSG.backup, > EPSG.data and ESPG.properties files. EPSG information: www.epsg.org Basically it provides the best database of coordinate systems and map projections we can find. > What do I do about this error? Also, can someone explain to me the solution > in the link above? Short term solution is to remove the epsg-hsql module and use epsg-wkt instead, so that you don't have jndi issues... A better solution is to fix the gt2 code, which I do not think has happened so far. Cheers Andrea |