org.jdbi.v3.core.exception.UnableToCreateStatementException: Exception parsing for named parameter replacement [statement:" select id from something <if(sortBy)> order by <sortBy> <endif> ", rewritten:"null", arguments:{ positional:{}, named:{}, finder:[]}]

GitHub | arteam | 6 months ago
  1. 0

    Conditional string templates don't work

    GitHub | 6 months ago | arteam
    org.jdbi.v3.core.exception.UnableToCreateStatementException: Exception parsing for named parameter replacement [statement:" select id from something <if(sortBy)> order by <sortBy> <endif> ", rewritten:"null", arguments:{ positional:{}, named:{}, finder:[]}]
  2. 0
    Some bots are sending malformed HTTP requests to your site. Try to find their IP addresses in the access logs and ask them to fix the bots or blacklist them.
  3. 0
    Properties of subclasses may have to be referenced in a different way. More on this here: https://goo.gl/FvnBXb
    via goo.gl
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      MismatchedTokenException(40!=62)

      at org.jdbi.v3.core.internal.lexer.DefineStatementLexer.reportError()
    2. org.jdbi.v3
      DefineStatementLexer.reportError
      1. org.jdbi.v3.core.internal.lexer.DefineStatementLexer.reportError(DefineStatementLexer.java:30)
      1 frame
    3. ANTLR 3 Runtime
      Lexer.nextToken
      1. org.antlr.runtime.Lexer.nextToken(Lexer.java:103)
      1 frame
    4. org.jdbi.v3
      TestConditionalStringTemplateLocator.testFind
      1. org.jdbi.v3.core.rewriter.DefinedAttributeRewriter.rewriteDefines(DefinedAttributeRewriter.java:57)
      2. org.jdbi.v3.core.rewriter.ColonPrefixStatementRewriter.rewrite(ColonPrefixStatementRewriter.java:59)
      3. org.jdbi.v3.core.SqlStatement.internalExecute(SqlStatement.java:1236)
      4. org.jdbi.v3.core.Query.iterator(Query.java:69)
      5. org.jdbi.v3.core.ResultBearing.stream(ResultBearing.java:83)
      6. org.jdbi.v3.core.ResultBearing.collect(ResultBearing.java:137)
      7. org.jdbi.v3.sqlobject.ResultReturnThing$DefaultResultReturnThing.result(ResultReturnThing.java:118)
      8. org.jdbi.v3.sqlobject.ResultReturnThing.map(ResultReturnThing.java:48)
      9. org.jdbi.v3.sqlobject.QueryHandler.invoke(QueryHandler.java:42)
      10. org.jdbi.v3.sqlobject.SqlObjectFactory.lambda$createMethodInterceptor$9(SqlObjectFactory.java:167)
      11. org.jdbi.v3.stringtemplate.TestConditionalStringTemplateLocator$Dao$$EnhancerByCGLIB$$cd04f13c.find(<generated>)
      12. org.jdbi.v3.stringtemplate.TestConditionalStringTemplateLocator.testFind(TestConditionalStringTemplateLocator.java:27)
      12 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    6. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
      6. org.junit.rules.RunRules.evaluate(RunRules.java:20)
      7. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      15. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      16. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      16 frames
    7. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
      2. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
      2 frames
    8. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      2 frames
    9. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    10. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      1 frame