Title: GenericJDBCException

Hello,

I need help with Hibernate3. I want to connect a mysqldb and java, but I can't because exist an error which I can't solve.

Message's error is follow:

e= GenericJDBCException  (id=24)
org.hibernate.exception.GenericJDBCException: could not insert: [com.prueba.dal.Categorias]

This is my hibernate.properties:

                "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
     <session-factory name="java:hibernate/SessionFactory">
         <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/escuela</property>
        <property name="hibernate.cglib.use_reflection_optimizer">true</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">20</property>             
        <property name="hibernate.c3p0.timeout">1800</property>      
        <property name="hibernate.c3p0.max_statements">50</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.jdbc.batch_size">1</property>
        <property name="hibernate.show_sql">true</property>
        <property name="use_outer_join">false</property>
       
        <mapping resource="com/mcgr/dal/Personas.hbm.xml" />
        <mapping resource="com/mcgr/dal/Clase.hbm.xml" />
        <mapping resource="com/mcgr/dal/Categorias.hbm.xml" />
        <mapping resource="com/mcgr/dal/Niveles.hbm.xml" />
        <mapping resource="com/mcgr/dal/ClasePersonas.hbm.xml" />
        </session-factory>
</hibernate-configuration>

MySQL version: 4.0.

Thanks in advance.

Reply via email to