Uploaded image for project: 'Admin Tools Application'
  1. Admin Tools Application
  2. ADMINTOOL-96

Check XWiki Config error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.5
    • 4.5.3
    • None
    • None
    • Unknown

    Description

      Acesssing the Check XWiki Config from Admin tools fails with a script error:
      Reproduced on 16.3.0
      It works on 15.10.11

      It could be linked to https://jira.xwiki.org/browse/ADMINTOOL-95 

      org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Script Macro for content [
      import com.xpn.xwiki.util.Util;
      import java.text.DecimalFormat;
      import java.lang.management.ManagementFactory;
      import javax.management.MBeanServer;
      
      if( System.getProperty('catalina.base') ) {
        appserverpath = System.getProperty('catalina.base')
      } else {
        // CONFIG: try to set the path to ypur application server if not found
        appserverpath = ".."
      }
      
      def xwikiPath = ["/etc/xwiki/xwiki.cfg", "${appserverpath}/webapps${request.contextPath}/WEB-INF/xwiki.cfg", "/usr/local/xwiki/WEB-INF/xwiki.cfg", "${appserverpath}/webapps/ROOT/WEB-INF/xwiki.cfg", "${appserverpath}/webapps/xwiki/WEB-INF/xwiki.cfg"]
      
      def tomcatPath = ["${appserverpath}/conf/server.xml", "/usr/local/tomcat/conf/server.xml", "/var/lib/tomcat8/conf/", "/var/lib/tomcat9/conf/", "/var/lib/tomcat/conf/"]
      
      def xwikicfgpath = "/usr/local/xwiki/WEB-INF/xwiki.cfg"
      def tomcatconfpath = "/usr/local/tomcat/conf/server.xml"
      
      for (path in xwikiPath) {
        if ((new File(path)).exists()) {
          xwikicfgpath = path
          break;
        }
      }
      
      for (path in tomcatPath) {
        if ((new File(path)).exists()) {
          tomcatconfpath = path
          break;
        }
      }
      
      def wiki = xcontext.getContext().getWiki()
      
      def readableSize(size) {
          if(size <= 0) return "0";
          def units = ["B", "KB", "MB", "GB", "TB" ];
          int digitGroups = (int) (Math.log10(size)/Math.log10(1024));
          return new DecimalFormat("#,##0.#").format(size/Math.pow(1024, digitGroups)) + " " + units[digitGroups];
      }
      
      def xwikicfgdir = new File(xwikicfgpath)
      def xwikicfgFound = xwikicfgdir.exists();
      def xwencodingActive = xwiki.getEncoding()
      if (xwikicfgFound) {
        def content = Util.getFileContent(xwikicfgdir)
        def is = new ByteArrayInputStream(content.getBytes());
        def props = new Properties();
        props.load(is);
        xwencoding = props.get("xwiki.encoding")
        xwencryptkey = props.get("xwiki.authentication.encryptionKey")
      } else {
        xwencoding = 'null'
        xwencryptkey = 'null'
      }
      
      
      def getEnvVars() {
        Process p = null;
        Properties envVars = new Properties();
        Runtime r = Runtime.getRuntime();
        String OS = System.getProperty("os.name").toLowerCase();
        if (OS.indexOf("windows 9") > -1) {
          p = r.exec( "command.com /c set" );
          }
        else if ( (OS.indexOf("nt") > -1)
               || (OS.indexOf("windows 2000") > -1 )
               || (OS.indexOf("windows xp") > -1)
               || (OS.indexOf("windows") > -1) ) {
          // thanks to JuanFran for the xp fix!
          p = r.exec( "cmd.exe /c set" );
          }
        else {
          // our last hope, we assume Unix (thanks to H. Ware for the fix)
          p = r.exec( "env" );
          }
        BufferedReader br = new BufferedReader
           ( new InputStreamReader( p.getInputStream() ) );
        String line;
        while( (line = br.readLine()) != null ) {
         int idx = line.indexOf( '=' );
         String key = line.substring( 0, idx );
         String value = line.substring( idx+1 );
         envVars.setProperty( key, value );
         // System.out.println( key + " = " + value );
         }
        return envVars;
      }
      
      println "This script intends to show most important parameters for XWiki hosting. You can [[go directly to recommendations>>${doc}||anchor=HRecommendations]]"
      
      println "== Installation Path =="
      
      println "* XWiki configuration path: ${xwikicfgpath}"
      println "* Tomcat configuration path: ${tomcatconfpath}"
      
      if (wiki!=null){
      println "== Memory Configuration =="
      
      println "This lists the memory settings of the Java VM and the current memory usage. An XWiki instance should be installed with at least 1Gb. A large one with at least  2GB to 4GB, especially if the cache settings are boosted. If after *flushing the cache*, the current free memory is low and the current total close to the maximum the instance might be running out of memory."
      println "* Max Memory: ${readableSize(wiki.maxMemory())}"
      println "* Current Total: ${readableSize(wiki.totalMemory())}"
      println "* Current Free: ${readableSize(wiki.freeMemory())}"
      
      
      println "== Cache configuration =="
      
      println "This lists the main cache settings. An XWiki instance is set by default to 500 for the main cache which is fine for a normal instance. A large one with at least 1000  to 3000. Java Memory needs to be increased to support a larger cache. This setting can be changed in xwiki.cfg with the property xwiki.store.cache.capacity"
      
      MBeanServer server = ManagementFactory.getPlatformMBeanServer()
      def mbean = null
      
      try {
         mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="xwiki",component=Configuration')
      } catch (Exception e) {
         mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="XWikiCacheManager",component=Configuration')
      }
      esize = (mbean==null) ? null : mbean.getProperty("evictionSize")
      csize = esize
      
      try {
         mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="xwiki",component=Statistics')
      } catch (Exception e) {
         mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="XWikiCacheManager",component=Statistics')
      }
      isize = (mbean==null) ? null : mbean.getProperty("numberOfEntries")
      println "* Store Page Cache in Use : ${isize}/${esize}"
      
      
      
      println "== Database configuration =="
      
      println "This lists the database settings of the Java VM and the current pool usage. An XWiki instance is set by default to 2 connections in the pool, which is ok for a very small instance. A large one with at least 10 or 20. If there is no activity on the server, the active setting should be zero."
      
       
      try {
      def sessionFactory = wiki.getStore().getStore().sessionFactory
      def provider = sessionFactory.@serviceRegistry.getService(org.hibernate.engine.jdbc.connections.spi.ConnectionProvider)
      def ds = wiki.getPrivateField(provider,"ds")
      def pool = wiki.getPrivateField(ds,"connectionPool")
      
      def maxTotal
      try { maxTotal = pool.maxTotal } catch (Exception e) { maxTotal = pool.maxActive }
      println "* Max Active (number of possible connections to the DB): $maxTotal"
      println "* Max Idle (number of possible idle connections to the DB): $pool.maxIdle"
      println "* Active (current active connections to the DB): $pool.numActive"
      println "* Idle (current idle connections to the DB): $pool.numIdle"
      } catch (e) {
        println "Cannot get database info " + e.getMessage()
      }
      
      println "== Authenticator Configuration =="
      
      println "* Authenticator class configured in xwiki.cfg: " + wiki.Param("xwiki.authentication.authclass")
      
      println "== Encoding Configuration =="
      
      println "This lists ALL the encoding configuration of tomcat, xwiki, java. All should return UTF-8 except mail.mime.charset which can also return null (the file.encoding config will then be used)"
      
      
      println "=== System environment ==="
      
      println "* LANG :" + getEnvVars().get("LANG")
      println "* PWD :" + getEnvVars().get("PWD")
      
      
      println "=== Java command line ==="
      
      def fileenc = System.getProperty("file.encoding")
      println "* file.encoding: ${fileenc}"
      def mimecharset = System.getProperty("mail.mime.charset")
      println "* mail.mime.charset: ${mimecharset}"
      
      def tomcatconffile = new File(tomcatconfpath)
      if (tomcatconffile.exists()) {
       def node = new XmlParser().parse(tomcatconffile)
      
      println "=== Tomcat configuration ==="
       
      println "Prior to Tomcat8 it was necessary to set the connection encoding of protocols to UTF-8. Since Tomcat8+ this is not necessary anymore."
       
      for (connector in node.Service.Connector) {
       urienc = connector.'@URIEncoding'
       prot = connector.'@protocol'
       println "* Procotol ${prot} has encoding ${urienc}"
      }
      } else {
       println "* {{error}}tomcat.connectors.encoding : The tomcat configuration file could not be found. You might not be using tomcat or the app server path (appserverpath) variable need to be set (you can edit the page to set it){{/error}}"
      }
      
      
      println "=== XWiki Configuration ==="
      
      println "* XWiki encoding used on server: ${xwencodingActive}"
      if (xwikicfgFound) {
      println "* XWiki encoding from config file: ${xwencoding}";
      } else {
       println "{{error}}The XWiki configuration file could not be found at ${xwikicfgpath}. The app server path (appserverpath) variable need to be set (you can edit the page to set it){{/error}}"
      }
      
      println "= Recommendations ="
      
      println "Here will be shown our recommendations to increase wiki's performance and stability, if any :"
      
      if (wiki.maxMemory() < 800000000) {
       println "* {{warning}}Amount of memory allocated to XWiki is too low for a production usage. Max memory available for the JVM is set to ${readableSize(wiki.maxMemory())}, it should be at least 800MB.{{/warning}}"
      }
      
      if (csize < 1000) {
       println "* {{warning}}Your cache configuration is too low for a production usage. Your cache is set to ${csize} documents, it should be 1000 or more.{{/warning}}"
      }
      
      if (xwencodingActive && xwencodingActive != "UTF-8") {
       println "* {{warning}}XWiki encoding is not set properly. We advise to use UTF-8 encoding for every software used (Servlet container, front end, database...){{/warning}}"
      }
      
      if (xwencryptkey == "titititititititititititititititi") {
       println "* {{warning}}You should change your encryption key (xwiki.authentication.encryptionKey) and validation key (xwiki.authentication.validationKey) of cookies in xwiki.cfg configuration file {{/warning}}"
      }
      
      }]
      
       at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:198)
      
       at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:56)
      
       at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
      
       at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
      
       at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:311)
      
       at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
      
       at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:88)
      
       at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:396)
      
       at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:269)
      
       at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:112)
      
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
      
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
      
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
      
       at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:67)
      
       at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:43)
      
       at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
      
       at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
      
       at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
      
       at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
      
       at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
      
       at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
      
       at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1388)
      
       at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1524)
      
       at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1474)
      
       at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1443)
      
       at com.xpn.xwiki.api.Document.displayDocument(Document.java:788)
      
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
      
       at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704)
      
       at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75)
      
       at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.xwiki.velocity.internal.directive.TryCatchDirective.render(TryCatchDirective.java:86)
      
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
      
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      
       at org.apache.velocity.Template.merge(Template.java:358)
      
       at org.apache.velocity.Template.merge(Template.java:262)
      
       at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
      
       at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:105)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
      
       at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
      
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:904)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:866)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:853)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:808)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:800)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
      
       at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
      
       at jdk.internal.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
      
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
      
       at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
      
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
      
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
      
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
      
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      
       at org.apache.velocity.Template.merge(Template.java:358)
      
       at org.apache.velocity.Template.merge(Template.java:262)
      
       at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
      
       at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:105)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
      
       at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
      
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:904)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:866)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:853)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:808)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:800)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
      
       at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
      
       at jdk.internal.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
      
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      
       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
      
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
      
       at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
      
       at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
      
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
      
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
      
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
      
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
      
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
      
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
      
       at org.apache.velocity.Template.merge(Template.java:358)
      
       at org.apache.velocity.Template.merge(Template.java:262)
      
       at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
      
       at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:105)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
      
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
      
       at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
      
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
      
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:904)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:866)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:846)
      
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:832)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:91)
      
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:85)
      
       at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2564)
      
       at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
      
       at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:651)
      
       at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339)
      
       at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:108)
      
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      
       at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1419)
      
       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
      
       at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
      
       at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170)
      
       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      
       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      
       at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      
       at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
      
       at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      
       at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      
       at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      
       at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
      
       at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      
       at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
      
       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      
       at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192)
      
       at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
      
       at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      
       at org.eclipse.jetty.server.Server.handle(Server.java:563)
      
       at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
      
       at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
      
       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
      
       at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
      
       at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
      
       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      
       at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      
       at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
      
       at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
      
       at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
      
       at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
      
       at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
      
       at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
      
       at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
      
       at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
      
       at java.base/java.lang.Thread.run(Thread.java:842)
      
      Caused by: javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      
      Script2.groovy: 116: unable to resolve class GroovyMBean
       @ line 116, column 12.
      
            mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="xwiki",component=Configuration')
      
                    ^
      
      
      
      Script2.groovy: 118: unable to resolve class GroovyMBean
       @ line 118, column 12.
      
            mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="XWikiCacheManager",component=Configuration')
      
                    ^
      
      
      
      Script2.groovy: 124: unable to resolve class GroovyMBean
       @ line 124, column 12.
      
            mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="xwiki",component=Statistics')
      
                    ^
      
      
      
      Script2.groovy: 126: unable to resolve class GroovyMBean
       @ line 126, column 12.
      
            mbean = new GroovyMBean(server, 'org.xwiki.infinispan:type=Cache,name="xwiki.store.pagecache(local)",manager="XWikiCacheManager",component=Statistics')
      
                    ^
      
      
      
      Script2.groovy: 178: unable to resolve class XmlParser
       @ line 178, column 13.
      
          def node = new XmlParser().parse(tomcatconffile)
      
                     ^
      
      
      
      5 errors
      
      
      
       at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:164)
      
       at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.eval(AbstractJSR223ScriptMacro.java:338)
      
       at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:238)
      
       at org.xwiki.rendering.macro.script.AbstractJSR223ScriptMacro.evaluateBlock(AbstractJSR223ScriptMacro.java:193)
      
       ... 203 more
      

      Attachments

        Activity

          People

            amottier Antoine Mottier
            Lucian Chevereseanu Lucian Chevereseanu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: