Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.M7
-
Fix Version/s: UDIG 1.2.M7
-
Component/s: framework
-
Labels:None
Description
As part of going through the dependencies we have the chance to use a different pure java database for our EPSG authority information. Previously we have used the much loved HSQL database - that is very common in java projects; but lacks Transaction independence. This prevents the HSQL database from being a good choice for a local java DataStore.
Recent jdbc-ng work has produce a H2DataStore implementation that would be nice to try out; offering transaction independence etc.. (indeed h2 seems to be hsql version 2).
Issue Links
- depends upon
-
GEOT-2654
Check if H2 database is unpacked
-
!MESSAGE While loading class "org.h2.message.Message", thread
"Thread[Finalizer,8,system]" timed out waiting (5000ms) for thread
"Thread[main,5,main]" to finish starting bundle
"net.refractions.udig.libs_1.2.0 [41]". To avoid deadlock, thread
"Thread[Finalizer,8,system]" is proceeding but
"org.h2.message.Message" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for
bundle "update@../WORKSPACES/jgrass4udigtrunk/udigTrunk/trunk/plugins/net.refractions.udig.libs/"
by thread "main".
at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1073)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:278)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
[...]
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.h2.message.Message.<clinit>(Message.java:36)
at org.h2.engine.Session.finalize(Session.java:279)
Basically the first time you run it an SQL script is called to create and populate a database; since this takes longer then 5000 milliseconds we get a warning (is the process killed?).
By default gt-epsg-h2 will create a database in:
- C:\Users\jodyg\AppData\Local\Temp\Geotools\Databases\EPSG-H2-7.1.0
An issue the following feedback to stout:
Creating cached EPSG database version 7.1.0. This operation may take a few minutes...
In response to this I have:
- packaged up the H2 database produced by the SQL script as part of net.refractions.udig.libs/epsg
- in the activator I now set a system property pointing at the above directory
- this avoids the setup cost; at a cost of around 40megs! Admittedly we will zip up this result; but it will not compress as well as the raw SQL
The alternative is to start up a separate thread to unpack the database ... possibly with a progress monitor? I am going to ask moovida if the above solution (now committed) works first.