Full story below, but essentially I'm trying to use Geoserver and it needs the class
org.geotools.util.Version, but it can't find it even though I can see it's in the appropriate jar file. Something is fundamentally wrong and I can't understand how anything has worked so far for anyone when things appear so broken or how to fix this.
Background (probably inessential):
I'm trying to use the SLDSelect control in OpenLayers (note that the example http://openlayers.org/dev/examples/SLDSelect.html is also using GeoServer according to the source, which makes this story weirder). I had installed the GeoServer app for Mac via some dmg (can't remember exactly but it doesn't matter) and I was getting an error. I diagnosed wrong and installed Tomcat and the latest
geoserver.war (2.5.1) straight from the website - so now it's platform independent. I got GeoServer working but still got the same error for SLDSelect. I looked closer and eventually delved into the source of Openlayers. I found that in the function OpenLayers.Control.SLDSelect.parseDescribeLayer the variable url was null from which I saw that describeLayer wasn't being formed properly. This lead me to look at the activate function.
Here's where it gets really weird:
When OpenLayers calls activate, it GETs the following URL, as seen in Firebug:
The response to this from GeoServer is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException> org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException: org.geotools.util.Version java.lang.ClassNotFoundException: org.geotools.util.Version org.geotools.util.Version </ServiceException></ServiceExceptionReport>
which seems pretty serious. I copied and extracted
$TOMCAT/webapps/geoserver/WEB-INF/lib/gt-metadata-11.1.jar and found
org/geotools/util as expected. So why can't it find it?
I also got the same error on a slightly older version of the
GeoServer is generally working. OpenLayers is able to request and display polygons from PostGIS over WMS. I even managed a parametrised SQL view. I've restarted my computer and still get the same issue. What could be wrong?
In case it helps, when I start Tomcat I get:
Using CATALINA_BASE: /Library/Tomcat Using CATALINA_HOME: /Library/Tomcat Using CATALINA_TMPDIR: /Library/Tomcat/temp Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home Using CLASSPATH: /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar Tomcat started.
Update: now I'm finding that WFS isn't working in general for similar reasons. When I try making a WFS request, I get
java.lang.ClassNotFoundException: org.geoserver.wfs.WFSInfo$Version. I also see this if I click on one WFS 1.1.0 link on the home page, i.e. a
While I'm at it, in case they're linked (maybe a general JRE problem?) if I click on the WFS link on the left sidebar, I get:
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = srsNameStyle]]
I also can't enable any services for workspaces (I'm not sure how I managed before). When I tick a checkbox (e.g. for WMS), it tells me instantly that my session has timed out when it definetely hasn't. Before, it would let me tick, but once I clicked 'Save' it would show a
java.lang.reflect.InvocationException or something at the top and not save.
Basically all my installations seem completely broken.