[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by George Gastaldi (Jira)
[ https://issues.redhat.com/browse/ROASTER-136?page=com.atlassian.jira.plug... ]
George Gastaldi closed ROASTER-136.
-----------------------------------
Fix Version/s: 2.22.1.Final
Resolution: Done
> java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> ---------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-136
> URL: https://issues.redhat.com/browse/ROASTER-136
> Project: Roaster
> Issue Type: Bug
> Components: Formatter, JDT
> Affects Versions: 2.21.0.Final, 2.x Future
> Reporter: Lumir Navrat
> Assignee: George Gastaldi
> Priority: Trivial
> Fix For: 2.22.1.Final
>
> Attachments: roaster_format.properties
>
>
> We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
> {code:java}
> java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
> at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
> at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
> at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
> at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
> at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
> 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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
> at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
> at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
> at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
> at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 74 more{code}
> Code is invoked by:
> {code}
> protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
> String unformattedString = javaClass.toUnformattedString();
> unformattedString = unformattedString.replaceAll("\n|\r", " ");
> String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
> File javaClassFile = createFileForClass(javaClass);
> FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
> }
> {code}
> I tried to fined some release notes,, upgrade information but I wasn't successful.
> as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months
[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by George Gastaldi (Jira)
[ https://issues.redhat.com/browse/ROASTER-136?page=com.atlassian.jira.plug... ]
George Gastaldi reassigned ROASTER-136:
---------------------------------------
Assignee: George Gastaldi
> java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> ---------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-136
> URL: https://issues.redhat.com/browse/ROASTER-136
> Project: Roaster
> Issue Type: Bug
> Components: Formatter, JDT
> Affects Versions: 2.21.0.Final, 2.x Future
> Reporter: Lumir Navrat
> Assignee: George Gastaldi
> Priority: Trivial
> Attachments: roaster_format.properties
>
>
> We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
> {code:java}
> java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
> at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
> at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
> at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
> at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
> at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
> 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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
> at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
> at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
> at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
> at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 74 more{code}
> Code is invoked by:
> {code}
> protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
> String unformattedString = javaClass.toUnformattedString();
> unformattedString = unformattedString.replaceAll("\n|\r", " ");
> String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
> File javaClassFile = createFileForClass(javaClass);
> FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
> }
> {code}
> I tried to fined some release notes,, upgrade information but I wasn't successful.
> as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months
[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by George Gastaldi (Jira)
[ https://issues.redhat.com/browse/ROASTER-136?page=com.atlassian.jira.plug... ]
George Gastaldi updated ROASTER-136:
------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/roaster/pull/167
> java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> ---------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-136
> URL: https://issues.redhat.com/browse/ROASTER-136
> Project: Roaster
> Issue Type: Bug
> Components: Formatter, JDT
> Affects Versions: 2.21.0.Final, 2.x Future
> Reporter: Lumir Navrat
> Assignee: George Gastaldi
> Priority: Trivial
> Attachments: roaster_format.properties
>
>
> We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
> {code:java}
> java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
> at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
> at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
> at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
> at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
> at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
> 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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
> at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
> at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
> at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
> at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 74 more{code}
> Code is invoked by:
> {code}
> protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
> String unformattedString = javaClass.toUnformattedString();
> unformattedString = unformattedString.replaceAll("\n|\r", " ");
> String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
> File javaClassFile = createFileForClass(javaClass);
> FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
> }
> {code}
> I tried to fined some release notes,, upgrade information but I wasn't successful.
> as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months
[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by George Gastaldi (Jira)
[ https://issues.redhat.com/browse/ROASTER-136?page=com.atlassian.jira.plug... ]
George Gastaldi commented on ROASTER-136:
-----------------------------------------
Please remove the following line from your properties file and it should work:
{code:java}
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter {code}
The reason is because Roaster doesn't have all the dependencies used in Eclipse, therefore some properties (like this one) are invalid in this context. I'll submit a patch ignoring this option.
Thank you!
> java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> ---------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-136
> URL: https://issues.redhat.com/browse/ROASTER-136
> Project: Roaster
> Issue Type: Bug
> Components: Formatter, JDT
> Affects Versions: 2.21.0.Final, 2.x Future
> Reporter: Lumir Navrat
> Priority: Trivial
> Attachments: roaster_format.properties
>
>
> We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
> {code:java}
> java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
> at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
> at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
> at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
> at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
> at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
> 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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
> at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
> at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
> at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
> at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 74 more{code}
> Code is invoked by:
> {code}
> protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
> String unformattedString = javaClass.toUnformattedString();
> unformattedString = unformattedString.replaceAll("\n|\r", " ");
> String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
> File javaClassFile = createFileForClass(javaClass);
> FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
> }
> {code}
> I tried to fined some release notes,, upgrade information but I wasn't successful.
> as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months
[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by Lumir Navrat (Jira)
[ https://issues.redhat.com/browse/ROASTER-136?page=com.atlassian.jira.plug... ]
Lumir Navrat commented on ROASTER-136:
--------------------------------------
When I looked in jars for both version 2.20.8.Final and 2.22.0.Final in local maven repository. I didn't find this class in both shades. So I can't understand what is different between 2.20.x and 2.21.x resp 2.22.x versions
> java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> ---------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-136
> URL: https://issues.redhat.com/browse/ROASTER-136
> Project: Roaster
> Issue Type: Bug
> Components: Formatter, JDT
> Affects Versions: 2.21.0.Final, 2.x Future
> Reporter: Lumir Navrat
> Priority: Trivial
> Attachments: roaster_format.properties
>
>
> We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
> {code:java}
> java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
> at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
> at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
> at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
> at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
> at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
> at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
> at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
> 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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
> at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
> at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
> at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
> at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
> at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
> at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
> at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
> at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> ... 74 more{code}
> Code is invoked by:
> {code}
> protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
> String unformattedString = javaClass.toUnformattedString();
> unformattedString = unformattedString.replaceAll("\n|\r", " ");
> String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
> File javaClassFile = createFileForClass(javaClass);
> FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
> }
> {code}
> I tried to fined some release notes,, upgrade information but I wasn't successful.
> as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months
[JBoss JIRA] (ROASTER-136) java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
by Lumir Navrat (Jira)
Lumir Navrat created ROASTER-136:
------------------------------------
Summary: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
Key: ROASTER-136
URL: https://issues.redhat.com/browse/ROASTER-136
Project: Roaster
Issue Type: Bug
Components: Formatter, JDT
Affects Versions: 2.21.0.Final, 2.x Future
Reporter: Lumir Navrat
Attachments: roaster_format.properties
We are using roaster to generate code and format it. All works fine with 2.20.x versions but migration to newer failed on
{code:java}
java.lang.NoClassDefFoundError: org/jboss/forge/roaster/_shade/org/eclipse/core/runtime/RegistryFactory
at org.jboss.forge.roaster._shade.org.eclipse.core.runtime.Platform.getExtensionRegistry(Platform.java:895)
at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:190)
at org.jboss.forge.roaster._shade.org.eclipse.jdt.core.ToolFactory.createCodeFormatter(ToolFactory.java:151)
at org.jboss.forge.roaster.model.util.Formatter.format(Formatter.java:114)
at org.jboss.forge.roaster.spi.FormatterProviderImpl.format(FormatterProviderImpl.java:31)
at org.jboss.forge.roaster.Roaster.format(Roaster.java:351)
at manual.de.ids.acos.et.server.codegeneration.BaseMappingCodeGeneratorTest.writeFormattedCodeToFile(BaseMappingCodeGeneratorTest.java:88)
at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.generateEntityDtoAdapter(EntityDtoGeneratorTest.java:211)
at manual.de.ids.acos.et.server.codegeneration.EntityDtoGeneratorTest.test(EntityDtoGeneratorTest.java:84)
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 org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:205)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:201)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:141)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:98)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.ClassNotFoundException: org.jboss.forge.roaster._shade.org.eclipse.core.runtime.RegistryFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 74 more{code}
Code is invoked by:
{code}
protected void writeFormattedCodeToFile(final JavaClassSource javaClass) throws IOException {
String unformattedString = javaClass.toUnformattedString();
unformattedString = unformattedString.replaceAll("\n|\r", " ");
String formattedCode = Roaster.format(formatterProperties, unformattedString); //this line is source for exception
File javaClassFile = createFileForClass(javaClass);
FileUtils.writeStringToFile(javaClassFile, formattedCode, defaultCharset());
}
{code}
I tried to fined some release notes,, upgrade information but I wasn't successful.
as attachment I added our format-properties
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 4 months