gt-jdbc-oracle OracleDateConverterFactory static initialiser throws if
ojdbc5.jar is absent
-------------------------------------------------------------------------------------------
Key: GEOT-2527
URL: http://jira.codehaus.org/browse/GEOT-2527
Project: GeoTools
Issue Type: Bug
Components: data jdbc-ng
Reporter: Ben Caradoc-Davies
Priority: Critical
Attachments: OracleDateConverterFactory.patch
If gt-jdbc-oracle is on the path and ojdbc5.jar is not, GeoServer is crippled
because OracleDateConverterFactory static initialiser block throws an
exception, even when no configured feature types use Oracle. Death by SPI.
Failure occurs when a built release bundle includes Oracle support. User
deploys without Oracle ojdbc5.jar. ConverterFactory SPI infrastructure finds
the poisoned OracleDateConverterFactory, and breaks GeoServer.
Moral: static initialisers are run when a class is loaded, so massive caution
is required to not be too eager in loading classes that may not be present.
This factory is insufficiently lazy.
{code}
Caused by: java.lang.RuntimeException: Could not initialize the oracle date
converter
at
org.geotools.data.oracle.OracleDateConverterFactory.<clinit>(OracleDateConverterFactory.java:46)
... 69 more
Caused by: java.lang.ClassNotFoundException: oracle.sql.DATE
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.geotools.data.oracle.OracleDateConverterFactory.<clinit>(OracleDateConverterFactory.java:39)
... 69 more
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel