0

I have recently tried to install the GeoServer Metadata extension. In the installation instructions indicates that any required configuration must be made in the servlet container, but what changes must be made?

I downloaded the extension from the GeoServer Download Page, the file name is called geoserver-2.17-SNAPSHOT-metadata-plugin.zip, I extracted these files and placed the JARs in WEB-INF/lib, but when I start the service the following message appears

HTTP 404 Status - Not Found Type Status report message The required resource [/ geoserver] is not available Description The required resource is not available.

I've already done several changes to the code in web.xml file

<servlet>
      <servlet-name>metadata</servlet-name>
      <servlet-class>org.geoserver.community.gs-metadata</servlet-class>
 </servlet>

<servlet-mapping>
     <servlet-name>metadata</servlet-name>
     <url-pattern>/webapps/geoserver/WEB-INF/lib/*</url-pattern>
 </servlet-mapping>

The installation I have is Windows 10, GeoServer 2.17-SNAPSHOT, Apache-Tomcat/8.5.55, Java jre1.8.0_231.

1

I installed SNAPSHOT-metadata-plugin-2017 on my Microsoft Window 7 machine using Geoserver 2.17 and Apache Tomcat 9.0.36. Before staring please make sure that you are using JDK 11.0.2 (x64/86 based on your own OS system type). It's supported completely by both Geoserver 2.17.x and Apache Tomcat 9.x.x as it has been mentioned in geoserver consideration and Apache Tomcat Versions.

Steps:

1. Install JDK 11.0.2 and add /bin folder to windows paths. Then define new variable with name _JAVA_OPTIONS and value -Xmx1024m. Run java -version command in command line to see something like following picture:

enter image description here

2. Download Apache Tomcat 9.x.x from here and install it. Remember to set the JDK 11.0.2 path. It will be ask you while you are installing it.

3. Download Geoserver 2.17 in .war file via this link and copy it into /webapps root directory. By restarting the Apache service a new folder will be generated which is Geoserver application. Now stop Apache Tomcat service again.

4. Download geoserver-2.17-SNAPSHOT-metadata-plugin.zip that is find here. Extract and copy containing .jar files into /webapps/geoserver/WEB-INF/lib route.

Although, Apache Tomcat will start fine If you go through http://localhost:xxxx/geoserver/web link you will be faced with confusing error. I read Apache's log and realized there are some missing java classes and also some mistakes in one of the pom.xml files.

5. First of all download jackson-annotations-2.10.1.jar and snakeyaml-1.24.jar. They are available here and here. Please notice the version. Copy both files into /webapps/geoserver/WEB-INF/lib. Following screenshot shows all .jar files that Metadata plugin requires.

enter image description here

6. Change extension of gs-metadata-2.17-SNAPSHOT.jar file to .rar, extract it and then go to <extracted_file_root>/META-INF/maven/org.geoserver.community/gs-metadata directory. Find pom.xml and open it using a proper editor.

enter image description here

7. Inside pom.xml find <!-- progress bar --> and Add/Edit following dependencies:

<dependency>
    <groupId>org.wicketstuff</groupId>
    <artifactId>wicketstuff-progressbar</artifactId>
    <version>8.3.0</version>
</dependency>
<!--Yaml Parser -->
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.10.1</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-annotations</artifactId>
    <version>2.10.1</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.dataformat</groupId>
    <artifactId>jackson-dataformat-yaml</artifactId>
    <version>2.10.1</version>
</dependency>

8. Save changes, close editor and compress the folder again. Now change its extension to .jar and bring it back to the /webapps/geoserver/WEB-INF/lib directory.

9. Start tomcat service and open Geoserver application from http://localhost:xxxx/manager/html. If you did all correctly, you will see that Geoserver starts and you can log in using admin/geoserver. You can also find newly added Metadata tab in layer publishing menu.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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