Failed to connect to the EPSG database

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Failed to connect to the EPSG database

Jim.CTR.Meyer

Hello,

Any body else encountering the "Failed to connect to the EPSG database" error?

More information for our situation is below...

We are deploying a stateless EJB application in EAR format to Glassfish v3 on Windows (we will also be deploying in Solaris, but have not tried that yet). The application ran fine before we upgraded to the latest version of Glassfish.


Now, a call to CRS.encode("EPSG:4326") fails with the following errors:


  ***


  org.opengis.referencing.FactoryException: Failed to connect to the EPSG database.
  java.sql.SQLException: Failed to get the data source for name "jdbc/EPSG"
  Authority "EPSG" is unknown or doesn't match the supplied hints. Maybe it is defined in an unreachable JAR file?


  ***


However, GeoTools IS successfully creating the EPSG java database in:


  C:\Temp\Geotools\Databases\HSQL\v7.4.0


Once the database is created, it seems that the jar which created it (presumably gt-epsg-hsql) can't even find its own database!!


We assume that it's registering jdbc/EPSG with JNDI, but clearly this is not accessible from within Glassfish v3. We'd love to create a Glassfish JNDI or JDBC pool for the EPSG database and see if that solves the problem, but we have no idea what connection parameters to supply (port, user, password, etc.).


We have a PostgreSQL 8.4 database with PostGIS 1.5.1, so we also tried to download the scripts necessary to create a Postgres EPSG database from
www.epsg.org, but we found that the .zip file on that site was corrupted.


We suspect that Glassfish v3 configuration is causing the problem. In order to even launch our application in Glassfish v3, we had to repackage our ear and move all the library jars to a lib folder within the ear archive. Interestingly, Glassfish v3 no longer supports the use of the CLASSPATH environment variable.


JVM Settinsg => Path Settings from the Glassfish domain admin console reports that it will "Ignore the CLASSPATH environment variable" because it's "not supported in v3"!!


Our ear includes the following geotools "gt" jars:


gt-api-2.5.5.jar
gt-epsg-hsql-2.5.5.jar
gt-main-2.5.5.jar
gt-metadata-2.5.5.jar
gt-referencing-2.5.5.jar
gt-shapefile-2.5.5.jar


We only have one epsg jar in the ear. Our ear includes hsqldb-1.8.0.7.jar

Thanks,
Jim

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users