The spearfish example has been ported to MySQL from the code available for PostGIS.
It is done as un attached file to this page.
I only got it running with these two modifications:
params.put( "port", "3306"); -> params.put( "port", new Integer(3306));
params.put( "dbtype", "mysql"); -> params.put( "dbtype", "postgis");
These two are due to bugs in MySQLDataStoreFactory.canProcess(Map params). I guess it was already late when it got ported from the postgis template
Really,i also met these two bugs.
Use mysql-connector-java-3.1.14-bin.jar, JDBC connector. Since geotools2.0rc1 is distributing mysql-connector-java-3.0.9.jar which does not work with latest versions of mysql say 5.1. (With 3.0.9 Otherwise we will end up with ArrayOutofBounds 40 exception)...
Powered by a free Atlassian Confluence Open Source Project License granted to Codehaus. Evaluate Confluence today.