users@glassfish.java.net

Cannot find value in class indicator mapping in parent descriptor

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 Mar 2007 03:50:33 PST

I have Three Entity classes : GrandParent, Parent and Child.

When i make Child extend GrandParent I get the exception :

     [java] Exception [TOPLINK-108] (Oracle TopLink Essentials - 9.1 (Build b25)): oracle.toplink.essentials.exceptions.DescriptorException
     [java] Exception Description: Cannot find value in class indicator mapping in parent descriptor [RelationalDescriptor(GrandParent --> [DatabaseTable(GRANDPARENT)])].
     [java] Descriptor: RelationalDescriptor(Parent --> [DatabaseTable(GRANDPARENT)])

     [java] Exception [TOPLINK-41] (Oracle TopLink Essentials - 9.1 (Build b25)): oracle.toplink.essentials.exceptions.DescriptorException
     [java] Exception Description: A non-read-only mapping must be defined for the sequence number field.
     [java] Descriptor: RelationalDescriptor(Parent --> [DatabaseTable(GRANDPARENT)])

     [java] Runtime Exceptions:
     [java] ---------------------------------------------------------

     [java] at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:428)
     [java] at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:360)
     [java] at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:677)
     [java] at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:559)
     [java] at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:185)
     [java] at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:193) [java] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
     [java] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:113)
     [java] at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:107)
     [java] at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
     [java] at Main.main(Main.java:25)

I am confused on what this means and how i can rectify this.

Oracle's webpage[1] does not say much about the above reported error code :108.

Following are the entities (snipped for brevity)
<code>
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public abstract class GrandParent
{
    private int id;
    private String name;

    @Id
    @Basic
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "DIO_SEQ_GEN")
    public int getId()
    {
        return id;
    }
}

@Entity
public abstract class Parent extends GrandParent
{
}

@Entity
public class Child extends GrandParent //If this class extends Parent then no exception
{
    private String childName;

</code>

Please help.

[1] : http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/errcode001.htm
[Message sent by forum member 'cprashantreddy' (cprashantreddy)]

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