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

Certain query failing after svn:739123

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0.0-M2
    • 2.0.0-M1, 2.0.0-M2
    • kernel
    • None

    Description

      We were using the nightly snapshot builds, then this morning our app stopped working. A certain query ( it looks quite normal to me ), fails, and we have no clue what's going on.

      The stack trace is below. It complains that a parameter type is not allowed, even though it has been working until that check-in. And the type is a normal Entity, related through a ManyToOne relationship from the other class.. The class code excerpts are below as well..

      2009-01-30 11:43:31,349 [btpool0-1] DEBUG openjpa.Query - Executing query: [SELECT t0.JDOID, t0.CREATETIME, t0.BRACKET_JDOID, t0.GROUP0, t0.USER_JDOID FROM BRACKETEER t0 WHERE (t0.GROUP0 = ? AND t0.USER_JDOID = ?)] with parameters:

      {1=com.protrade.bracket.data.entities.User@b1406b[ fbId=578696943 appAdded=false recruiter=<null> numMinibrackets=0 numBrackets=0 createTime=1233343722122 idLong=9000 jdoId=<null> jdoversion=0 ], 0=<<BracketGroupId:BracketGroup:32>>}


      2009-01-30 11:28:42,483 [btpool0-2] ERROR com.protrade.bracket.fbsite.filters.AppSubscriptionHandler - The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
      <openjpa-2.0.0-SNAPSHOT-r422266:739178 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class com.protrade.bracket.data.entities.User" is not a valid query parameter.
      at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1354)
      at org.apache.openjpa.jdbc.kernel.SQLStoreQuery$SQLExecutor.executeQuery(SQLStoreQuery.java:314)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:997)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:846)
      at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:777)
      at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
      at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:274)
      at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:284)
      at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:195)
      at com.protrade.common.persistence.JPAUtil.execute(JPAUtil.java:170)
      at com.protrade.common.persistence.JPAUtil.executeList(JPAUtil.java:155)
      at com.protrade.common.persistence.JPADQuery.list(JPADQuery.java:24)
      at com.protrade.common.persistence.BaseRootDAOBase.runListQueryWithListNCS(BaseRootDAOBase.java:272)
      at com.protrade.common.persistence.BaseRootDAOBase.findByFieldsNCS(BaseRootDAOBase.java:199)
      at com.protrade.common.persistence.BaseRootDAOBase.existsByFieldsNCS(BaseRootDAOBase.java:236)
      at com.protrade.common.persistence.BaseDAOBase.existsByFieldsNCS(BaseDAOBase.java:144)
      at com.protrade.bracket.data.BracketDao.isBracketeer(BracketDao.java:152)

      @Entity
      public class Bracketeer extends HBaseIdCreateTime implements IBracketeer {
      ...
      @Persistent
      @Externalizer( "getIdLong" )
      private BracketGroupId group;

      @ManyToOne
      @JoinColumn( name = "USER_JDOID" )
      private User user;
      ...
      }

      @Entity
      public class User extends HBaseIdCreateTime implements UnifiedSocialUser {
      ...
      }

      Attachments

        1. TestSetParameter.java
          4 kB
          Catalina Wei

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fern Fernando Padilla
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: