wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes jboss writing null rows in MySQL database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "jboss writing null rows in MySQL database" Watch "jboss writing null rows in MySQL database" New topic
Author

jboss writing null rows in MySQL database

javi perez
Greenhorn

Joined: May 29, 2010
Posts: 2
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

Joined: Dec 20, 2006
Posts: 2491
    
    8

Welcome to JavaRanch.
Please check your private messages for a JavaRanch administrative matter.


OCUP UML fundamental and ITIL foundation
youtube channel
javi perez
Greenhorn

Joined: May 29, 2010
Posts: 2
Jan Cumps wrote:Welcome to JavaRanch.
Please check your private messages for a JavaRanch administrative matter.


Updated to real name

BR
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jboss writing null rows in MySQL database
 
Similar Threads
Please explain below queries in case of JPA @Inheritance(strategy=InheritanceType.JOINED)
GenerationType.AUTO Not Working
Issue with JPA + MySQL
Identity issue for EJB3.0 Entity along with Hibernate HBM configuration
Problem Persisting Entity In Hibernate