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

Save not possible in Designer for unparsable messages.json

    XMLWordPrintable

    Details

      Description

      Detected on project amfi : https://connect.nuxeo.com/nuxeo/site/studio/ide?project=afmi

      When the Designer messages.json is unparsable (i.e missing comma), there is no validation error for the user, it just raise the following 500
      ERROR while generating Designer universal labels (at any save in the project):

      jdk.nashorn.internal.runtime.ECMAException: net.arnx.nashorn.lib.PromiseException
      	at jdk.nashorn.internal.runtime.ECMAException.create(ECMAException.java:113) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$10415$2699AA$promise.L:8#then#L:97(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:146) ~[?:?]
      	at jdk.nashorn.javaadapters.java_util_function_BiFunction.apply(Unknown Source) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946) ~[?:?]
      	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6503$2596AA$promise.L:8#then(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:97) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$9644$3117987A$\^eval\_.L:1-1#L:47012#TranslationsBuilder#addUniversalLabels#L:47166(<eval>:47175) ~[?:?]
      	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:657) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$10415$2699AA$promise.L:8#then#L:97(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:112) ~[?:?]
      	at jdk.nashorn.javaadapters.java_util_function_BiFunction.apply(Unknown Source) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946) ~[?:?]
      	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6503$2596AA$promise.L:8#then(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:97) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6600$3117893A$\^eval\_.L:1-1#L:47012#TranslationsBuilder#addUniversalLabels(<eval>:47166) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6601$3191243AAA$\^eval\_.L:1-1#L:48430#addUniversalLabels(<eval>:49199) ~[?:?]
      	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:661) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:202) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:393) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeMethod(NashornScriptEngine.java:206) ~[jdk.scripting.nashorn:?]
      	at com.nuxeo.studio.core.designer.DesignerServiceImpl.execute(DesignerServiceImpl.java:294) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.designer.DesignerServiceImpl.addUniversalLabels(DesignerServiceImpl.java:205) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.builders.SchemaFeatureBuilder.postWriteFeature(SchemaFeatureBuilder.java:626) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.builders.SchemaFeatureBuilder.postWriteFeature(SchemaFeatureBuilder.java:58) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.buildservices.FeatureServiceImpl.addFeature(FeatureServiceImpl.java:227) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.buildservices.FeatureServiceImpl.createFeature(FeatureServiceImpl.java:109) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.servlet.StudioServiceImpl.createFeature(StudioServiceImpl.java:543) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor666.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587) ~[gwt-servlet-2.9.0-NX1.jar:?]
      Caused by: net.arnx.nashorn.lib.PromiseException
      	at jdk.nashorn.internal.scripts.Script$Recompilation$10415$2699AA$promise.L:8#then#L:97(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:119) ~[?:?]
      	at jdk.nashorn.javaadapters.java_util_function_BiFunction.apply(Unknown Source) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946) ~[?:?]
      	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6503$2596AA$promise.L:8#then(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:97) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6585$3118182A$\^eval\_.L:1-1#L:47012#TranslationsBuilder#addUniversalLabels#L:47166#promises(<eval>:47171) ~[?:?]
      	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:657) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.objects.NativeArray$10.forEach(NativeArray.java:1598) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.arrays.IteratorAction.apply(IteratorAction.java:110) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.objects.NativeArray.map(NativeArray.java:1609) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$9644$3117987A$\^eval\_.L:1-1#L:47012#TranslationsBuilder#addUniversalLabels#L:47166(<eval>:47170) ~[?:?]
      	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:657) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$10415$2699AA$promise.L:8#then#L:97(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:112) ~[?:?]
      	at jdk.nashorn.javaadapters.java_util_function_BiFunction.apply(Unknown Source) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) ~[?:?]
      	at java.util.concurrent.CompletableFuture.uniHandleStage(CompletableFuture.java:946) ~[?:?]
      	at java.util.concurrent.CompletableFuture.handle(CompletableFuture.java:2266) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6503$2596AA$promise.L:8#then(jar:file:/opt/nuxeo/server/nxserver/lib/nashorn-promise-0.1.1.jar!/net/arnx/nashorn/lib/promise.js:97) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6600$3117893A$\^eval\_.L:1-1#L:47012#TranslationsBuilder#addUniversalLabels(<eval>:47166) ~[?:?]
      	at jdk.nashorn.internal.scripts.Script$Recompilation$6601$3191243AAA$\^eval\_.L:1-1#L:48430#addUniversalLabels(<eval>:49199) ~[?:?]
      	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:661) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:202) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:393) ~[jdk.scripting.nashorn:?]
      	at jdk.nashorn.api.scripting.NashornScriptEngine.invokeMethod(NashornScriptEngine.java:206) ~[jdk.scripting.nashorn:?]
      	at com.nuxeo.studio.core.designer.DesignerServiceImpl.execute(DesignerServiceImpl.java:294) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.designer.DesignerServiceImpl.addUniversalLabels(DesignerServiceImpl.java:205) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.builders.SchemaFeatureBuilder.postWriteFeature(SchemaFeatureBuilder.java:626) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.builders.SchemaFeatureBuilder.postWriteFeature(SchemaFeatureBuilder.java:58) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.buildservices.FeatureServiceImpl.addFeature(FeatureServiceImpl.java:227) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.core.buildservices.FeatureServiceImpl.createFeature(FeatureServiceImpl.java:109) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at com.nuxeo.studio.servlet.StudioServiceImpl.createFeature(StudioServiceImpl.java:543) ~[nuxeo-studio-ui-2022.1.4.jar:?]
      	at jdk.internal.reflect.GeneratedMethodAccessor666.invoke(Unknown Source) ~[?:?]
      	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
      	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587) ~[gwt-servlet-2.9.0-NX1.jar:?]
      	... 98 more
      
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 2 hours
                  1d 2h