0

I'm using Geonetwork 3.8.2, and I can't edit a metadata.

Th request : http://localhost:8080/geonetwork/srv/api/records/3621/editor?&currTab=default&starteditingsession=yes&_random=9472

return an error 400 :

  <apiError>
    <code>runtime_exception</code>
    <description>Failed to compile stylesheet. 12 errors detected.</description>
    <message>TransformerConfigurationException</message>
  </apiError>

My config is :
Tomcat 7.0.76
Open JDK 1.8.0_232
Geonetwork 3.8.2

Has anyone ever encountered this problem?

3
  • 2
    Bienvenue sur le forum ! Pour tes prochains posts, pense à écrire en anglais pour que toute la communauté comprenne, c'est une convention sur ce forum. Commented Dec 24, 2019 at 8:39
  • 1
    It's corrected, thanks for the clarification.
    – SIGT Loire
    Commented Dec 24, 2019 at 8:57
  • 1
    Are you using a custom metadata profile plugin? What's the error shown in Tomcat's log file?
    – juanluisrp
    Commented Dec 24, 2019 at 23:42

2 Answers 2

0

In geonetwork.log I find :

2019-12-26 09:48:48,353 ERROR [geonetwork.wro4j] - Error occurred during a wro4j request handling
ro.isdc.wro.WroRuntimeException: Cannot build valid CacheKey from request: /geonetwork/static/bootstrap-tagsinput.min.js.map
        at ro.isdc.wro.manager.ResourceBundleProcessor.getSafeCacheKey(ResourceBundleProcessor.java:111)
        at ro.isdc.wro.manager.ResourceBundleProcessor.serveProcessedBundle(ResourceBundleProcessor.java:61)
        at ro.isdc.wro.manager.WroManager.process(WroManager.java:159)
        at ro.isdc.wro.http.WroFilter.processRequest(WroFilter.java:340)
        at ro.isdc.wro.http.WroFilter.doFilter(WroFilter.java:295)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.fao.geonet.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:110)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:186)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
        at jeeves.config.springutil.JeevesDelegatingFilterProxy.doFilter(JeevesDelegatingFilterProxy.java:104)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
6
  • 1
    That's not related with the error stated in the question. I'd expect something like ``` Failed to compile stylesheet. 12 errors detected Error at xsl:when on line 833 column 67 of aFileName.xsl: XPST0008: XPath syntax error at char 36 on line 833 in... ... ```. Check also catalina.out file.
    – juanluisrp
    Commented Dec 26, 2019 at 11:56
  • 1
    The file Catalina.out only contain tomcat-7.0.76 RPM installed In the geonetwork.log I have also this error : ERROR [ro.isdc.wro.http.WroFilter] - Exception occured ro.isdc.wro.WroRuntimeException: Cannot build valid CacheKey from request: /geonetwork/static/bootstrap-tagsinput.min.js.map
    – SIGT Loire
    Commented Dec 26, 2019 at 15:32
  • 1
    WRO4J errors referring to *.js.map files only happen when you request the page with your browser developer tools open. You can ignore them. Try to find the string Failed to compile stylesheet or TransformerConfigurationException in your logs ( you could use rgrep command or similar). Also, as I asked in the original question, are you using a custom metadata profile plugin?
    – juanluisrp
    Commented Dec 27, 2019 at 8:55
  • 1
    Ok, thanks for your answer about WRO4J errors. I have tried to find the two strings (Failed … , Transformer…) with the command grep without success. I have tried to modify the metadata models ISO 19139, Dublin Core… since example in the settings of geonetwork. Is it that a custom metadata profile plugin ?
    – SIGT Loire
    Commented Dec 27, 2019 at 15:51
  • 1
    Have you set up a custom GeoNetwork data directory (or schema plugin directory)? If that is the case maybe you are using the schema plugins from an old GN version. You can check it if you take a look at localhost:8080/geonetwork/srv/eng/admin.console#/dashboard/…, Properties Data directory and Standard folder. If they are pointing outside the ..../webapps/geonetwork folder then you are using an external folder and the new version of GN is not updating the schemas existing there.
    – juanluisrp
    Commented Dec 27, 2019 at 20:46
0

I think i have found my mistake.

I have modified CATALINA_OPTS in tomcat.conf :

The default option was : CATALINA_OPTS="-Xmx2048m -Dgeonetwork.dir=/data"

I have changed it in : CATALINA_OPTS="-Xmx2048m -Dgeonetwork.dir=/var/lib/tomcat/webapps/geonetwork"

Thank you for your help.

4
  • This config can cause the lost of the data folder contents if geonetwork.war is removed from webapps folder and Tomcat undeploys GeoNetwork automatically. A better option would be to configure the data folder pointing somewhere outside webapps/geonetwork folder.
    – juanluisrp
    Commented Jan 3, 2020 at 18:34
  • A config outside of this folder doesn't work. You said Properties Data directory and Standard folder. If they are pointing outside the ..../webapps/geonetwork folder then you are using an external folder and the new version of GN is not updating the schemas existing there. So I Don't understand how configure an other directory in order to update metadata. Is that a problem of rigths ?
    – SIGT Loire
    Commented Jan 6, 2020 at 8:38
  • You can configure the data directory and the schema plugins directory independently. The idea is to point the data directory outside of webapps folder and the schema plugins folder to webapps/geonetwork/WEB-INF/data/config/schema_plugins. This way you will keep the data if GN is redeployed and will use updated schema plugins when GN is updated. Check GN the docs about the data folder configuration at geonetwork-opensource.org/manuals/3.8.x/en/maintainer-guide/…
    – juanluisrp
    Commented Jan 7, 2020 at 10:07
  • 1
    Thanks for your answer. I have now configure data directory and schema plugins directory independently and it works !
    – SIGT Loire
    Commented Jan 8, 2020 at 15:48

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.