-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Incorrect arguments to mysql_stmt_execute(
PostPosted: Thu Oct 23, 2008 10:01 am 
Newbie

Joined: Thu Oct 23, 2008 9:54 am
Posts: 2
HI All,
I got this exception when I will try to add the record in the database. the project work fine on my machine and insert the record , but on production server it has generated exception "org.hibernate.exception.GenericJDBCException: could not insert:" and on digging i found the exception "Incorrect arguments to mysql_stmt_execute" . I can not understand what is the problem ..
Basically I have a table name room which have database script:

room CREATE TABLE `room` (
`Room_Id` mediumint(15) NOT NULL auto_increment,
`Room_Name` varchar(50) default NULL,
`Room_Avitor` varchar(100) default NULL,
`Room_Theme_Id` mediumint(15) default NULL,
`Owner_id` bigint(30) default NULL,
`Compaign_Code` varchar(50) default NULL,
`activation_Code` varchar(50) default NULL,
`Room_Password` varchar(10) default NULL,
`Owner_password` varchar(10) default NULL,
PRIMARY KEY (`Room_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8

and I am using struts with hibernate (Java Persistance API). my persistance class is
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd">
<persistence-unit name="fixafesten" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.fixafesten.container.Activationcodes</class>
<class>com.fixafesten.container.Room</class>
<class>com.fixafesten.container.Party</class>
<class>com.fixafesten.container.Forum</class>
<class>com.fixafesten.container.RoomTheme</class>
<class>com.fixafesten.container.RoomUser</class>
<class>com.fixafesten.container.RoomUserPK</class>
<class>com.fixafesten.container.User</class>
<class>com.fixafesten.container.ThreadMessage</class>
<class>com.fixafesten.container.Threads</class>
<class>com.fixafesten.container.PictureGallery</class>
<properties>
<!--this is the comment-->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

<!-- Production settings
<property name="hibernate.connection.datasource" value="jdbc/fixafesten"/>
-->
<!-- Development settings-->
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/fixafesten"/>


<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="admin"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.show_sql" value="true"/>

<property name="hibernate.c3p0.max_size" value="1"/>
<property name="hibernate.c3p0.min_size" value="0"/>
<property name="hibernate.c3p0.timeout" value="5000"/>
<property name="hibernate.c3p0.max_statements" value="100"/>
<property name="hibernate.c3p0.idle_test_period" value="300"/>
<property name="hibernate.c3p0.acquire_increment" value="2"/>


</properties>
</persistence-unit>
</persistence>


in my struts action class I have a method buildNewRoom in which I create the user and also create room for that user. I take
entityManager = entityManagerFactory.createEntityManager();
userTransaction = entityManager.getTransaction();
userTransaction.begin();

then I create the user and room. both are created successfully on my machine and on testing machine. but on production machine, user is created but on creating room it will generate error Incorrect arguments to mysql_stmt_execute and then "org.hibernate.exception.GenericJDBCException: could not insert:"




Please help......


Last edited by AliChawla on Fri Oct 24, 2008 6:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Incorrect arguments to mysql_stmt_execute(
PostPosted: Fri Oct 24, 2008 6:28 am 
Newbie

Joined: Thu Oct 23, 2008 9:54 am
Posts: 2
HI All,
I got this exception when I will try to add the record in the database. the project work fine on my machine and insert the record , but on production server it has generated exception "org.hibernate.exception.GenericJDBCException: could not insert:" and on digging i found the exception "Incorrect arguments to mysql_stmt_execute" . I can not understand what is the problem ..
Basically I have a table name room which have database script:

room CREATE TABLE `room` (
`Room_Id` mediumint(15) NOT NULL auto_increment,
`Room_Name` varchar(50) default NULL,
`Room_Avitor` varchar(100) default NULL,
`Room_Theme_Id` mediumint(15) default NULL,
`Owner_id` bigint(30) default NULL,
`Compaign_Code` varchar(50) default NULL,
`activation_Code` varchar(50) default NULL,
`Room_Password` varchar(10) default NULL,
`Owner_password` varchar(10) default NULL,
PRIMARY KEY (`Room_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8

and I am using struts with hibernate (Java Persistance API). my persistance class is
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd">
<persistence-unit name="fixafesten" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>com.fixafesten.container.Activationcodes</class>
<class>com.fixafesten.container.Room</class>
<class>com.fixafesten.container.Party</class>
<class>com.fixafesten.container.Forum</class>
<class>com.fixafesten.container.RoomTheme</class>
<class>com.fixafesten.container.RoomUser</class>
<class>com.fixafesten.container.RoomUserPK</class>
<class>com.fixafesten.container.User</class>
<class>com.fixafesten.container.ThreadMessage</class>
<class>com.fixafesten.container.Threads</class>
<class>com.fixafesten.container.PictureGallery</class>
<properties>
<!--this is the comment-->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

<!-- Production settings
<property name="hibernate.connection.datasource" value="jdbc/fixafesten"/>
-->
<!-- Development settings-->
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/fixafesten"/>


<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="admin"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.show_sql" value="true"/>

<property name="hibernate.c3p0.max_size" value="1"/>
<property name="hibernate.c3p0.min_size" value="0"/>
<property name="hibernate.c3p0.timeout" value="5000"/>
<property name="hibernate.c3p0.max_statements" value="100"/>
<property name="hibernate.c3p0.idle_test_period" value="300"/>
<property name="hibernate.c3p0.acquire_increment" value="2"/>


</properties>
</persistence-unit>
</persistence>


in my struts action class I have a method buildNewRoom in which I create the user and also create room for that user. I take
entityManager = entityManagerFactory.createEntityManager();
userTransaction = entityManager.getTransaction();
userTransaction.begin();

then I create the user and room. both are created successfully on my machine and on testing machine. but on production machine, user is created but on creating room it will generate error Incorrect arguments to mysql_stmt_execute and then "org.hibernate.exception.GenericJDBCException: could not insert:"




Please help......


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.