The rule project was working and then had to update one of the jar artifacts in the repository. Now I can't validate or build. I am getting an error of could not read class
in the workbench when validating and building. Looking at the server logs I see the following. If I try to replace the artifact with the one that worked I get the same error. The underlying ZipException is my thought but not sure if it is maven related or the artifact jar file itself.
Any ideas on how to resolve this?
2022-08-30 21:02:38,648 ERROR [org.kie.workbench.common.services.backend.builder.core.BuildHelper] (EJB default - 1) could not read class: java.lang.RuntimeException: could not read class
at deployment.business-central.war//org.drools.ecj.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:286)
at deployment.business-central.war//org.drools.ecj.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:246)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:297)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:268)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2980)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:111)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:514)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:615)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:611)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1981)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1883)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1571)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:919)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:914)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:518)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:885)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:575)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:475)
at deployment.business-central.war//org.drools.compiler.shade.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
at deployment.business-central.war//org.drools.ecj.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:385)
at deployment.business-central.war//org.kie.memorycompiler.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:41)
at deployment.business-central.war//org.drools.mvel.java.JavaDialect.compileAll(JavaDialect.java:422)
at deployment.business-central.war//org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:61)
at deployment.business-central.war//org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:84)
at deployment.business-central.war//org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileAll(KnowledgeBuilderImpl.java:1406)
at deployment.business-central.war//org.drools.compiler.builder.impl.KnowledgeBuilderImpl.wireAllRules(KnowledgeBuilderImpl.java:856)
at deployment.business-central.war//org.drools.compiler.builder.impl.KnowledgeBuilderImpl.buildRules(KnowledgeBuilderImpl.java:2424)
at deployment.business-central.war//org.drools.compiler.builder.impl.KnowledgeBuilderImpl.doFirstBuildStep(KnowledgeBuilderImpl.java:2345)
at deployment.business-central.war//org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:109)
at deployment.business-central.war//org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:99)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:270)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:216)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:277)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:245)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:202)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:516)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModule(KieBuilderImpl.java:526)
at deployment.business-central.war//org.drools.compiler.kie.builder.impl.KieBuilderImpl.getKieModuleIgnoringErrors(KieBuilderImpl.java:511)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.core.Builder.getKieModuleIgnoringErrors(Builder.java:586)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.core.Builder.build(Builder.java:264)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.core.BuildHelper.build(BuildHelper.java:92)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.core.BuildHelper$Proxy$_$$_WeldClientProxy.build(Unknown Source)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.ala.LocalBuildExecConfigExecutor.apply(LocalBuildExecConfigExecutor.java:61)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.ala.LocalBuildExecConfigExecutor.apply(LocalBuildExecConfigExecutor.java:32)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.ala.LocalBuildExecConfigExecutor$Proxy$_$$_WeldClientProxy.apply(Unknown Source)
at deployment.business-central.war//org.guvnor.ala.pipeline.execution.PipelineExecutor.lambda$continuePipeline$0(PipelineExecutor.java:109)
at deployment.business-central.war//org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:38)
at deployment.business-central.war//org.guvnor.ala.pipeline.StageUtil$1.execute(StageUtil.java:33)
at deployment.business-central.war//org.guvnor.ala.pipeline.execution.PipelineExecutor.continuePipeline(PipelineExecutor.java:94)
at deployment.business-central.war//org.guvnor.ala.pipeline.execution.PipelineExecutor.execute(PipelineExecutor.java:76)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker.invokeLocalBuildPipeLine(BuildPipelineInvoker.java:88)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.ala.BuildPipelineInvoker$Proxy$_$$_WeldClientProxy.invokeLocalBuildPipeLine(Unknown Source)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.invokeLocalBuildPipeLine(BuildServiceHelper.java:156)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper.localBuild(BuildServiceHelper.java:67)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.service.BuildServiceHelper$Proxy$_$$_WeldClientProxy.localBuild(Unknown Source)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl.build(BuildServiceImpl.java:64)
at deployment.business-central.war//org.kie.workbench.common.services.backend.builder.service.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(Unknown Source)
at deployment.business-central.war//org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder$1.execute(ResourceChangeIncrementalBuilder.java:132)
at deployment.business-central.war//org.guvnor.common.services.builder.IncrementalBuilderExecutorManager.execute(IncrementalBuilderExecutorManager.java:90)
at jdk.internal.reflect.GeneratedMethodAccessor307.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
at org.jboss.as.weld.common@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
at org.jboss.as.weld.common@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:89)
at org.jboss.as.weld.common@23.0.2.Final//org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:102)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:232)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:373)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:149)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
at org.jboss.weld.core@3.1.6.Final//org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
at org.jboss.as.weld.common@23.0.2.Final//org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.singleton.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:106)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
at org.wildfly.security.elytron-private@1.15.3.Final//org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:633)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
at org.jboss.as.ee@23.0.2.Final//org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:191)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.LogDiagnosticContextRecoveryInterceptor.processInvocation(LogDiagnosticContextRecoveryInterceptor.java:82)
at org.jboss.invocation@1.6.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$2$2.runInvocation(AsyncFutureInterceptorFactory.java:152)
at org.jboss.as.ejb3@23.0.2.Final//org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:81)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:829)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.util.zip.ZipException: ZipFile invalid LOC header (bad signature)
at java.base/java.util.zip.ZipFile$ZipFileInputStream.initDataOffset(ZipFile.java:1009)
at java.base/java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:1019)
at java.base/java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:469)
at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
at deployment.business-central.war//org.drools.ecj.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:279)
... 128 more
Issue was the maven repo directory was not allowed to be written to by the process running the rules. The directory was +rwx however the process was sandboxed and could only write to certain directories. Added the maven repo to the allowed directories for the process and it worked.