Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-157

NullPointerException when running query with null parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.7
    • jdbc
    • None

    Description

      NullPointerException when running query with null parameter value, testcase attached.

      Caused by: java.lang.NullPointerException
      at org.apache.openjpa.jdbc.meta.strats.RelationStrategies.toDataStoreValue(RelationStrategies.java:87)
      at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.toDataStoreValue(RelationFieldStrategy.java:597)
      at org.apache.openjpa.jdbc.meta.FieldMapping.toDataStoreValue(FieldMapping.java:795)
      at org.apache.openjpa.jdbc.kernel.exps.PCPath.toDataStoreValue(PCPath.java:542)
      at org.apache.openjpa.jdbc.kernel.exps.Param.calculateValue(Param.java:106)
      at org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression.appendTo(CompareEqualExpression.java:86)
      at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:237)
      at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:78)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:323)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:165)
      at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:672)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:930)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:742)

      Attachments

        1. testcase.zip
          2 kB
          Srinivasa Segu

        Activity

          People

            Unassigned Unassigned
            ssegu Srinivasa Segu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: