Koti voddapally

Greenhorn
+ Follow
since Mar 27, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Koti voddapally

Hi All,

I have a problem with JPA composit primary key. when I am inserting values into Postgresql I am getting below exception

Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60-fcs (11/17/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in column "id_corporative_event" violates not-null constraint
Error Code: 0
Call: INSERT INTO public.tb_corporate_event (provent_price, provent_lot, dt_event, stock_lot, price_ex, dt_last_price_cum, ds_event, user_verified_bovespa, in_verified_company_ri, user_verified_company, in_verified_bovespa, dt_approved, coefficient_multiplication, price_cum, dh_verified_company_ri, dh_verified_company, id_stock, id_corporative_event, id_company, cd_corporative_event_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [null, null, 20100217, 0, 0.0, 21231, NAO NECESSARIO VERIFICACAO, null, N, null, N, null, 0.0, 77.0, null, null, 2, null, 1, AO]
Query: InsertObjectQuery(com.softidsolutions.valebroker.TbCorporateEvent@185e90f)

Could you please help me?

Here is the My POJO classes.


@Entity
@Table(name = "tb_corporate_event", schema = "public")
public class TbCorporateEvent implements java.io.Serializable {

// Fields

private TbCorporateEventId id;

....................
....................
@EmbeddedId
@AttributeOverrides( {
@AttributeOverride(name = "idStock", column = @Column(name = "id_stock", nullable = false)),
@AttributeOverride(name = "idCorporativeEvent", column = @Column(name = "id_corporative_event", nullable = false))})
public TbCorporateEventId getId() {
return this.id;
}

public void setId(TbCorporateEventId id) {
this.id = id;
}

// class ends here

and Embedded class is :

@Embeddable
public class TbCorporateEventId implements java.io.Serializable {

// Fields

private Integer idStock;
private Integer idCorporativeEvent;

...........................

@Column(name = "id_corporative_event", nullable = false)
public Integer getIdCorporativeEvent() {
return this.idCorporativeEvent;
}

public void setIdCorporativeEvent(Integer idCorporativeEvent) {
this.idCorporativeEvent = idCorporativeEvent;
}


I want to Auto increment id_corporative_event value?


Can any body help me?
Hi All,

I have a problem with JPA composit primary key. when I am inserting values into Postgresql I am getting below exception

Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b60-fcs (11/17/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in column "id_corporative_event" violates not-null constraint
Error Code: 0
Call: INSERT INTO public.tb_corporate_event (provent_price, provent_lot, dt_event, stock_lot, price_ex, dt_last_price_cum, ds_event, user_verified_bovespa, in_verified_company_ri, user_verified_company, in_verified_bovespa, dt_approved, coefficient_multiplication, price_cum, dh_verified_company_ri, dh_verified_company, id_stock, id_corporative_event, id_company, cd_corporative_event_type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [null, null, 20100217, 0, 0.0, 21231, NAO NECESSARIO VERIFICACAO, null, N, null, N, null, 0.0, 77.0, null, null, 2, null, 1, AO]
Query: InsertObjectQuery(com.softidsolutions.valebroker.TbCorporateEvent@185e90f)

Could you please help me?

Here is the My POJO classes.


@Entity
@Table(name = "tb_corporate_event", schema = "public")
public class TbCorporateEvent implements java.io.Serializable {

// Fields

private TbCorporateEventId id;

....................
....................
@EmbeddedId
@AttributeOverrides( {
@AttributeOverride(name = "idStock", column = @Column(name = "id_stock", nullable = false)),
@AttributeOverride(name = "idCorporativeEvent", column = @Column(name = "id_corporative_event", nullable = false))})
public TbCorporateEventId getId() {
return this.id;
}

public void setId(TbCorporateEventId id) {
this.id = id;
}

// class ends here

and Embedded class is :

@Embeddable
public class TbCorporateEventId implements java.io.Serializable {

// Fields

private Integer idStock;
private Integer idCorporativeEvent;

...........................

@Column(name = "id_corporative_event", nullable = false)
public Integer getIdCorporativeEvent() {
return this.idCorporativeEvent;
}

public void setIdCorporativeEvent(Integer idCorporativeEvent) {
this.idCorporativeEvent = idCorporativeEvent;
}


I want to Auto increment id_corporative_event value?


Can any body help me?
Hi All,

Can anybody help me for writing the ant script creating eclipse project:

Here I am downloading sub modules from SVN, i want to make a eclipse project using ant and out put file is jar file

--- How to create and update a eclipse .classpath file
--- how to create and update a eclipse .project file

--how to add a jar file to classpathentry to existing .classpath file

Koti

15 years ago