Home > Mobile >  Geonetwork web interface not running in localhost
Geonetwork web interface not running in localhost

Time:07-07

I followed the steps mentioned enter image description here

I click GeoNetwork-4.0.5-0 is there and it returns a 404 error.

enter image description here

xampp/tomcat/webapps folder

enter image description here

Server information

enter image description here

I tried installing using the enter image description here

I checked the log right after starting Tomcat and it says

Jul 04, 2022 7:13:30 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\xampp\tomcat\webapps\GeoNetwork-4.0.5-0\WEB-INF\lib\javaee-api-7.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Jul 04, 2022 7:13:30 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\xampp\tomcat\webapps\GeoNetwork-4.0.5-0\WEB-INF\lib\jsp-api-2.1-6.1.14.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Jul 04, 2022 7:13:30 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\xampp\tomcat\webapps\GeoNetwork-4.0.5-0\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Jul 04, 2022 7:13:30 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\xampp\tomcat\webapps\GeoNetwork-4.0.5-0\WEB-INF\lib\servlet-api-2.5-20081211.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Jul 04, 2022 7:13:30 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(C:\xampp\tomcat\webapps\GeoNetwork-4.0.5-0\WEB-INF\lib\servlet-api-2.5-6.1.14.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class

Any tips on solving this?

CodePudding user response:

Since you're instaling version 4, I would advice to check out the relevant documentation here. Some additional services, like ElasticSearch, need to be installed for this version.

Also, it's probably better to download the latest version 4.2.0 instead of an older one, 4.0.5, that you're using.

The error happens most likely due to messy packaging of the war file by the GeoNetwork developers. The file contains libraries that are already provided by Tomcat, so packaging them as part of the war file will result in such error.

The warnings about servlet-api and jsp-api are not critical, since these libraries are present on Tomcat and will be loaded anyway. However, the javaee-api-7.0.jar warning is critical, as Tomcat doesn't fully provide the JavaEE API, and the failure to load this library is the reason the application fails:

 Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.fao.geonet.api.records.attachments.ResourceLoggerStore] from ClassLoader [WebappClassLoader
   context: /GeoNetwork-4.0.5-0
   delegate: false
   repositories:
     /WEB-INF/classes/
 ----------> Parent Classloader:
 java.net.URLClassLoader@2a84aee7
 ]
         at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481)
         at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267)
         ... 77 more
 Caused by: java.lang.NoClassDefFoundError: javax/resource/NotSupportedException
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
         at java.lang.Class.getDeclaredMethods(Class.java:1975)
         at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463)
         ... 79 more
 Caused by: java.lang.ClassNotFoundException: javax.resource.NotSupportedException
         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1951)
         at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1795)
         ... 83 more

A quick hack to fix the issue would be to copy this jar from the deployed application (tomcat/webapps/GeoNetwork-4.0.5-0/WEB-INF/lib/javaee-api-7.0.jar) to the tomcat/lib directory and restarting the Tomcat server.

A proper way would be to report this issue to the developers of GeoNetwork, so that they would remove the conflicting libraries from the distribution or update the documentation.

  • Related