[Geoserver-devel] Has the MySQL data source been broken

I've change the code in MySQLDataStoreFactory.createDataStore to pass the database name instead of the namespace name into the constructor of the DataStore - this stops it adding the http... Namespace as the table name in the SQL which gave the error. However, it now doesn't return any data.

I have put a breakpoint in just before it creates the FeatureReader and the db connection has the correct database name and the SQL statement is correct (it works if I cut and past from the debugger to MySQL query browser) but I don't get any data shown on the map, I can see it loading the record in the StreamingRenderer - but I haven't got time to look any further today.

Any comments might help me find it quicker tomorrow.

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw
Technical Design Authority - Information Solutions Consultancy
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407
Fax: +44 (0) 1372 740055
Mob: 07740 817586
E-mail: richard.shaw@anonymised.com

www.atkinsglobal.com/its

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com]
Sent: 10 November 2006 21:08
To: Shaw, Richard A
Cc: geoserver-devel@lists.sourceforge.net
Subject: Re: [Geoserver-devel] Has the MySQL data source been broken

Probably. I'm the maintainer for MySQL, and I've been very negligent.
That's why it's a download and not included in GeoSever by default.

The namespace thing is a bit odd, though actually I remember there needs to be some work on namespaces.

For the second, turn on 'fine' logging and see what the sql sent to the database actually is, and how that lines up with the encoder.

None of this should be too hard to fix, I can try to find some time to fix it myself, or you can take a shot at it, as it sounds like you've got some experience with the ms-sql now. I'd be happy to direct you and help you work through error messages.

best regards,

Chris

Shaw, Richard A wrote:

I've just installed the geoserver 1.4.0 RC3 and I get 2 errors with
the MySQL datasource -

The first is that it seems to be using the namespace that I put my
datasource into as the table name so I have to ensure that the
namespace and the tablename match,

After doing this the second error is -

DarlingtonITN:links
org.geotools.data.DataSourceException: SQL Error building FeatureType
for links Syntax error or access violation message from server: "You
have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
'://www.atkinsglobal.com/darlington.links WHERE 0=1' at line 1"

I need to use 1.4.0 because the SQL Server data source that I have
created was done from the latest source code and will not work with
1.3.0

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

*Richard Shaw*
Technical Design Authority - Information Solutions Consultancy
Intelligent Transport Systems

*Atkins* *Highways and Transportation* Woodcote Grove, Ashley Road,
Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407
Fax: +44 (0) 1372 740055
Mob: 07740 817586
E-mail: richard.shaw@anonymised.com

_www.atkinsglobal.com/its_ <http://www.atkinsglobal.com/its&gt;

*This email and any attached files are confidential and copyright
protected. If you are not the addressee, any dissemination of this
communication is strictly prohibited. Unless otherwise expressly
agreed in writing, nothing stated in this communication shall be
legally
binding.* <http://www.blackspider.com/&gt;

!DSPAM:1003,45544b05188487731818748!

----------------------------------------------------------------------
--

----------------------------------------------------------------------
--- Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
42

!DSPAM:1003,45544b05188487731818748!

----------------------------------------------------------------------
--

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:1003,45544b05188487731818748!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?4318150)

Shaw, Richard A ha scritto:

I've change the code in MySQLDataStoreFactory.createDataStore to pass
the database name instead of the namespace name into the constructor
of the DataStore - this stops it adding the http... Namespace as the
table name in the SQL which gave the error. However, it now doesn't
return any data.

I have put a breakpoint in just before it creates the FeatureReader
and the db connection has the correct database name and the SQL
statement is correct (it works if I cut and past from the debugger to
MySQL query browser) but I don't get any data shown on the map, I can
see it loading the record in the StreamingRenderer - but I haven't
got time to look any further today.

Interesting. Try and do two things:
* try a wfs query against the datastore. Do you get results?
   If not, there is something really wrong in the datastore itself.
* if you get results, you're probably having a mismatch between
   CRS geoserver thinks the data is in, and the actual CRS. May it be?
   That would explain why you don't see data.
   Another reason could be an inconsistent symbolizer (polygon symbolizer
   and only line data) or some rule in the SLD that prevents
   visualization (scale limits for example).

Hope this helps
Andrea Aime

There's a chance that MySQL never got updated to properly use CRS stuff. I can check in to this later today, figure out where the problems in MySQL might be, and point to the correct way that they are done in PostGIS.

MySQL is remarkably similar to PostGIS, so the easiest thing to do is just compare against it. PostGIS has been kept much more up to date.

But yes, let us know about the WFS request.

best regards,

Chris

Andrea Aime wrote:

Shaw, Richard A ha scritto:

I've change the code in MySQLDataStoreFactory.createDataStore to pass
the database name instead of the namespace name into the constructor
of the DataStore - this stops it adding the http... Namespace as the
table name in the SQL which gave the error. However, it now doesn't
return any data.

I have put a breakpoint in just before it creates the FeatureReader
and the db connection has the correct database name and the SQL
statement is correct (it works if I cut and past from the debugger to
MySQL query browser) but I don't get any data shown on the map, I can
see it loading the record in the StreamingRenderer - but I haven't
got time to look any further today.

Interesting. Try and do two things:
* try a wfs query against the datastore. Do you get results?
   If not, there is something really wrong in the datastore itself.
* if you get results, you're probably having a mismatch between
   CRS geoserver thinks the data is in, and the actual CRS. May it be?
   That would explain why you don't see data.
   Another reason could be an inconsistent symbolizer (polygon symbolizer
   and only line data) or some rule in the SLD that prevents
   visualization (scale limits for example).

Hope this helps
Andrea Aime

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:1003,45587e09187551995013331!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org