-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
area/hibernate-ormHibernate ORMHibernate ORMkind/bug-thirdpartyBugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.
Milestone
Description
Describe the bug
I updated a project from 3.17.0 to 3.17.2 and started receiving exceptions in building and testing related to Hibernate bytecode enhancing:
java.lang.RuntimeException at QuarkusTestExtension.java:628
Caused by: java.lang.RuntimeException at AugmentActionImpl.java:355
Caused by: io.quarkus.builder.BuildException at Execution.java:124
Caused by: java.lang.reflect.UndeclaredThrowableException at ExtensionLoader.java:862
Caused by: java.util.concurrent.ExecutionException at FutureTask.java:122
Caused by: org.hibernate.bytecode.enhance.spi.EnhancementException at EnhancerImpl.java:131
Caused by: java.lang.StringIndexOutOfBoundsException at Preconditions.java:55
I traced it down to Hibernates Enhancer [1]. Starting from Quarkus 3.17.1 the Hibernate version used does not seem to like entities like
@Entity
class Entity(@Id var id: Long, var year: Int, var january: Double, var february: Double, ...) : PanacheEntityBase {
operator fun get(month: Month) = ...
companion object : PanacheCompanionBase<Entity, Long> {
fun get(year: Int): Entity = ...
}
}The enhancer does not like both get methods.
Expected behavior
Quarkus builds the project without any issues.
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
Linux
Output of java -version
21
Quarkus version or git rev
3.17.1+
Build tool (ie. output of mvnw --version or gradlew --version)
Gradle 8.11.1
Additional information
I'm not sure whether this is a Quarkus or Hibernate issue; but since it's also occurring on Quarkus/ Panache companion objects, I decided to start here.
Metadata
Metadata
Assignees
Labels
area/hibernate-ormHibernate ORMHibernate ORMkind/bug-thirdpartyBugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.Bugs that are caused by third-party components and not causing a major dysfunction of core Quarkus.