I had worked around this by copying the db2 jar files to
<JRE_HOME>/lib/ext although I understand that this is not recommended.
I'll try modifying the POM.
Should I be able to run the tests in Eclipse? Anything special that has
to be done?
Strangely, the testcase appears to be failing in executing the query for
features.size() although this works fine if I put the same test in a
small Eclipse test program. I'm not sure why it is reporting
java.io.IOException for a database problem. This is part of the trace:
*Running org.geotools.data.db2.DB2SpatialFiltersOnlineTest
Jan 03, 2017 6:04:02 PM org.geotools.data.db2.DB2TestUtil enableDB
INFO: -1013|GSE1013N The database is already enabled for spatial
operations.
created features
Tests run: 11, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 77.624
sec <<<
FAILURE! - in org.geotools.data.db2.DB2SpatialFiltersOnlineTest
testGeometryCollection(org.geotools.data.db2.DB2SpatialFiltersOnlineTest)
Time
elapsed: 4.079 sec <<< ERROR!
java.lang.RuntimeException: java.io.IOException
at com.ibm.db2.jcc.am.dd.a(dd.java:741)
*** several lines removed ***
at com.ibm.db2.jcc.am.po.gc(po.java:739)
at com.ibm.db2.jcc.am.po.executeQuery(po.java:708)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Dele
gatingPreparedStatement.java:96)*
On 1/4/2017 11:28 AM, Christian Mueller wrote:
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
<mailto: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
<mailto: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
<mailto: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
<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
<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
<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
<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
<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
<mailto:GeoTools-GT2-Users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
<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
---
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