Skip to content
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

Panache - could not find indexed method #9635

Closed
mkouba opened this issue May 27, 2020 · 1 comment
Closed

Panache - could not find indexed method #9635

mkouba opened this issue May 27, 2020 · 1 comment
Assignees
Labels
area/panache kind/bug Something isn't working
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented May 27, 2020

As discussed on zulip if a panache entity overrides a static method from PanacheEntityBase with an array argument the fails with:

Caused by: java.lang.IllegalStateException: Could not find indexed method: Lio/quarkus/it/panache/Beer;.persist with descriptor (Ljava/lang/Object;[Ljava/lang/Object;)V and arg types [java.lang.Object, java/lang/Object[]]
	at io.quarkus.panache.common.deployment.PanacheEntityEnhancer$PanacheEntityClassVisitor.visitMethod(PanacheEntityEnhancer.java:142)

The arg type java/lang/Object[] is very likely wrong.

Steps to reproduce:

  1. Modify the Beer entity as follows
  2. Run the TransactionalRepositoryTest from integration-tests/hibernate-orm-panache
@Entity
public class Beer extends PanacheEntity {

   public String name;

   public static void persist(Object firstEntity, Object... entities) {
       PanacheEntityBase.persist(firstEntity, entities);
   }
}
@mkouba mkouba added kind/bug Something isn't working area/panache labels May 27, 2020
@FroMage FroMage self-assigned this May 27, 2020
@FroMage
Copy link
Member

FroMage commented May 27, 2020

Fix at #9637.

FroMage added a commit to FroMage/quarkus that referenced this issue May 27, 2020
FroMage added a commit to FroMage/quarkus that referenced this issue May 27, 2020
@mkouba mkouba closed this as completed in a2093c0 May 27, 2020
mkouba added a commit that referenced this issue May 27, 2020
@FroMage FroMage added this to the 1.6.0 - master milestone May 28, 2020
@gsmet gsmet modified the milestones: 1.6.0 - master, 1.5.1.Final Jun 10, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 10, 2020
johnaohara pushed a commit to johnaohara/quarkus that referenced this issue Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants