IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2014-01-14T11:28:30Z by ptrinchi
3 Posts

Pinned topic Warning about XML mappings in Liberty profile

‏2013-12-18T07:48:34Z |

Hi All,

I have an @Entity class with a field mapped to a DB2 XML datatype using the annotations (JobData is a JAXB generated class):

@Persistent(fetch = FetchType.LAZY)
@Column(name = "DATA")
private JobData jobData;

When I deploy the application on Liberty profile ( I receive this warning in the trace:

CWWJP9991W: openjpa.MetaData: Warn: OpenJPA cannot map field "Job.jobData" efficiently.  It is of an unsupported type. The field value will be serialized to a BLOB by default.

Any idea about the possible cause of this warning and its effect at runtime ?

The datasource is defined as follow:

<variable name="DB2_JCC_DRIVER_PATH" value="/home/db2inst1/sqllib/java/"/>

<library id="db2-jcc-lib" name="DB2 JCC Database Drivers">
    <fileset dir="${DB2_JCC_DRIVER_PATH}" includes="db2jcc4.jar db2jcc_license_cu.jar"/>

<jdbcDriver id="db2-jcc-driver" libraryRef="db2-jcc-lib"/>
<dataSource connectionSharing="MatchOriginalRequest" jdbcDriverRef="db2-jcc-driver" jndiName="jdbc/WG" type="javax.sql.XADataSource">
    <properties.db2.jcc currentSchema="TST" databaseName="TSTDB" password="{xor}KT4zOm1obm5tb29rLTYw" portNumber="50000" serverName="localhost" user="db2inst1"/>

Thanks for your help



  • AlexMulholland
    32 Posts

    Re: Warning about XML mappings in Liberty profile

    ‏2013-12-19T14:24:35Z  in response to ptrinchi

    Hello Patrizio,

    There are a couple of suggestions for this message on stack overflow:

    - make sure the entity is in the persistence.xml

    - check for relationships to another class that isn't annotated with @ManyToOne, @OneToMany or similar

    There's a similar posting here:

    I hope this helps.

    Regards, Alex.


    • ptrinchi
      3 Posts

      Re: Warning about XML mappings in Liberty profile

      ‏2014-01-14T11:28:30Z  in response to AlexMulholland

      Hi Alex,

      thanks for the hints, but I my scenario is slightly different. When I'd like to implement is a mapping with an XML database column.
      I already have all the entity classes enlisted in persistence.xml and no relations with other entities, but I still receive that warning from WebSphere Liberty Profile. The same EAR deployed to a full profile doesn't give any problem. Is is a known limitation of the JPA implementation provided by Liberty? or there is some other way to manage the XML column mapping an that platform?

      Thanks again for your help