I also recall having to set both "passwd" and "password" to get all 
postgis online tests to work.

On 13/11/10 01:51, Justin Deoliveira wrote:
> What does your postgis.propertiles file look like? It seems the error is 
> resulting perhaps because of missing information. Mine looks like this:
>
> port=5432
> database=geotools
> passwd=
> url=jdbc:postgresql://localhost/geotools
> host=localhost
> driver=org.postgresql.Driver
> user=jdeolive
>
> -Justin
>
> 2010/11/12 lv<[email protected]<mailto:[email protected]>>
> I get error when I do J unit test for PostGISTestSetup.
> I have added postgis.properties to C:\Users\Administrator\.geotools
> How to connect to PostGIS?
>
> ------------error message--------------------------------------
>
> Skipping postgis tests, resources not available: 
> org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of 
> class '' for connect URL 'null'
> java.lang.RuntimeException: org.apache.commons.dbcp.SQLNestedException: 
> Cannot create JDBC driver of class '' for connect URL 'null'
>   at org.geotools.jdbc.JDBCTestSupport.isOnline(JDBCTestSupport.java:98)
>   at org.geotools.test.OnlineTestCase.checkAvailable(OnlineTestCase.java:142)
>   at org.geotools.test.OnlineTestCase.run(OnlineTestCase.java:120)
>   at junit.framework.TestSuite.runTest(TestSuite.java:232)
>   at junit.framework.TestSuite.run(TestSuite.java:227)
>   at 
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC 
> driver of class '' for connect URL 'null'
>   at 
> org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
>   at 
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
>   at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
>   at 
> org.geotools.data.jdbc.datasource.AbstractManageableDataSource.getConnection(AbstractManageableDataSource.java:44)
>   at org.geotools.jdbc.JDBCTestSupport.isOnline(JDBCTestSupport.java:93)
>   ... 11 more
> Caused by: java.lang.NullPointerException
>   at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
>   at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
>   at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
>   at java.sql.DriverManager.getDriver(DriverManager.java:253)
>   at 
> org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
>   ... 15 more
>
>
> ------------------------------------------------------------------------------
> Centralized Desktop Delivery: Dell and VMware Reference Architecture
> Simplifying enterprise desktop deployment and management using
> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> client virtualization framework. Read more!
> http://p.sf.net/sfu/dell-eql-dev2dev
> _______________________________________________
> Geotools-devel mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>


-- 
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to