• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

oracle.toplink.essentials

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i do have a class Car.java

when i do deploy this to GlassFish, i get the following error in log's i am unable to understand the logs.

-------------
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.Embedded;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


@Entity
@Table(name="Car")
//@IdClass(CarPK.class)
public class Car implements Serializable{


@Id
@Column(name = "id", nullable = false)
protected Long id;

@Enumerated(EnumType.ORDINAL)
@Column(name="horn", nullable = false)
protected HornType horn;

@Column(name="steering", table="user_steering", nullable = false)
@Lob
@Basic(fetch=FetchType.LAZY)
protected String steering;

@Column(name="chasis", nullable = false)
@Temporal(TemporalType.DATE)
protected Date chasisDate;


@Embedded
protected CarAddress carAddress;
}
---------------------

Log's

[#|2008-11-18T21:47:34.083-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=18;_ThreadName=Timer-24;Deployment ErrorException [TOPLINK-0] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------

Exception [TOPLINK-93] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The table [user_steering] is not present in this descriptor.
Descriptor: RelationalDescriptor(Car --> [DatabaseTable(Car)])

Runtime Exceptions:
---------------------------------------------------------
-- Exception [TOPLINK-0] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------

Exception [TOPLINK-93] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The table [user_steering] is not present in this descriptor.
Descriptor: RelationalDescriptor(Car --> [DatabaseTable(Car)])

Runtime Exceptions:
---------------------------------------------------------

;_RequestID=58c2b690-34b2-4bae-862d-0e8b14a2015e;|"DPL8011: autodeployment failure while deploying the application : Deployment ErrorException [TOPLINK-0] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------

Exception [TOPLINK-93] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The table [user_steering] is not present in this descriptor.
Descriptor: RelationalDescriptor(Car --> [DatabaseTable(Car)])

Runtime Exceptions:
---------------------------------------------------------
-- Exception [TOPLINK-0] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------

Exception [TOPLINK-93] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The table [user_steering] is not present in this descriptor.
Descriptor: RelationalDescriptor(Car --> [DatabaseTable(Car)])

Runtime Exceptions:
---------------------------------------------------------

"|#]

[#|2008-11-18T21:47:34.191-0500|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=18;_ThreadName=Timer-24;|[AutoDeploy] Autodeploy failed : C:\Sun1\AppServer\domains\domain1\autodeploy\text_ejb_simple1.jar.|#]



Any iDea?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By setting the table attribute of the @Column annotation for the steering field, what do you think is going to happen ? When the container sees this Car entity, what kind of table do you think it will create ?
[ November 18, 2008: Message edited by: Christophe Verre ]
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


@Column(name="steering", table="user_steering", nullable = false)
@Lob
@Basic(fetch=FetchType.LAZY)
protected String steering;

---------------------

Log's

Exception [TOPLINK-93] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The table [user_steering] is not present in this descriptor.
Descriptor: RelationalDescriptor(Car --> [DatabaseTable(Car)])



Incorrect..
 
Amandeep Singh
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Guy for the reply, i solved the above problem like this


---------------import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Basic;
import javax.persistence.Embedded;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SecondaryTable;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;


@Entity
//@Table(name="Car", uniqueConstraints= {@UniqueConstraint(columnNames={"id"})})
//@IdClass(CarPK.class)
@Table(name="Car")
@SecondaryTable(name="user_steering", pkJoinColumns=@PrimaryKeyJoinColumn(name="id"))
public class Car implements Serializable{


@Id
@Column(name = "id", nullable = false)
protected Long id;

@Enumerated(EnumType.ORDINAL)
@Column(name="horn", nullable = false)
protected HornType horn;

@Column(name="steering", table="user_steering")
@Lob
@Basic(fetch=FetchType.LAZY)
protected byte[] steering;

@Column(name="chasis", nullable = false)
@Temporal(TemporalType.DATE)
protected Date chasisDate;


@Embedded
protected CarAddress carAddress;
}
---------------------------------------


I forget to mention this description

@SecondaryTable(name="user_steering", pkJoinColumns=@PrimaryKeyJoinColumn(name="id")

So that's why Oracle TopLink was asking for Description.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's right, you needed to use a secondary table
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic