You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The drools ANC compiler fails in 2.1.0 (not in 2.0.1) on optaplanner's activemq-quarkus quickstart
because the classloader changed.
Before (2.0.1):
After (2.1.0):
The strange thing is, that it doesn't fail for any of the other quickstarts (those use resteasy and sometimes hibernate, this one uses smallrye).
Comparing the dependency tree between 2.0.1 and 2.1.0 shows nothing besides the quarkus version change that could explain this.
Expected behavior
A successful test with the reproducer below.
Actual behavior
2021-07-30 16:29:06,337 WARN [org.acm.sch.mes.TimeTableMessagingHandler] (ForkJoinPool.commonPool-worker-3) Error during processing a solver request (1).: org.drools.ancompiler.CouldNotCreateAlphaNetworkCompilerException: Cannot create Compiled Alpha Network
at org.drools.ancompiler.CompiledNetworkSource.newCompiledNetworkInstance(CompiledNetworkSource.java:80)
at org.drools.ancompiler.CompiledNetworkSource.createInstanceAndSet(CompiledNetworkSource.java:66)
at org.drools.ancompiler.KieBaseUpdaterANC.lambda$inMemoryUpdate$0(KieBaseUpdaterANC.java:72)
at java.base/java.util.HashMap$Values.forEach(HashMap.java:976)
at org.drools.ancompiler.KieBaseUpdaterANC.inMemoryUpdate(KieBaseUpdaterANC.java:70)
at org.drools.ancompiler.KieBaseUpdaterANC.run(KieBaseUpdaterANC.java:52)
at org.drools.ancompiler.KieBaseUpdaterANC.generateAndSetInMemoryANC(KieBaseUpdaterANC.java:99)
at org.optaplanner.core.impl.score.stream.drools.DroolsConstraintSessionFactory.buildKieBaseFromModel(DroolsConstraintSessionFactory.java:85)
at org.optaplanner.core.impl.score.stream.drools.DroolsConstraintSessionFactory.buildSession(DroolsConstraintSessionFactory.java:126)
at org.optaplanner.core.impl.score.director.stream.DroolsConstraintStreamScoreDirectorFactory.newConstraintStreamingSession(DroolsConstraintStreamScoreDirectorFactory.java:50)
at org.optaplanner.core.impl.score.director.stream.DroolsConstraintStreamScoreDirector.resetConstraintStreamingSession(DroolsConstraintStreamScoreDirector.java:75)
at org.optaplanner.core.impl.score.director.stream.DroolsConstraintStreamScoreDirector.setWorkingSolution(DroolsConstraintStreamScoreDirector.java:67)
at org.optaplanner.core.impl.solver.scope.SolverScope.setWorkingSolutionFromBestSolution(SolverScope.java:215)
at org.optaplanner.core.impl.solver.AbstractSolver.solvingStarted(AbstractSolver.java:80)
at org.optaplanner.core.impl.solver.DefaultSolver.solvingStarted(DefaultSolver.java:200)
at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:174)
at org.acme.schooltimetabling.messaging.TimeTableMessagingHandler.lambda$solve$0(TimeTableMessagingHandler.java:79)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1728)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.NoSuchMethodException: org.drools.ancompiler.Compiledorg_acme_schooltimetabling_domain_LessonNetwork31008790748.<init>(org.drools.core.spi.InternalReadAccessor, java.util.Map)
at java.base/java.lang.Class.getConstructor0(Class.java:3349)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2553)
at org.drools.ancompiler.CompiledNetworkSource.newCompiledNetworkInstance(CompiledNetworkSource.java:77)
... 23 more
How to Reproduce?
git clone https://github.com/kiegroup/optaplanner-quickstarts.git
cd optaplanner-quickstarts
git checkout development
cd technology/java-activemq-quarkus
gedit pom.xml // Switch it to 2.1.0.Final
mvn clean install -DskipTests
cd solver
mvn test -Dtest=TimeTableMessagingHandlerTest#solve
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
The drools ANC compiler fails in 2.1.0 (not in 2.0.1) on optaplanner's activemq-quarkus quickstart
because the classloader changed.
Before (2.0.1):
After (2.1.0):
The strange thing is, that it doesn't fail for any of the other quickstarts (those use resteasy and sometimes hibernate, this one uses smallrye).
Comparing the dependency tree between 2.0.1 and 2.1.0 shows nothing besides the quarkus version change that could explain this.
Expected behavior
A successful test with the reproducer below.
Actual behavior
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Reproduced on multiple machines (Radovan, Geoffrey, Luca).
Zulip discussion: https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/2.2E1.2E0.20Classloading.20regressions
The text was updated successfully, but these errors were encountered: