OpenJPA
  1. OpenJPA
  2. OPENJPA-1481

metadata preload thinks a varchar column is a blob

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: jpa
    • Labels:
      None

      Description

      Without metadata preload on, my application is working fine. When I turned on metadata preload, creating the factory fails with an error like this:

      -------------------
      Caused by: <openjpa-1.2.2-r422266:898935 fatal user error> org.apache.openjpa.persistence.ArgumentException: "com.att.ecom.dynamiccontent.domain.pricelist.PriceListFolder.childItems<element:class com.att.ecom.dynamiccontent.domain.pricelist.PriceList>" declares a column that is not compatible with the expected type "blob". Column details:
      Full Name: DCS_PRICE_LIST.PRICE_LIST_ID
      Type: varchar
      Size: 255
      Default: null
      Not Null: false
      -------------------

      This error message is from the unit test output, which uses Derby. My application normally uses Oracle. The only difference in the error message between the unit test with Derby and at runtime with Oracle is the type is "varchar2" (Derby only has varchar).

      The excerpt from the orm.xml for this property is this:

      <id name="id">
      <column name="PRICE_LIST_ID"/>
      </id>

      And from the domain class:

      @Id
      private String id;

      I'm going to attach the "TEST" output file from the build which shows the error message and stack trace. I'm also going to attach a zip file containing an Eclipse project, but the "lib" and "libtest" directories will only have a "jars.lst" text file containing the names of the jars that were in that directory (almost all of which have a version number in the name). Note that not all of the jars in those lists are required for the unit test to complete. Some of the jars in the list are required for the CXF and Spring portion of the application, so wouldn't be necessary for this test case.

      1. TEST-com.att.ecom.dynamiccontent.content.CategoryJPATest.txt
        13 kB
        David M. Karr
      2. OPENJPA-1481--test.zip
        2 kB
        Rick Curtis
      3. jpatestcase.zip
        98 kB
        David M. Karr

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            David M. Karr
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development