Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7496

AntlrParserPlugin fails in Jenkins when running on non-ASCII system

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • None
    • None
    • Compiler
    • z/OS 2.1, Jetty 9.2.11

    Description

      Hi,

      Jenkins fails to start because Groovy tries to load source files in the incorrect encoding on an EBCDIC system:

      Example stack trace extract:
      Caused by:
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:|jar:file:/SYSID/tmp/jetty-0.0.0.0-8080-jenkins.war-_jenkins-any-5794341762171882578.dir/webapp/WEB-INF/lib/sshd-1.6.jar!/org/jenkinsci/main/modules/sshd/PortAdvertiser/httpHeaders.groovy: 1: unexpected token: [ @ line 1, column 3.| ø/[,/ÅÁ??ÊÅ?öÁ>,Ñ>Ë[Ñ?/Ñ>??ÀÍ%ÁË?ËËÇÀ?&?ÊÈ ÀÎÁÊÈÑËÁÊ?ÀÁÃ?Î?_`?Á>Àø?Ñ>È??ÑÃ??Î??>Í%%????ÊÁËø?>ËÁ?/ÀÀçÁ/ÀÁÊ??ì?ëëç?á>Àø?Ñ>È??Î?| ^||1 error|
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
      at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
      at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
      at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
      at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108)
      at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236)
      at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161)
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:846)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:526)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:503)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
      at org.kohsuke.stapler.jelly.groovy.GroovyClassLoaderTearOff.parse(GroovyClassLoaderTearOff.java:92)
      at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:50)
      at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:39)
      at org.kohsuke.stapler.AbstractTearOff.resolveScript(AbstractTearOff.java:91)
      at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:85)
      at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:47)
      at org.kohsuke.stapler.AbstractTearOff.loadScript(AbstractTearOff.java:97)
      at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:31)
      at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:28)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
      at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
      at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4834)
      at org.kohsuke.stapler.CachingScriptLoader.findScript(CachingScriptLoader.java:62)
      at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:112)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:120)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
      at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
      at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
      at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at hudson.init.impl.InstallUncaughtExceptionHandler$1.reportException(InstallUncaughtExceptionHandler.java:27)
      at org.kohsuke.stapler.compression.CompressionFilter.reportException(CompressionFilter.java:77)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:55)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:497)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546)
      at java.lang.Thread.run(Thread.java:801)

      I think the problem is that the file is in UTF-8, but the reader uses the system file encoding which is IBM-273, this results in
      "unexpected token: [ @ line 1, column 3 xxxxx"

      is this a bug in groovy or jenkins?

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            meyert Thomas Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: