In testing I have been practicing creating the H2 database from the
script and recently started failing with the following issue ..

org.opengis.referencing.FactoryException: Unknow axis direction:
"Geocentre > equator/0°E".
        at 
org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateSystemAxis(DirectEpsgFactory.java:1680)
        at 
org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateSystemAxis(BufferedAuthorityFactory.java:739)
        at 
org.geotools.referencing.factory.epsg.DirectEpsgFactory.createAxesForCoordinateSystem(DirectEpsgFactory.java:1732)
        at 
org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateSystem(DirectEpsgFactory.java:1778)
        at 
org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateSystem(BufferedAuthorityFactory.java:571)
        at 
org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateReferenceSystem(DirectEpsgFactory.java:1985)
        at 
org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:781)
        at 
org.geotools.referencing.factory.epsg.DefaultFactoryTest.testCreation(DefaultFactoryTest.java:172)
        ...
Caused by: java.util.NoSuchElementException: Unknow axis direction:
"Geocentre > equator/0°E".
        at 
org.geotools.referencing.cs.DefaultCoordinateSystemAxis.getDirection(DefaultCoordinateSystemAxis.java:928)
        at 
org.geotools.referencing.factory.epsg.DirectEpsgFactory.createCoordinateSystemAxis(DirectEpsgFactory.java:1667)
        ... 29 more





On Mon, Aug 17, 2009 at 2:49 AM, Andrea Aime<aa...@opengeo.org> wrote:

> The method you added is "isUnpacked", right?

You are correct; the method is "isUnpacked" ...

> It seems to me it has a long window of time in which it won't work properly.
> The method just checks the directory has been created, which happens
> right before starting to create the database.
> So for all the time it takes to populate the db (15-30 seconds) that method
> will return an invalid response, the db is not really unpacked
> until everything is done.
>
> A better solution would be to add a marker file when the database
> has been fully created and turned read-only. Checking the existence
> of that file would be a better way to check if the database has
> been unpacked.
>
> That file could also be used as part of the solution that detects
> a database that has not been completely unpacked and is left on
> the disk incomplete, think for example a user killing the process
> while it's unpacking the database.
>
> However there is something I'm not sure how to handle: two
> processes trying to create the same database in parallel.
> I guess another file marking the start of the creation could
> be used as a lock file, along with this recipe:
> http://www.exampledepot.com/egs/java.nio/SetFileLock.html

The marker file is a good idea; uDig was already running into the
problem of two threads trying to create the same database - it
resulted in a "recursive" stack trace and was one of the bugs leading
me on this merry chase.

org.geotools.factory.RecursiveSearchException: Recursive call while
creating a 'LongitudeFirstEpsgDecorator' object.
       at 
org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:665)
       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.next(ServiceRegistry.java:811)
       at org.geotools.resources.LazySet.addNext(LazySet.java:70)
       at org.geotools.resources.LazySet.size(LazySet.java:87)
       at java.util.AbstractCollection.toArray(AbstractCollection.java:119)
       at java.util.ArrayList.<init>(ArrayList.java:131)
       at 
org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:96)
       at 
org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69)
       at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:183)
       at org.geotools.referencing.CRS.decode(CRS.java:421)
       at org.geotools.referencing.CRS.decode(CRS.java:349)
       at 
net.refractions.udig.libs.internal.Activator.configureEPSG(Activator.java:124)
       at net.refractions.udig.libs.internal.Activator$1.run(Activator.java:99)
       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

So even before the second thread got to the file lock; it would be
failing on the above "recursion" test ...
Jody

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to