Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jboss writing null rows in MySQL database

 
javi perez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, if this question does not belong here please let me know.

I am trying to write an simple j2ee application runs on jboss, one of its tasks is to insert rows into a database table called COMMENT.
This table has an autoincremental key called id and I am trying to configure the insertion through jbosscmp-jdbc.

I am finding that all the rows that my application is wrting in the comment table are null.

The Transfer object related to the Comment table is called CommentTO, of which I copy the constructor below:

public CommentTO(int id, int showId, String description, int rate) {

super();
this.id = id;
this.idShow = showId;
this.description = description;
this.rate=rate;

logger.info("commentTO, this.id: "+this.id);
logger.info("commentTO, this.idShow: "+this.idShow);
logger.info("commentTO, this.description: "+this.description);
logger.info("commentTO, this.rate: "+this.rate);
}

The logger´s trace is showing me that CommentTO is receiving the correct values. However the values of idShow, description and rate are being lost.

I am puzzled, on one hand the row is being created, but then it is filled with null values (except for the id which is generated by the database) why is jboss refusing to write? Could it be a configuration problem?

Thanks a lot everyone
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.
Please check your private messages for a JavaRanch administrative matter.
 
javi perez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jan Cumps wrote:Welcome to JavaRanch.
Please check your private messages for a JavaRanch administrative matter.


Updated to real name

BR
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic