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
I'm getting a NullPointerException when trying to use Jimmer's base query feature with window functions for implementing a leaderboard with pagination:
java.lang.NullPointerException: Cannot invoke "org.babyfish.jimmer.sql.ast.impl.table.StatementContext.allocateTableAlias()" because "stmtCtx" is null
at org.babyfish.jimmer.sql.ast.impl.table.RealTableImpl.allocateAliasImpl(RealTableImpl.java:804)
at org.babyfish.jimmer.sql.ast.impl.table.RealTableImpl.allocateAliases(RealTableImpl.java:768)
at org.babyfish.jimmer.sql.ast.impl.query.UseTableVisitor.allocateAliases(UseTableVisitor.java:28)
at org.babyfish.jimmer.sql.ast.impl.query.ConfigurableRootQueryImpl.preExecute(ConfigurableRootQueryImpl.java:385)
at org.babyfish.jimmer.sql.ast.impl.query.ConfigurableRootQueryImpl.executeImpl(ConfigurableRootQueryImpl.java:317)
...
at org.babyfish.jimmer.sql.ast.query.ConfigurableRootQuery.fetchPage(ConfigurableRootQuery.java:70)
Code
I'm following the base query documentation and trying to implement a paginated leaderboard query:
Is this approach correct? Am I using the base query API correctly with asBaseTable() and subsequent createQuery()?
Is this a bug or incorrect usage? The NPE in StatementContext.allocateTableAlias() suggests that the statement context is null when trying to execute the query. Should I open an issue for this, or is there a correct pattern I'm missing?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem Description
I'm getting a
NullPointerExceptionwhen trying to use Jimmer's base query feature with window functions for implementing a leaderboard with pagination:Code
I'm following the base query documentation and trying to implement a paginated leaderboard query:
Questions
Is this approach correct? Am I using the base query API correctly with
asBaseTable()and subsequentcreateQuery()?Is this a bug or incorrect usage? The NPE in
StatementContext.allocateTableAlias()suggests that the statement context is null when trying to execute the query. Should I open an issue for this, or is there a correct pattern I'm missing?Environment
Any guidance would be appreciated!
All reactions