1

I need to access spatial data in MySQL database with Geoserver. Official user manual states: just download package, extract it into WEB-INF/lib directory and all will be OK. Instead, just nothing happens - MySQL option doesn't appear when creating new data source, I can't find any relevant messages in logs and Google doesn't provide a hint.

What do I do:

  1. Download MySQL extension, following recommended link. I have Geoserver version 2.4.3 (uses jre7, downloaded recently). Downloaded archive declares to be of version 2.4.3 (and manual specifically states that versions should match).
  2. Unzip archive and copy it contents to [Geoserver installation directory]\webapps\geoserver\WEB-INF\lib (also tried other paths mentioned in the manual and extension readme, though they don't make any sense - result the same).
  3. Restart Geoserver service (also tried rebooting system), than go to Data -> Stores -> Add new store in Geoserver web interface (logged in as admin). Manual states that MySQL option should be there, but it isn't.

As mentioned, I use Geoserver 2.4.3 (latest at current time), OS is Windows 7 x32. Geoserver is installed as a service and starts automatically.

Logging profile of server is set to VERBOSE_LOGGING, no traces of "mysql" are found. System logs don't contain anything but messages from Service Control Manager about service being started/stopped. Trying to mess with other JARs in the same directory causes Geoserver to fail. There was installed Geoserver 2.1-beta3 some time ago, but current installation is made into different directory.

I'm interested in any advice how to get Geoserver-MySQL combination working, or how to diagnose why it is problematic/impossible.

5
  • Set it to GEOTOOLS_DEVELOPER level logging and restart GepServer - that logs pretty much everything. Is "Mysql" in there anywhere? - Oh, and playing with other JAR files will probably lead to bad stuff happening. You've followed the right steps; it should work. Commented Dec 25, 2013 at 13:46
  • "Currently the MySQL extension is unmaintained and carries unsupported status." - could just be plain broken.
    – BradHards
    Commented Dec 25, 2013 at 23:43
  • @GIS-Jonathan - no good, 'mysql' doesn't appear in full log (or in any file in /logs/ directory). When I go to "add new store", only lines about "ArcGridFormatFactory is availaible." do appear (no ArcGIS extensions were separately installed, but ArcGIS is present in the system). Commented Dec 26, 2013 at 11:46
  • @BradHards - It is possible, but I would like to get some proof for that theory. If it's broken - it's broken, this is also result of some value. But there are no mentions of it either in Google or in logs, and extension version is 2.4.3, at least in the name of archive, which doesn't make much sense in this case. Commented Dec 26, 2013 at 11:51
  • Install one of the other libraries. Try the Oracle one - sourceforge.net/projects/geoserver/files/GeoServer%20Extensions/… - I know that works. If that turns up then your problem is with the library MySQL. Commented Dec 26, 2013 at 12:20

1 Answer 1

1

Using GIS-Jonathan's hint I solved my problem,I could install the oracle extension.

I had accidentally installed the MySQL plugin jar's into the [Geoserver installation directory]\lib directory first.

Then when I added them to the correct directory, but not yet removed them from the upper lib, it still did not work.

I suspect if you added -verbose onto the java start up command you'll find that another mysql jodbc is being loaded first before the one in the WEB-INF\lib.

You will have to adjust your environment path variable to have the plugin jar to be first, or the only jar available.

When I deleted the files that I had added to [Geoserver installation directory]\lib it started working.

I think that maybe you might have not restarted geoserver service after installing into the WEB-INF\lib directory, and when you added them into the other places it "broke" your install

1
  • My bad. Actually, I did (almost) the same mistake, yet I didn't report it here. Yes, Geoserver seems to seek JAR-files in other directories and behaves odd if it finds something unexpected. Found it with procmon. Removing extra JARs solved the problem. Commented Mar 13, 2014 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.