Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: weird behavior Hibernate/Mysql in Linux to Windows

  1. #11

    Default

    yes, all , how i can increase that?
    change the INFO to DEBUG
    org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
    Wheres the nested exception that caused that?
    -Andy
    DataNucleus - Standardised persistence, multiple datastores

  2. #12
    Join Date
    Aug 2004
    Posts
    1,107

    Default

    Sometimes it helps for testing to configure Hibernate not to batch updates by adding this property:

    Code:
    <property name="hibernate.jdbc.batch_size" value="0"/>
    Should give better exceptions for the actual statement that failed.
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

  3. #13
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Angry

    hi

    thnaks for the reply

    log4 complete
    Code:
    #log4j.debug=true
    #Alle Message except from your class goes into console and fileglobal
    log4j.rootLogger=DEBUG,CONSOLA,FILEGLOBAL
    
    log4j.appender.CONSOLA=org.apache.log4j.ConsoleAppender
    log4j.appender.CONSOLA.layout=org.apache.log4j.PatternLayout
    log4j.appender.CONSOLA.layout.ConversionPattern=%-d{HH:mm:ss} %-5p %60.60c %-25.25M %m%n
    
    log4j.appender.FILEGLOBAL=org.apache.log4j.RollingFileAppender
    log4j.appender.FILEGLOBAL.File=${lagranjita.root}\global.log
    log4j.appender.FILEGLOBAL.Threshold=ALL
    log4j.appender.FILEGLOBAL.MaxFileSize=999KB
    log4j.appender.FILEGLOBAL.MaxBackupIndex=10
    log4j.appender.FILEGLOBAL.layout=org.apache.log4j.PatternLayout
    log4j.appender.FILEGLOBAL.layout.ConversionPattern=%-d{MMM dd HH:mm:ss} %-5p %30.30c %-25.25M %m%n
    
    log4j.appender.FILESPECIFIC=org.apache.log4j.RollingFileAppender
    log4j.appender.FILEGLOBAL.File=${lagranjita.root}\granjita.log
    log4j.appender.FILESPECIFIC.Threshold=INFO
    log4j.appender.FILESPECIFIC.MaxFileSize=999KB
    log4j.appender.FILESPECIFIC.MaxBackupIndex=10
    log4j.appender.FILESPECIFIC.layout=org.apache.log4j.PatternLayout
    log4j.appender.FILESPECIFIC.layout.ConversionPattern=%-d{MMM dd HH:mm:ss} %-5p %30.30c %-25.25M %m%n
    
    #All Message from your (and its subclasses) goes into the Filespecific Appender
    log4j.logger.com.lagranjita=DEBUG,FILESPECIFIC
     
    #Spring Framework
    og4j.logger.org.springframework=DEBUG
    #Hibernate Framework
    log4j.logger.org.hibernate=DEBUG
    log4j.logger.org.hibernate.tool.hbm2ddl=DEBUG
    well the log report complete guys is attached

    now fun part

    Code:
    java.sql.BatchUpdateException: Field 'valorventa' doesn't have a default value
    	at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
    	at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)

    jesus, again, in linux charge by default 0 for the 3 fields ,
    how i shown before,
    it seems that is really necessary work with not-null='false' for each variables of the subclasses

    weird ???

    regards

    and thanks for advanced
    Attached Files Attached Files
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  4. #14
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    hi trisberg

    thanks for the reply,
    i read your post after when i wrote the last one

    it seems that mysql in linux is less problematic than in windows, has the feature to initialize the values, with logic values, well, no for date variable type

    i am wondered of this behaviour

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  5. #15
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Thumbs up

    yes i was right

    configure each variable of each subclass with not-null="false"

    but i am really wondered why in this type of relation i have this problem, i have at least 25 classes pojo, and tohers with the same type of relation, one superclass and 2 subclasses but with not-null="true"
    and work normal in both OS

    , a ripley case?

    karl, friend, and other members
    i hope an explanation, you are here the expert

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  6. #16

    Default

    The only way to explain diffs between MySQL on one platform and on another is to look at the table definitions and compare them. For example "describe CabeceraCompra" from the MySQL console. That should tell you if defaults are defined for the columns and if they accept NULLs.
    -Andy
    DataNucleus - Standardised persistence, multiple datastores

  7. #17
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I completely agree with Andy. If you are running exactly the same code, have a look at the tables and ensure they are exactly the same. If this is all exactly the same, it must be a difference with MySQL on different OS's.

  8. #18
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Smile

    hi guys

    again thanks for ther eplies

    it seems , that this would sound logic

    or by other hand, is possible that hibernate create in a different way the tables in mysql in different OS??

    that could be the other explanation

    soon, i will show the tables in both OS

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  9. #19
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Ok, are you using Hibernate to generate the tables using the HBMs?

  10. #20
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    hi karl

    Ok, are you using Hibernate to generate the tables using the HBMs?
    well with xdoclet i create the mapping files, but hibernate should create the tables, right?

    because i always work with this property for hibernate configuration

    Code:
    <!-- Drop and re-create the database schema on startup -->
    <prop key="hibernate.hbm2ddl.auto" >create-drop</prop>
    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •