Hello-

New to geoserver, postgres and openlayers...

I'm building an opengeo web map tool using postgis, geoserver and openlayers. 
My postgis db contains both vector and raster data and I want to access the 
rasters from the db and publish as WCS to OpenLayers via geoserver.

I've followed the tutorial to given here: 
http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I'm using the examples exactly as written (except for username, passwd, 
dbname...) and it all works great up until I get to the "Importing the image 
data" section and type in the command below:

java -jar 
/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-11.0.jar 
import  -config 
/usr/local/tomcat/webapps/geoserver/data/coverages/osm.postgis.xml 
-spatialTNPrefix tileosm -tileTNPrefix tileosm -dir tiles -ext png

I am getting the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:649)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.geotools.gce.imagemosaic.jdbc.Import.start(Import.java:367)
at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(Toolbox.java:46)

I've checked and rechecked the jdbcURL in my connect.postgis.xml.inc file (it's 
correct). I've checked and re-checked the username and password of the postgis 
database (both correct as well).

For a different application I wrote a simple java tool to query the database 
and it works using the same URL, username and password that are in the 
connect.postgis.xml.inc file.

Am I missing something in my ~/tomcat/webapps/geoserver directory structure?

Really appreciate any insight you can offer.

Thanks in advance.

Stephanie

Oh...config files are here....

1> connect.postgis.xml.inc

<connect>
<!-- value DBCP or JNDI -->
<dstype value = "DBCP"/>
<!-- <jndiReferenceName value=""/>-->
<username value="myusername"/>
<password value="mypasswd"/>
<jdbcURL value="jdbc:postgresql://localhost:5432/mydb" />
<driverClassName value="org.postgresql.Driver"/>
<maxActive value="10"/>
<minIdle value="0"/>
</connect>

2. mapping.postgis.xml.inc

<!-- possible values: universal,postgis,db2,mysql,oracle -->
<spatialExtension name="postgis"/>
<mapping>
    <masterTable name="mosaic" >
      <coverageNameAttribute name="name"/>
      <maxXAttribute name="maxX"/>
      <maxYAttribute name="maxY"/>
      <minXAttribute name="minX"/>
      <minYAttribute name="minY"/>
      <resXAttribute name="resX"/>
      <resYAttribute name="resY"/>
      <tileTableNameAtribute  name="TileTable" />
      <spatialTableNameAtribute name="SpatialTable" />
    </masterTable>
    <tileTable>
      <blobAttributeName name="data" />
      <keyAttributeName name="location" />
    </tileTable>
    <spatialTable>
      <keyAttributeName name="location" />
      <geomAttributeName name="geom" />
      <tileMaxXAttribute name="maxX"/>
      <tileMaxYAttribute name="maxY"/>
      <tileMinXAttribute name="minX"/>
      <tileMinYAttribute name="minY"/>
    </spatialTable>
</mapping>

3. osm.postgis.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ImageMosaicJDBCConfig [
  <!ENTITY mapping PUBLIC "mapping"  "mapping.postgis.xml.inc">
  <!ENTITY connect PUBLIC "connect"  "connect.postgis.xml.inc">]>
  <config version="1.0">
  <coverageName name="osm"/>
  <coordsys name="EPSG:4326"/>
  <!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic -->
  <scaleop  interpolation="1"/>
  <verify cardinality="false"/>
  &mapping;
  &connect;
</config>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to