OpenJPA
  1. OpenJPA
  2. OPENJPA-353

Character discriminators are not converted correctly if storeCharsAsNumbers = true

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1, 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      If an application uses DiscriminatorType.CHAR and storeCharsAsNumbers is set to true in the DBDictionary they'll see an error similar to this one when the row is fetched from the database.

      Caused by: java.lang.ClassNotFoundException: Could not map disciminator value "99" to any known subclasses of the requested class "org.apache.openjpa.persistence.discriminator.CharAbstractEntity" (known discriminator values: [C, R, c]).
      at org.apache.openjpa.jdbc.meta.strats.ValueMapDiscriminatorStrategy.getClass(ValueMapDiscriminatorStrategy.java:98)
      at org.apache.openjpa.jdbc.meta.strats.InValueDiscriminatorStrategy.getClass(InValueDiscriminatorStrategy.java:117)
      at org.apache.openjpa.jdbc.meta.Discriminator.getClass(Discriminator.java:398)
      at org.apache.openjpa.jdbc.meta.strats.SuperclassDiscriminatorStrategy.getClass(SuperclassDiscriminatorStrategy.java:63)
      at org.apache.openjpa.jdbc.meta.Discriminator.getClass(Discriminator.java:398)
      at org.apache.openjpa.jdbc.meta.strats.SuperclassDiscriminatorStrategy.getClass(SuperclassDiscriminatorStrategy.java:63)
      at org.apache.openjpa.jdbc.meta.Discriminator.getClass(Discriminator.java:398)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:320)
      at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:255)
      ... 34 more

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        11d 17h 42m 1 Michael Dick 18/Sep/07 15:31
        Resolved Resolved Closed Closed
        6d 28m 1 Michael Dick 24/Sep/07 15:59
        Michael Dick made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Michael Dick made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Michael Dick added a comment -

        Fixed in current dev streams.

        Show
        Michael Dick added a comment - Fixed in current dev streams.
        Michael Dick created issue -

          People

          • Assignee:
            Michael Dick
            Reporter:
            Michael Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development