Skip to main content

B38 Exception in deployment entities with @Inheritance

2 replies [Last post]
isana
Offline
Joined: 2005-11-10
Points: 0

Hello,

When I deployed my EAR to B38, I get Toplink exceptions around entities with @Inheritance. The application works on B36, and I deployed it with some modification to apply new EntityManager API.

There are two type exceptions. One is TOPLINK-108, and another is TOPLINK-41. These appear around entities which are subclass of a superclass with @Inheritance annotation.
--The super class.
@Entity
@Inheritance(strategy=JOINED)
abstract public class MySuperEntity implements Serializable {
...
}
--The inherited class.
@Entity
public class MyInheritedEntity extends MySuperEntity {
...
}

Are there any changes which require to change codes around entity inheritance between B36 and B38? (I didn't try B37 with this code).

---Exception type 1.
Exception [TOPLINK-108] (Oracle TopLink Essentials - 10g release 4 (10.1.4.0.0) (Build 060216Dev)): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: Cannot find value in class indicator mapping in parent descriptor [RelationalDescriptor(my.package.MyInheritedEntity --> [DatabaseTable(MYSUPERENTITY), DatabaseTable(MYINHERITEDENTITY)])].

---Exception type 2.
Exception [TOPLINK-41] (Oracle TopLink Essentials - 10g release 4 (10.1.4.0.0) (Build 060216Dev)): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(my.package.MyInheritedEntity --> [DatabaseTable(MYSUPERENTITY), DatabaseTable(MYINHERITEDENTITY)])

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
isana
Offline
Joined: 2005-11-10
Points: 0

Hello,

I'm sorry for my previous post.

I read carefully the topic "Can anyone get @Inheritance to work in b37?" and found that it is recognized as bug. I did add workaround codes (@DiscriminatorValue, etc) and successfully deployed my entities.

- Thank you
Ryosuke.

pramodgo
Offline
Joined: 2005-04-05
Points: 0

Code changes to fix this issue has been added today, so you should be able to just define @Inheritance annotation w/o defining the DiscriminatorColumn and DiscriminatorValue annotations.