CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

Dinomir
Dear All
I am getting an error when I call:
CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
I am using maven and the 2.5-Snapshot geotools. This particular error
was triggered when playing around with the FeatureRasterizer that has
been posted on this forum last month. The stack trace output is at the
end of this email.
I do have gt-referencing in my dependencies, as well as gt-epsg-hsql,
which results in their correct preseence in the build path
(gt-referencing-2.5-SNAPSHOT.jar and gt-epsg-hsql-2.5-SNAPSHOT.jar).
There is not other gt-epsg-... jar present.
I have tried to comment out gt-epsg-hsql...jar out and add
gt-epsg-wkt-... jar. maven dependencies result in the presence of both
in the path, as gt-imagemosaic requires epsg-hsql (that's what maven
tells me). However, the code works!
Is it possible that there is a bug in the 2.5-SNAPSHOT of the hsql
library? EPSG:4326 seems to be such an omnipresent CRS that someone
would have noticed... What could be the problem?
Thanks
Martin

My Stack trace:

Feb 3, 2009 2:44:12 PM
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory isAvailable
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG
database.
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
    at
org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
    at
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
    at
org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
    at
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:191)
    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:196)
    at
org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:176)
    at
org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:451)
    at
org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:88)
    at
org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
    at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182)
    at org.geotools.referencing.CRS.decode(CRS.java:420)
    at org.geotools.referencing.CRS.decode(CRS.java:348)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.testRasterizer(TestFeatureRasterizer.java:75)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.main(TestFeatureRasterizer.java:36)
Caused by: java.sql.SQLException: error in script file line: 2 File
input/output errorerror java.io.FileNotFoundException:
C:\DOCUME~1\MARTIN~1\LOCALS~1\Temp\Geotools\Databases\HSQL\EPSG.data
(The system cannot find the file specified) opening file - file
/C:/DOCUME~1/MARTIN~1/LOCALS~1/Temp/Geotools/Databases/HSQL/EPSG.data in
statement [CREATE CACHED TABLE EPSG_ALIAS]
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory.createBackingStore(ThreadedHsqlEpsgFactory.java:313)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:384)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:421)
    ... 19 more
Feb 3, 2009 2:44:12 PM
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory isAvailable
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG
database.
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
    at
org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
    at
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
    at
org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
    at
org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:436)
    at
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:364)
    at
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:143)
    at
org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:216)
    at
org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactory(ReferencingFactoryFinder.java:436)
    at
org.geotools.referencing.factory.epsg.LongitudeFirstFactory.createBackingStore(LongitudeFirstFactory.java:189)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
    at
org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
    at
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
    at
org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
    at
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:191)
    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:196)
    at
org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:176)
    at
org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:451)
    at
org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:88)
    at
org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
    at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182)
    at org.geotools.referencing.CRS.decode(CRS.java:420)
    at org.geotools.referencing.CRS.decode(CRS.java:348)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.testRasterizer(TestFeatureRasterizer.java:75)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.main(TestFeatureRasterizer.java:36)
Caused by: java.sql.SQLException: error in script file line: 2 File
input/output errorerror java.io.FileNotFoundException:
C:\DOCUME~1\MARTIN~1\LOCALS~1\Temp\Geotools\Databases\HSQL\EPSG.data
(The system cannot find the file specified) opening file - file
/C:/DOCUME~1/MARTIN~1/LOCALS~1/Temp/Geotools/Databases/HSQL/EPSG.data in
statement [CREATE CACHED TABLE EPSG_ALIAS]
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory.createBackingStore(ThreadedHsqlEpsgFactory.java:313)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:384)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:421)
    ... 30 more
Feb 3, 2009 2:44:12 PM
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory isAvailable
WARNING: Unavailable authority factory: European Petroleum Survey Group
org.opengis.referencing.FactoryException: Failed to connect to the EPSG
database.
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:428)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
    at
org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
    at
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
    at
org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
    at
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:224)
    at
org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:216)
    at
org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactory(ReferencingFactoryFinder.java:436)
    at
org.geotools.referencing.factory.epsg.LongitudeFirstFactory.createBackingStore(LongitudeFirstFactory.java:189)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:132)
    at
org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:233)
    at
org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119)
    at
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:668)
    at
org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:500)
    at
org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:191)
    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:196)
    at
org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:176)
    at
org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:451)
    at
org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:88)
    at
org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
    at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:182)
    at org.geotools.referencing.CRS.decode(CRS.java:420)
    at org.geotools.referencing.CRS.decode(CRS.java:348)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.testRasterizer(TestFeatureRasterizer.java:75)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.main(TestFeatureRasterizer.java:36)
Caused by: java.sql.SQLException: error in script file line: 2 File
input/output errorerror java.io.FileNotFoundException:
C:\DOCUME~1\MARTIN~1\LOCALS~1\Temp\Geotools\Databases\HSQL\EPSG.data
(The system cannot find the file specified) opening file - file
/C:/DOCUME~1/MARTIN~1/LOCALS~1/Temp/Geotools/Databases/HSQL/EPSG.data in
statement [CREATE CACHED TABLE EPSG_ALIAS]
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at org.hsqldb.jdbc.jdbcDataSource.getConnection(Unknown Source)
    at
org.geotools.referencing.factory.epsg.ThreadedHsqlEpsgFactory.createBackingStore(ThreadedHsqlEpsgFactory.java:313)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:384)
    at
org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:421)
    ... 28 more
