-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about ecj support #6227
Comments
lfi-aud
changed the title
Questions about java version support and ecj support
Question about ecj support
Jan 22, 2025
Hi,
Is there any reason why you're using drools-ecj? I strongly advise on
removing it from your dependencies. In this way drools will use the java
compiler directly embedded in the jdk.
Regards,
Mario
…On Wed, Jan 22, 2025 at 6:26 PM lfi ***@***.***> wrote:
Hi,
We have a project where we use the latest version of spring-boot with java
21 (latest LTS java version). In a new spring boot project no issue is
found with the implementation of our use cases. But in the final app, we
have a dependency which overrides one of your dependencies.
the dependency is jasperreports in version 6.3.0 which have
org.eclipse.jdt.core.compiler:ecj:4.3.1 as a dependency.
This one overrides org.eclipse.jdt:ecj:3.33.0 used in org.drools:
drools-ecj:10.0.0.
It leads us to the following exception:
Caused by: java.lang.RuntimeException: wrong class format
at org.drools.ecj.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:295)
at org.drools.ecj.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:252)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:145)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getType(PackageBinding.java:141)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findType(Scope.java:1675)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2819)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getBinding(Scope.java:1930)
at org.eclipse.jdt.internal.compiler.lookup.BlockScope.getBinding(BlockScope.java:426)
at org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference.resolveType(QualifiedNameReference.java:992)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:562)
at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:970)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:510)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:265)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:469)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1185)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1295)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:561)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:770)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
at org.drools.ecj.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:391)
at org.kie.memorycompiler.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:45)
at org.drools.mvel.java.JavaDialect.compileAll(JavaDialect.java:418)
at org.drools.compiler.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:64)
at org.drools.compiler.compiler.PackageRegistry.compileAll(PackageRegistry.java:88)
at org.drools.compiler.builder.impl.PackageRegistryManagerImpl.compileAll(PackageRegistryManagerImpl.java:199)
at org.drools.compiler.builder.impl.processors.ConsequenceCompilationPhase.process(ConsequenceCompilationPhase.java:38)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.wireAllRules(KnowledgeBuilderImpl.java:463)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.buildRules(KnowledgeBuilderImpl.java:1020)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.doFirstBuildStep(KnowledgeBuilderImpl.java:990)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:119)
at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:109)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:280)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:220)
at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:84)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:285)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:251)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:198)
Do you plan on updating ecj ? Or do you have a workaround to temporary fix
this issue ?
Thank you.
—
Reply to this email directly, view it on GitHub
<#6227>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC3ALNLPYZKRSRVLKSW75D2L7IERAVCNFSM6AAAAABVVO67GOVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYDIOJVGQ3DQNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, Drools-ecj is used by default because it is a dependency of kie-ci but if I can exclude it, that's fine for me Thank you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
We have a project where we use the latest version of spring-boot with java 21 (latest LTS java version).
In a new spring-boot project, no issue is found with the implementation of our use cases. But in the final app, we have a dependency which overrides one of your dependencies.
The dependency we have is jasperreports in version 6.3.0 which has org.eclipse.jdt.core.compiler:ecj:4.3.1 as a dependency.
This one overrides org.eclipse.jdt:ecj:3.33.0 used in org.drools:drools-ecj:10.0.0.
It leads us to the following exception:
Do you plan on updating ecj ? Or do you have a workaround to temporary fix this issue ?
Thank you.
The text was updated successfully, but these errors were encountered: