Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6302

Fix description of life cycle states and transitions to allow non-ASCII characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Acknowledged
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1.5
    • Fix Version/s: None
    • Component/s: Life Cycle
    • Environment:
      Windows for the Maven project
      The issue seems not to happen on Linux

      Description

      What
      For states and transitions of life cycles, their descriptions can include non-ASCII characters, such as accentuated letters. When a Maven project assembles the Studio project on Windows specifically, this chokes with an exception:

      BUILD FAILED - at 23/02/21 17:49
      C:\CASES\SUP33118\t\t-package\src\main\assemble\assembly.xml:138: java.lang.RuntimeException: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 30; Invalid byte 2 of 3-byte UTF-8 sequence.
              at org.nuxeo.studio.components.common.mapper.ExtensionMapper.loadAll(ExtensionMapper.java:96)
              at org.nuxeo.studio.components.common.mapper.MappersManager.load(MappersManager.java:91)
              at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
              at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
              at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
              at org.nuxeo.studio.components.common.bundle.ContributionsHolder.load(ContributionsHolder.java:68)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
              at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
              at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
              at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
              at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
              at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
              at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
              at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
              at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
              at org.nuxeo.studio.components.common.ContributionsLoader.loadFromJarFile(ContributionsLoader.java:74)
              at java.util.ArrayList.forEach(ArrayList.java:1257)
              at org.nuxeo.studio.components.common.ContributionsLoader.load(ContributionsLoader.java:59)
              at org.nuxeo.studio.components.common.ContributionsExtractor.publish(ContributionsExtractor.java:38)
              at org.nuxeo.build.ant.StudioExtraction.execute(StudioExtraction.java:63)
              at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
              at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
              at org.apache.tools.ant.Task.perform(Task.java:348)
              at org.apache.tools.ant.Target.execute(Target.java:435)
              at org.apache.tools.ant.Target.performTasks(Target.java:456)
              at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
              at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
              at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
              at org.nuxeo.build.ant.AntClient.run(AntClient.java:161)
              at org.nuxeo.build.ant.AntClient.run(AntClient.java:119)
              at org.nuxeo.build.maven.AntBuildMojo.execute(AntBuildMojo.java:256)
              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
              at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
              at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
              at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
              at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
              at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
              at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
              at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
      Caused by: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 30; Invalid byte 2 of 3-byte UTF-8 sequence.
              at org.nuxeo.studio.components.common.mapper.xmap.XMap.loadAll(XMap.java:275)
              at org.nuxeo.studio.components.common.mapper.ExtensionMapper.loadAll(ExtensionMapper.java:94)
              ... 64 more
      Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 30; Invalid byte 2 of 3-byte UTF-8 sequence.
              at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
              at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
              at org.nuxeo.studio.components.common.mapper.xmap.XMap.loadAll(XMap.java:272)
              ... 65 more
      Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence.
              at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
              at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              ... 69 more
      

      How to reproduce

      • Create a Studio project
      • create life cycle states and transitions and use non-plain ASCII characters in their description
      • create a MVN project of some kind (using nuxeo-cli multi-module)
      • nuxeo studio link your Studio project with this MVN project
      • mvn clean install will choke at assembly time
        [INFO] --- ant-assembly-maven-plugin:2.1.3:build (default-build) @ t-package ---
        [INFO] Active Maven profiles:
        Nuxeo (source: external)
        os-windows (source: org.nuxeo:nuxeo-ecm:10.10)
        
        sup33118.build:
        [INFO]     [mkdir] Created dir: C:\CASES\SUP33118\t\t-package\target\nxr
        [INFO]     [mkdir] Created dir: C:\CASES\SUP33118\t\t-package\target\marketplace
        [INFO]      [copy] Copying 3 files to C:\CASES\SUP33118\t\t-package\target\marketplace
        [INFO]      [copy] Copying 1 file to C:\CASES\SUP33118\t\t-package\target\marketplace\install
        [INFO]      [copy] Copying 1 file to C:\CASES\SUP33118\t\t-package\target\marketplace\install
        [INFO]      [copy] Copying 1 file to C:\CASES\SUP33118\t\t-package\target
        [INFO]      [copy] Copying 44 files to C:\CASES\SUP33118\t\t-package\target\nxr\bundles
        [INFO]      [copy] Copying 111 files to C:\CASES\SUP33118\t\t-package\target\nxr\lib
        [INFO]       [zip] Building zip: C:\CASES\SUP33118\t\t-package\target\nxr-1.0-SNAPSHOT.zip
        [INFO] [nx:zipdiff] Working on files in nxr-1.0-SNAPSHOT.zip not present or differ in file2
        [INFO] [nx:zipdiff] Working on files in nuxeo-nxr-server-10.10.zip not present or differ in file1
        [INFO]     [unzip] Expanding: C:\CASES\SUP33118\t\t-package\target\nxr-1.0-SNAPSHOT.zip into C:\CASES\SUP33118\t\t-package\target\marketplace\install
        [INFO]      [copy] Copying 1 file to C:\CASES\SUP33118\t\t-package\target\marketplace
        [WARNING] [nx:studioExtraction] [Fatal Error] :5:30: Invalid byte 2 of 3-byte UTF-8 sequence.
        [ERROR]
        BUILD FAILED - at 23/02/21 17:49
        C:\CASES\SUP33118\t\t-package\src\main\assemble\assembly.xml:138: java.lang.RuntimeException: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 30; Invalid byte 2 of 3-byte UTF-8 sequence.
                at org.nuxeo.studio.components.common.mapper.ExtensionMapper.loadAll(ExtensionMapper.java:96)
                at org.nuxeo.studio.components.common.mapper.MappersManager.load(MappersManager.java:91)
        

      Attaching a sample Maven project exhibiting the issue

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pabgrall Patrick Abgrall
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: