0 Replies Latest reply on Aug 27, 2006 5:34 AM by Ilan Amar

    "mapped-superclass" element in persistence XML.

    Ilan Amar Newbie

      Hi everyone,

      I am using "mapped-superclass" element in persistence XML and I am getting the following error message: "Reason: java.lang.ClassCastException: $Proxy169", while using @MappedSuperclass notation everything works fine. I must specify that the persistence provider I am working with is Hibernate and JBoss version 4.0.4.

      The following is the exact persistence XML:

      <?xml version="1.0" encoding="UTF-8"?>
      <entity-mappings xmlns="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/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
      <mapped-superclass class="com.fts.domain.ValueObject"/>

      <sequence-generator name="CUSTOMER_PK" sequence-name="CUSTOMER_SEQ"/>

      <generated-value generator="CUSTOMER_PK"/>


      I will appreciate any help.

      Thanks a lot