users@glassfish.java.net

Toplink Exceptions while using Hibernate?

From: <glassfish_at_javadesktop.org>
Date: Sat, 29 Sep 2007 07:46:34 PDT

I'm a persistence noob, so please be gentle!

I'm using Hibernate as my persistence manager. Here is my persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:ns2="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="org.jvnet.hyperjaxb3.ejb.tests.po" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>jdbc/craeConnectionPool</jta-data-source>
        <class>org.jvnet.hyperjaxb3.ejb.tests.po.PurchaseOrderType</class>
        <class>org.jvnet.hyperjaxb3.ejb.tests.po.Items</class>
        <class>org.jvnet.hyperjaxb3.ejb.tests.po.Items$Item</class>
        <class>org.jvnet.hyperjaxb3.ejb.tests.po.USAddress</class>
        <properties>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
        </properties>
  </persistence-unit>
</persistence>

When I try to deploy my web application which uses it, however, I get Toplink exceptions. Does Hibernate use Toplink Essentials? I don't think it should, right? ;)

nternal Exception: Exception [TOPLINK-7212] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [orderDateItem] from the entity class [class org.jvnet.hyperjaxb3.ejb.tests.po.PurchaseOrderType] does not specify a temporal type. A temporal type must be specified for persistent fields or properties of type java.util.Date and java.util.Calendar.
        at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228)
[Message sent by forum member 'wfsaxton' (wfsaxton)]

http://forums.java.net/jive/thread.jspa?messageID=237697