Hi
I think the DB2 JDBC driver is not in maven central whilst the Oracle
driver is there.
My practice is to copy the db2 jar files to <JRE_HOME>/lib/ext directory.
A little bit nasty but it works.
Cheers
On Wed, Jan 4, 2017 at 10:00 AM, Ian Turton <ijtur...@gmail.com> wrote:
> The db2 pom should have a profile like this one from the Oracle pom:
>
> <!-- You can then supply -Doracle=true on the command line -->
> <profile>
> <id>oracle.jdbc-true</id>
> <activation>
> <property>
> <name>oracle</name>
> </property>
> </activation>
> <dependencies>
> <dependency>
> <artifactId>ojdbc7</artifactId>
> <groupId>com.oracle</groupId>
> <!-- version specified in root pom -->
> </dependency>
> </dependencies>
> </profile>
>
> to add the dependency with out editing.
>
> It is also probably looking for a db2.properties file in ~/.geotools (or
> similar) - I have a db2.properties.example file in mine which contains
>
> port=50001
> passwd=db2inst1
> user=db2inst1
> url=jdbc\:db2\://localhost\:50001/geotools
> host=localhost
> database=geotools
> driver=com.ibm.db2.jcc.DB2Driver
>
> hope that helps
>
> Ian
>
>
>
> On 3 January 2017 at 23:42, Jody Garnett <jody.garn...@gmail.com> wrote:
>
>> I would add the dependency to the pom.xml
>> <https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-db2/pom.xml>,
>> run mvn eclipse:eclipse, refresh in eclipse ... and expect it to work.
>>
>>
>>
>> --
>> Jody Garnett
>>
>> On 3 January 2017 at 09:53, David Adler <dad...@adtechgeospatial.com>
>> wrote:
>>
>>> When attempting to run the DB2 online test from the Windows command line
>>> like:
>>>
>>> J:\geotools\modules\plugin\jdbc\jdbc-db2>mvn -P online install
>>>
>>> No tests are run and there is the message
>>> Skipping db2 tests, resources not available:
>>> org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
>>> class 'com.ibm.db2.jcc.DB2Driver'
>>> which is probably because the DB2 JDBC driver is not in the classpath.
>>> How do I add this to the classpath for the mvn test run?
>>>
>>> Is it possible to run the online tests from within Eclipse and if so,
>>> where would the JDBC drivers be added to the classpath?
>>>
>>>
>>> ---
>>> This email has been checked for viruses by Avast antivirus software.
>>> https://www.avast.com/antivirus
>>>
>>>
>>> ------------------------------------------------------------
>>> ------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> GeoTools-GT2-Users mailing list
>>> GeoTools-GT2-Users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> GeoTools-GT2-Users mailing list
>> GeoTools-GT2-Users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>
>
> --
> Ian Turton
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
--
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users