Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2356

gimzo IllegalStateException on @PlanningPin boolean isPinned()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 8.4.0.Final
    • 8.3.0.Final
    • optaplanner-core
    • None
    • Undefined
    • NEW
    • NEW

      I have this code in an planning entity called PersonAssignment:

          @PlanningPin
          public boolean isPinned() {
              return person.isPinned();
          }
      

      which causes this error

      2021-03-04 12:19:12,651 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (vert.x-worker-thread-4) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
              [error]: Build step org.optaplanner.quarkus.deployment.OptaPlannerProcessor#recordAndRegisterBeans threw an exception: java.lang.IllegalStateException: The getterMethod (isPinned) with a PlanningPin annotation must have a primitive boolean return type but returns (Z). Maybe rename the method (getPinned)?
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.assertIsGoodMethod(GizmoMemberAccessorImplementor.java:274)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.lambda$createGetName$3(GizmoMemberAccessorImplementor.java:303)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberDescriptor.whenIsMethod(GizmoMemberDescriptor.java:138)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.createGetName(GizmoMemberAccessorImplementor.java:302)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.defineAccessorFor(GizmoMemberAccessorImplementor.java:104)
              at org.optaplanner.quarkus.deployment.GizmoMemberAccessorEntityEnhancer.generateMethodAccessor(GizmoMemberAccessorEntityEnhancer.java:221)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.generateDomainAccessors(OptaPlannerProcessor.java:476)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.recordAndRegisterBeans(OptaPlannerProcessor.java:162)
              at jdk.internal.reflect.GeneratedMethodAccessor170.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 io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
              at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
              at java.base/java.lang.Thread.run(Thread.java:834)
              at org.jboss.threads.JBossThread.run(JBossThread.java:501)
      
              at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:308)
              at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:195)
              at io.quarkus.runner.bootstrap.AugmentActionImpl.reloadExistingApplication(AugmentActionImpl.java:59)
              at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:190)
              at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:176)
              at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:256)
              at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:62)
              at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:52)
              at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
              at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
              [error]: Build step org.optaplanner.quarkus.deployment.OptaPlannerProcessor#recordAndRegisterBeans threw an exception: java.lang.IllegalStateException: The getterMethod (isPinned) with a PlanningPin annotation must have a primitive boolean return type but returns (Z). Maybe rename the method (getPinned)?
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.assertIsGoodMethod(GizmoMemberAccessorImplementor.java:274)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.lambda$createGetName$3(GizmoMemberAccessorImplementor.java:303)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberDescriptor.whenIsMethod(GizmoMemberDescriptor.java:138)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.createGetName(GizmoMemberAccessorImplementor.java:302)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.defineAccessorFor(GizmoMemberAccessorImplementor.java:104)
              at org.optaplanner.quarkus.deployment.GizmoMemberAccessorEntityEnhancer.generateMethodAccessor(GizmoMemberAccessorEntityEnhancer.java:221)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.generateDomainAccessors(OptaPlannerProcessor.java:476)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.recordAndRegisterBeans(OptaPlannerProcessor.java:162)
              at jdk.internal.reflect.GeneratedMethodAccessor170.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 io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
              at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
              at java.base/java.lang.Thread.run(Thread.java:834)
              at org.jboss.threads.JBossThread.run(JBossThread.java:501)
      
              at io.quarkus.builder.Execution.run(Execution.java:116)
              at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
              at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:153)
              at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:306)
              ... 12 more
      Caused by: java.lang.IllegalStateException: The getterMethod (isPinned) with a PlanningPin annotation must have a primitive boolean return type but returns (Z). Maybe rename the method (getPinned)?
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.assertIsGoodMethod(GizmoMemberAccessorImplementor.java:274)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.lambda$createGetName$3(GizmoMemberAccessorImplementor.java:303)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberDescriptor.whenIsMethod(GizmoMemberDescriptor.java:138)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.createGetName(GizmoMemberAccessorImplementor.java:302)
              at org.optaplanner.core.impl.domain.common.accessor.gizmo.GizmoMemberAccessorImplementor.defineAccessorFor(GizmoMemberAccessorImplementor.java:104)
              at org.optaplanner.quarkus.deployment.GizmoMemberAccessorEntityEnhancer.generateMethodAccessor(GizmoMemberAccessorEntityEnhancer.java:221)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.generateDomainAccessors(OptaPlannerProcessor.java:476)
              at org.optaplanner.quarkus.deployment.OptaPlannerProcessor.recordAndRegisterBeans(OptaPlannerProcessor.java:162)
              at jdk.internal.reflect.GeneratedMethodAccessor170.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 io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
              at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
              at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
              at java.base/java.lang.Thread.run(Thread.java:834)
              at org.jboss.threads.JBossThread.run(JBossThread.java:501)
      
      

              cchianel Christopher Chianelli (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: