Added by jgarnett, last edited by jgarnett on May 03, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

In order to use the Oracle module you need the proprietary JDBC driver from Oracle.

As of Oracle 10.2 oracle has decided to "seal" its jar files (a security option that can be turned on in the manifest file). This option limits access to package-protected members to classes defined in the package and in the same JAR file.

This means that the only way to create a connection is via a DataSource (and we are not there yet since we still use JDBC Drivers).

Please download a driver from the 10.1.x series in order to avoid the above problem.

Download the Driver and place into the Repository

Unlike most external libraries used in GeoTools, we cannot redistribute this jar. However, you can obtain them from the Oracle website, free of charge, after registering.

Once you download the jar, you should place them in the Oracle Maven repository directory.

mvn install:install-file -Dfile=ojdbc14.jar -DgroupId=com.oracle
   -D artifactId=ojdbc14 -Dversion=10.2.0 -Dpackaging=jar

Switching between Oracle Profiles with oracle.jdbc property

The oracle modules are all set up to work with a pretend "mock" jdbc driver in order to compile. To actually use the real thing you are going to need to set the oracle.jdbc property.

You will need to do this each time on the command line (as of Maven 2.0.4 there is no way to set a property in your setting.xml file that can be used to configure other profiles):

Here is an example that builds eclipse .classpath and .project files using the real driver:

mvn eclipse:eclipse -Doracle.jdbc

If the property is not set the mock jdbc driver will be used.