org.opengis.referencing.NoSuchAuthorityCodeException: Authority "EPSG"
is unknown or doesn't match the supplied hints. Maybe it is defined in
an unreachable JAR file?
    at
org.geotools.referencing.factory.ManyAuthoritiesFactory.noSuchAuthority(ManyAuthoritiesFactory.java:488)
    at
org.geotools.referencing.factory.ManyAuthoritiesFactory.getAuthorityFactory(ManyAuthoritiesFactory.java:466)
    at
org.geotools.referencing.factory.ManyAuthoritiesFactory.getCRSAuthorityFactory(ManyAuthoritiesFactory.java:547)
    at
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:798)
    at
org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:729)
    at
org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
    at org.geotools.referencing.CRS.decode(CRS.java:420)
    at org.geotools.referencing.CRS.decode(CRS.java:348)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.testRasterizer(TestFeatureRasterizer.java:75)
    at
ch.uzh.geo.tomko.noaa.tools.rasterizer.TestFeatureRasterizer.main(TestFeatureRasterizer.java:36)

--
Martin Tomko
Postdoctoral Research Assistant
   
Geographic Information Systems Division
Department of Geography
University of Zurich - Irchel
Winterthurerstr. 190
CH-8057 Zurich, Switzerland

email: [hidden email]
site: http://www.geo.uzh.ch/~mtomko
mob: +41-788 629 558
tel: +41-44-6355256
fax: +41-44-6356848


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

Dinomir
One more detail:
I looked in my TEMP dir as per the wiki entry from Jody:
http://docs.codehaus.org/display/GEOTDOC/EPSG+HSQL+Plugin
I can see only

    * EPSG.properties
    * EPSG-script

EPSG-data is missing.

Any idea what can be the reason?
Thanks
Martin


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Resolved: CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

Dinomir
In reply to this post by Dinomir
I solved it by deleting ALL the old EPSG files, as suggested in the
wiki, and that helped. Hm...
Martin

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

jody.garnett
In reply to this post by Dinomir


On Wed, Feb 4, 2009 at 1:00 AM, Martin Tomko <[hidden email]> wrote:
Dear All
I am getting an error when I call:
CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
I am using maven and the 2.5-Snapshot geotools. This particular error
was triggered when playing around with the FeatureRasterizer that has
been posted on this forum last month. The stack trace output is at the
end of this email.
I do have gt-referencing in my dependencies, as well as gt-epsg-hsql,
which results in their correct preseence in the build path
(gt-referencing-2.5-SNAPSHOT.jar and gt-epsg-hsql-2.5-SNAPSHOT.jar).
There is not other gt-epsg-... jar present.
I have tried to comment out gt-epsg-hsql...jar out and add
gt-epsg-wkt-... jar. maven dependencies result in the presence of both
in the path, as gt-imagemosaic requires epsg-hsql (that's what maven
tells me). However, the code works!

It should be able to do something as long as their is an epsg jar on the path; my understanding is that it works better if epsg-hsql is used (I switched over to using this for udig recently). I had to putt the force x y system property on for it to work for me :-P but other than that I am working okay.

Given that you are using 2.5.x - why not try the latest stable release?

Is it possible that there is a bug in the 2.5-SNAPSHOT of the hsql
library? EPSG:4326 seems to be such an omnipresent CRS that someone
would have noticed... What could be the problem?

Sounds like you are using maven; so you already have the hsql driver around right?
Jody


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
Reply | Threaded
Open this post in threaded view
|

Re: CRS.decode : Unavailable authority factory: European Petroleum Survey Group (geotools 2.5-SNAPHOT)

Dinomir
Dear Jody,
thanks for your reply. The issue has been resolved, following your hints
in the geotools how-to: I had to delete the temp files created by
epsg-hsql from previous gt (2.4) builds. All was fine afterwards.

Thanks anyway,
Martin

Jody Garnett wrote:

>
>
> On Wed, Feb 4, 2009 at 1:00 AM, Martin Tomko <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Dear All
>     I am getting an error when I call:
>     CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");
>     I am using maven and the 2.5-Snapshot geotools. This particular error
>     was triggered when playing around with the FeatureRasterizer that has
>     been posted on this forum last month. The stack trace output is at the
>     end of this email.
>     I do have gt-referencing in my dependencies, as well as gt-epsg-hsql,
>     which results in their correct preseence in the build path
>     (gt-referencing-2.5-SNAPSHOT.jar and gt-epsg-hsql-2.5-SNAPSHOT.jar).
>     There is not other gt-epsg-... jar present.
>     I have tried to comment out gt-epsg-hsql...jar out and add
>     gt-epsg-wkt-... jar. maven dependencies result in the presence of both
>     in the path, as gt-imagemosaic requires epsg-hsql (that's what maven
>     tells me). However, the code works!
>
>
> It should be able to do something as long as their is an epsg jar on
> the path; my understanding is that it works better if epsg-hsql is
> used (I switched over to using this for udig recently). I had to putt
> the force x y system property on for it to work for me :-P but other
> than that I am working okay.
>
> Given that you are using 2.5.x - why not try the latest stable release?
>
>     Is it possible that there is a bug in the 2.5-SNAPSHOT of the hsql
>     library? EPSG:4326 seems to be such an omnipresent CRS that someone
>     would have noticed... What could be the problem?
>
>
> Sounds like you are using maven; so you already have the hsql driver
> around right?
> Jody
>


-


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users