It's throwing a java.lang.StackOverflowError during the execution of the custom repository's method with @Query with predefined jdql.
Here is the stacktrace as evidence:
/home/dearrudam/.sdkman/candidates/java/21.0.3.crac-zulu/bin/java -javaagent:/home/dearrudam/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/lib/idea_rt.jar=41275:/home/dearrudam/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /home/dearrudam/repo/github.com/jnosql/demos-se/mongodb-record/target/classes:/home/dearrudam/.m2/repository/org/eclipse/jnosql/databases/jnosql-mongodb/1.1.2-SNAPSHOT/jnosql-mongodb-1.1.2-20240826.180220-8.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/mapping/jnosql-mapping-document/1.1.2-SNAPSHOT/jnosql-mapping-document-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/mapping/jnosql-mapping-semistructured/1.1.2-SNAPSHOT/jnosql-mapping-semistructured-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/communication/jnosql-communication-semistructured/1.1.2-SNAPSHOT/jnosql-communication-semistructured-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/communication/jnosql-communication-query/1.1.2-SNAPSHOT/jnosql-communication-query-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/communication/jnosql-communication-core/1.1.2-SNAPSHOT/jnosql-communication-core-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/antlr/antlr4-runtime/4.12.0/antlr4-runtime-4.12.0.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/mapping/jnosql-mapping-core/1.1.2-SNAPSHOT/jnosql-mapping-core-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/mapping/jnosql-mapping-api-core/1.1.2-SNAPSHOT/jnosql-mapping-api-core-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/mapping/jnosql-mapping-reflection/1.1.2-SNAPSHOT/jnosql-mapping-reflection-1.1.2-SNAPSHOT.jar:/home/dearrudam/.m2/repository/io/github/classgraph/classgraph/4.8.174/classgraph-4.8.174.jar:/home/dearrudam/.m2/repository/org/eclipse/jnosql/databases/jnosql-database-commons/1.1.2-SNAPSHOT/jnosql-database-commons-1.1.2-20240826.180220-8.jar:/home/dearrudam/.m2/repository/org/mongodb/mongodb-driver-sync/5.1.3/mongodb-driver-sync-5.1.3.jar:/home/dearrudam/.m2/repository/org/mongodb/bson/5.1.3/bson-5.1.3.jar:/home/dearrudam/.m2/repository/org/mongodb/mongodb-driver-core/5.1.3/mongodb-driver-core-5.1.3.jar:/home/dearrudam/.m2/repository/org/mongodb/bson-record-codec/5.1.3/bson-record-codec-5.1.3.jar:/home/dearrudam/.m2/repository/jakarta/nosql/jakarta.nosql-api/1.0.0-M1/jakarta.nosql-api-1.0.0-M1.jar:/home/dearrudam/.m2/repository/jakarta/data/jakarta.data-api/1.0.0/jakarta.data-api-1.0.0.jar:/home/dearrudam/.m2/repository/net/datafaker/datafaker/2.0.2/datafaker-2.0.2.jar:/home/dearrudam/.m2/repository/org/yaml/snakeyaml/2.2/snakeyaml-2.2.jar:/home/dearrudam/.m2/repository/com/github/mifmif/generex/1.0.2/generex-1.0.2.jar:/home/dearrudam/.m2/repository/dk/brics/automaton/automaton/1.11-8/automaton-1.11-8.jar:/home/dearrudam/.m2/repository/org/jboss/weld/se/weld-se-shaded/5.1.0.Final/weld-se-shaded-5.1.0.Final.jar:/home/dearrudam/.m2/repository/org/eclipse/yasson/3.0.3/yasson-3.0.3.jar:/home/dearrudam/.m2/repository/jakarta/json/bind/jakarta.json.bind-api/3.0.0/jakarta.json.bind-api-3.0.0.jar:/home/dearrudam/.m2/repository/jakarta/json/jakarta.json-api/2.1.0/jakarta.json-api-2.1.0.jar:/home/dearrudam/.m2/repository/org/eclipse/parsson/parsson/1.1.0/parsson-1.1.0.jar:/home/dearrudam/.m2/repository/io/smallrye/config/smallrye-config-core/3.2.1/smallrye-config-core-3.2.1.jar:/home/dearrudam/.m2/repository/io/smallrye/common/smallrye-common-annotation/2.1.0/smallrye-common-annotation-2.1.0.jar:/home/dearrudam/.m2/repository/io/smallrye/common/smallrye-common-expression/2.1.0/smallrye-common-expression-2.1.0.jar:/home/dearrudam/.m2/repository/io/smallrye/common/smallrye-common-function/2.1.0/smallrye-common-function-2.1.0.jar:/home/dearrudam/.m2/repository/io/smallrye/common/smallrye-common-constraint/2.1.0/smallrye-common-constraint-2.1.0.jar:/home/dearrudam/.m2/repository/io/smallrye/common/smallrye-common-classloader/2.1.0/smallrye-common-classloader-2.1.0.jar:/home/dearrudam/.m2/repository/org/jboss/logging/jboss-logging/3.5.0.Final/jboss-logging-3.5.0.Final.jar:/home/dearrudam/.m2/repository/org/ow2/asm/asm/9.4/asm-9.4.jar:/home/dearrudam/.m2/repository/io/smallrye/config/smallrye-config-common/3.2.1/smallrye-config-common-3.2.1.jar:/home/dearrudam/.m2/repository/org/eclipse/microprofile/config/microprofile-config-api/3.0.2/microprofile-config-api-3.0.2.jar org.jnosql.demo.se.TaskApp
Aug 31, 2024 8:42:35 AM org.jboss.weld.bootstrap.WeldStartup <clinit>
INFO: WELD-000900: 5.1.0 (Final)
Aug 31, 2024 8:42:35 AM org.jboss.weld.environment.deployment.discovery.ReflectionDiscoveryStrategy processAnnotatedDiscovery
INFO: WELD-ENV-000014: Falling back to Java Reflection for bean-discovery-mode="annotated" discovery. Add org.jboss:jandex to the classpath to speed-up startup.
Aug 31, 2024 8:42:36 AM org.jboss.weld.bootstrap.WeldStartup startContainer
INFO: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Aug 31, 2024 8:42:36 AM org.eclipse.jnosql.mapping.reflection.ClassGraphClassScanner <init>
INFO: The following repositories are not supported: []
Aug 31, 2024 8:42:37 AM org.eclipse.jnosql.mapping.Databases lambda$addDatabase$1
INFO: Found the type DOCUMENT to metadata DOCUMENT@
Aug 31, 2024 8:42:37 AM org.eclipse.jnosql.mapping.document.spi.DocumentExtension onAfterBeanDiscovery
INFO: Processing Document extension: 1 databases crud 0 found, custom repositories: 2
Aug 31, 2024 8:42:37 AM org.eclipse.jnosql.mapping.document.spi.DocumentExtension onAfterBeanDiscovery
INFO: Processing repositories as a Document implementation: []
Aug 31, 2024 8:42:37 AM org.jboss.weld.environment.se.WeldContainer fireContainerInitializedEvent
INFO: WELD-ENV-002003: Weld SE container c4b471ff-47c0-4c05-9591-f8979b8ecfe0 initialized
Aug 31, 2024 8:42:37 AM com.mongodb.internal.diagnostics.logging.Loggers shouldUseSLF4J
WARNING: SLF4J not found on the classpath. Logging is disabled for the 'org.mongodb.driver' component
Aug 31, 2024 8:42:37 AM org.jboss.weld.environment.se.WeldContainer shutdown
INFO: WELD-ENV-002001: Weld SE container c4b471ff-47c0-4c05-9591-f8979b8ecfe0 shut down
Exception in thread "main" java.lang.StackOverflowError
at java.base/java.lang.Class.getDeclaredAnnotation(Class.java:4174)
at java.base/sun.reflect.annotation.AnnotationSupport.getIndirectlyPresent(AnnotationSupport.java:102)
at java.base/sun.reflect.annotation.AnnotationSupport.getDirectlyAndIndirectlyPresent(AnnotationSupport.java:75)
at java.base/java.lang.reflect.Executable.getAnnotationsByType(Executable.java:612)
at org.eclipse.jnosql.mapping.core.query.RepositoryType.of(RepositoryType.java:167)
at org.eclipse.jnosql.mapping.semistructured.query.CustomRepositoryHandler.invoke(CustomRepositoryHandler.java:89)
at jdk.proxy2/jdk.proxy2.$Proxy45.listAllEnabled(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
at org.jnosql.demo.se.Tasks$538109938$Proxy$_$$_WeldClientProxy.listAllEnabled(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.jnosql.mapping.core.query.AbstractRepositoryProxy.lambda$invoke$11(AbstractRepositoryProxy.java:182)
at org.eclipse.jnosql.mapping.core.query.AbstractRepositoryProxy.unwrapInvocationTargetException(AbstractRepositoryProxy.java:214)
at org.eclipse.jnosql.mapping.core.query.AbstractRepositoryProxy.invoke(AbstractRepositoryProxy.java:182)
at org.eclipse.jnosql.mapping.semistructured.query.CustomRepositoryHandler.lambda$invoke$12(CustomRepositoryHandler.java:149)
at org.eclipse.jnosql.mapping.semistructured.query.CustomRepositoryHandler.unwrapInvocationTargetException(CustomRepositoryHandler.java:167)
at org.eclipse.jnosql.mapping.semistructured.query.CustomRepositoryHandler.invoke(CustomRepositoryHandler.java:149)
at jdk.proxy2/jdk.proxy2.$Proxy45.listAllEnabled(Unknown Source)
Which JNoSQL project the issue refers to?
JNoSQL (Core)
Bug description
It's throwing a java.lang.StackOverflowError during the execution of the custom repository's method with @Query with predefined jdql.
Here is the stacktrace as evidence:
JNoSQL Version
1.1.2-SNAPSHOT
Steps To Reproduce
main
branch of this repo: https://github.com/JNOSQL/demos-seExpected Results
It's expected to execute the method successfully.
Code example, screenshot, or link to a repository
No response