Error occurred during screen creation

I’m using JMIX studio on Ubuntu and having this issue when trying to create a screen under a JPA enity.
Below is the error I got:

10:35 PM Error occurred during screen creation
java.lang.IllegalArgumentException: Snippet ‘screen/nestedDatasourceProperties.groovy’ not found
See log file for details (/home/nghiapht/.cache/JetBrains/IdeaIC2021.1/log/idea.log)

And below is the stack trace I found from the IDE log:

021-06-24 22:52:47,860 [516504449] WARN - ate.JmixRemoteTemplatesManager - Error during templates artifacts versions loading from https://repo.maven.apache.org/maven2/
com.intellij.util.io.HttpRequests$HttpStatusException: Request failed with status code 404. Status=404, Url=https://repo.maven.apache.org/maven2/io/jmix/templates/studio/jmix-studio-templates/maven-metadata.xml
at com.intellij.util.io.HttpRequests.throwHttpStatusError(HttpRequests.java:668)
at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:639)
at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:356)
at com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:364)
at com.intellij.util.io.HttpRequests$RequestImpl.doReadBytes(HttpRequests.java:424)
at com.intellij.util.io.HttpRequests$RequestImpl.readBytes(HttpRequests.java:420)
at com.intellij.util.io.RequestBuilder.lambda$readBytes$3(RequestBuilder.java:78)
at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:531)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:513)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:332)
at com.intellij.util.io.RequestBuilder.readBytes(RequestBuilder.java:78)
at com.haulmont.jmixstudio.backend.maven.RemoteMavenRepository.getFileContent(RemoteMavenRepository.java:181)
at com.haulmont.jmixstudio.backend.maven.RemoteMavenRepository.getStringContent(RemoteMavenRepository.java:197)
at com.haulmont.jmixstudio.backend.maven.RemoteMavenRepository.lambda$getMavenMetadataContent$2(RemoteMavenRepository.java:134)
at com.haulmont.jmixstudio.backend.maven.RemoteMavenRepository.getMavenMetadataContent(RemoteMavenRepository.java:139)
at com.haulmont.jmixstudio.backend.maven.RemoteMavenRepository.getArtifactVersions(RemoteMavenRepository.java:78)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager.loadRemoteArtifactsVersions(JmixRemoteTemplatesManager.kt:129)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager.access$loadRemoteArtifactsVersions(JmixRemoteTemplatesManager.kt:41)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager$loadAvailableArtifactsVersions$process$1.compute(JmixRemoteTemplatesManager.kt:92)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager$loadAvailableArtifactsVersions$process$1.compute(JmixRemoteTemplatesManager.kt:41)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:57)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:641)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:57)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager.loadAvailableArtifactsVersions(JmixRemoteTemplatesManager.kt:95)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager.loadAvailableArtifactsVersions$default(JmixRemoteTemplatesManager.kt:88)
at com.haulmont.jmixstudio.backend.template.JmixRemoteTemplatesManager.getTemplatesArtifactForProjectModule(JmixRemoteTemplatesManager.kt:70)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess$findTemplatesForModule$1.compute(CreateScreenActionProcess.kt:114)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess$findTemplatesForModule$1.compute(CreateScreenActionProcess.kt:37)
at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:275)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:545)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:78)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)
2021-06-24 22:52:47,865 [516504454] INFO - nd.maven.RemoteMavenRepository - Loading artifacts list from https://global.repo.jmix.io/repository/public
2021-06-24 22:53:14,948 [516531537] WARN - ndling.DefaultExceptionHandler - Studio error:
java.lang.IllegalArgumentException: Snippet ‘screen/nestedDatasourceProperties.groovy’ not found
at com.haulmont.jmixstudio.backend.template.TemplateApi.getSnippetPath(TemplateApi.java:83)
at com.haulmont.jmixstudio.backend.template.TemplateApi.evaluateScript(TemplateApi.java:69)
at com.haulmont.jmixstudio.backend.template.TemplateApi$evaluateScript.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135)
at SimpleTemplateScript289.run(SimpleTemplateScript289.groovy:7)
at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:176)
at com.haulmont.jmixstudio.backend.TemplateEngine.processString(TemplateEngine.java:158)
at com.haulmont.jmixstudio.backend.TemplateEngine.processString(TemplateEngine.java:117)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.generateFile(ScreenCreator.java:302)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.createScreen(ScreenCreator.java:237)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.lambda$generateScreens$0(ScreenCreator.java:127)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:814)
at com.haulmont.jpb.util.EntityUtil.ra(EntityUtil.java:842)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.generateScreens(ScreenCreator.java:116)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.create(ScreenCreator.java:104)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$compute$3(WriteCommandAction.java:159)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:143)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:141)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:182)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:150)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:117)
at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.compute(WriteCommandAction.java:159)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.ScreenCreator.createInWriteCommandAction(ScreenCreator.java:110)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess$createAndShowScreenWizard$1.accept(CreateScreenActionProcess.kt:103)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess$createAndShowScreenWizard$1.accept(CreateScreenActionProcess.kt:37)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$11(ApplicationImpl.java:923)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.util.PotemkinProgress.runInSwingThread(PotemkinProgress.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runEdtProgressWriteAction$12(ApplicationImpl.java:923)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:947)
at com.intellij.openapi.application.impl.ApplicationImpl.runEdtProgressWriteAction(ApplicationImpl.java:921)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithNonCancellableProgressInDispatchThread(ApplicationImpl.java:902)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.haulmont.jmixstudio.intellij.util.SApplicationExUtils.runWriteActionWithProgressInDispatchThread(SApplicationExUtils.java:60)
at com.haulmont.jmixstudio.intellij.util.SApplicationExUtils.runWriteActionWithNonCancellableProgressInDispatchThread(SApplicationExUtils.java:37)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess.createAndShowScreenWizard(CreateScreenActionProcess.kt:97)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess.access$createAndShowScreenWizard(CreateScreenActionProcess.kt:37)
at com.haulmont.jmixstudio.intellij.action.creation.template.cuba.CreateScreenActionProcess$run$2.invokeSuspend(CreateScreenActionProcess.kt:54)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

1 Like

Hi.
Could you please clarify which version of Studio plugin do you use?

The studio version is 0.9.1 as in the screenshot below:
Screenshot from 2021-06-25 08-49-47

Good day,

I experience this exact same issue with the exact same version of the plugin on Manjaro Linux.

I am only able to create screens not linked to entities. Any entity linked screed throws the mentioned exception.

@herman, yeah I’m using the studio on Ubuntu. I think this is an issue on Linux OS. My friend install the same version on Window with no issue creating screens.

@firstova, any update from platform team?

1 Like

I think you are correct @nghpham. I tried it on a windows install and it works as expected on windows, but fails on Manjaro and Pop!_OS.

@firstova, any update regarding this issue?

Hi.
We will fix this problem in the upcoming release.
Regards,
Natalia

2 Likes

@firstova, thanks to the Platform team.

For those who need it in the meantime, by default, the Studio will auto-create the user browse and user edit screen. So we can just copy the descriptor and controller file then rename them to our expected screen.

Then the screen designer would work perfectly as usual.

2 Likes

@nghiapht1990, you are a champ! I am in your debt for this workaround!

@firstova, thanks for your prompt reply.

Do you perhaps have any rough indication regarding a timeline for this?

I have my whole development team excited about the jmix v1.0…0 release. :smiley:

The new version is expected to be released at the end of the week.

Hi @firstova,

Just wanted to thank you. All is working like a charm at the moment.