persistence@glassfish.java.net

RE: How to write descriptor for [java.util.ArrayList]

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Tue, 29 Aug 2006 11:56:04 -0400

Yes setting the log level to FINE or FINEST in the persistence.xml file will generate more logging.
The stack trace you provided must not be complete? Are you calling persist() or merge() on an ArrayList?
Can you provide the entire stack trace?
--Gordon

-----Original Message-----
From: Dirk Bangel [mailto:dirk.bangel_at_gmx.de]
Sent: Tuesday, August 29, 2006 11:28 AM
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]



Hello Gordon,

I created a new class

@Entity
Public class TQName extends QName{
.. and so on ...
}

changed my Lists from List<QName> to List<TQName> and put the TQName also
into persistence.xml file,

But: It doesn't help so far:

Exception Description: Missing descriptor for [java.util.ArrayList]. Verify
that the descriptor has been properly registered with the Session.
Exception in thread "main" javax.persistence.RollbackException: Exception
[TOPLINK-7009] (Oracle TopLink Essentials - 2006.7 (Build 060731)):
oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Missing descriptor for [java.util.ArrayList]. Verify
that the descriptor has been properly registered with the Session.
        at
oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransacti
onImpl.commit(EntityTransactionImpl.java:109)

Is it possible to get more trace information out of TopLink?

-

Dirk

-----Original Message-----
From: Gordon Yorke [mailto:gordon.yorke_at_oracle.com]
Sent: Dienstag, 29. August 2006 08:16
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]

Hello Dirk,
    The specification does not directly provide support for Collections of
non entity objects. You could create an Entity that wraps the QName and the
String as Embedables then map the OneToMany to the wrapper Entity.
Otherwise you will need to map the list as @Basic and the list will be
stored in the database as a serialized object.
--Gordon

-----Original Message-----
From: Dirk Bangel [mailto:dirk.bangel_at_gmx.de]
Sent: Tuesday, August 29, 2006 1:10 AM
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]


Thank you for your quick response Gordon.

May I get my fault?! My collection inner type hasn't a given mapping!
I have two @OneToMany relationships...

List<QName>
List<String>

... Than I have two give a descriptor for the QName mapping.
But how to do it correct

a. orm.xml file or
b. programmatically?

Best regards

Dirk

-----Original Message-----
From: Gordon Yorke [mailto:gordon.yorke_at_oracle.com]
Sent: Montag, 28. August 2006 12:53
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to write descriptor for [java.util.ArrayList]

What sort of mapping is using the ArrayList? You should not need to map the
ArrayList directly?
--Gordon

-----Original Message-----
From: Dirk Bangel [mailto:dirk.bangel_at_gmx.de]
Sent: Monday, August 28, 2006 12:24 PM
To: persistence_at_glassfish.dev.java.net
Subject: How to write descriptor for [java.util.ArrayList]


Does anyone know how to write an descriptor for java.util.ArrayList,
because TopLink cause:

Exception in thread "main" javax.persistence.RollbackException:
Exception [TOPLINK-7009] (Oracle TopLink Essentials - 2006.7 (Build
060731)): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Missing descriptor for [java.util.ArrayList].
Verify that the descriptor has been properly registered with the Session.
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer