org.hibernate.exception.GenericJDBCException: could not insert: [ejemplo08.Profesor]

Hibernate JIRA | Lorenzo Gonzalez | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    In hibernate ORM 4.1.0 works perfectly but in Hibernate ORM 4.1.7, storing a Enum Value using MySQL as DataBase generate the error. ERROR: Parameter metadata not available for the given statement Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not insert: [ejemplo08.Profesor] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2982) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3403) at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1210) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:399) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at ejemplo08.Main.main(Main.java:37) Caused by: java.sql.SQLException: Parameter metadata not available for the given statement at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:68) at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:117) at org.hibernate.type.EnumType.nullSafeSet(EnumType.java:121) at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:155) at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2705) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2959) ... 12 more

    Hibernate JIRA | 4 years ago | Lorenzo Gonzalez
    org.hibernate.exception.GenericJDBCException: could not insert: [ejemplo08.Profesor]
  2. 0

    In hibernate ORM 4.1.0 works perfectly but in Hibernate ORM 4.1.7, storing a Enum Value using MySQL as DataBase generate the error. ERROR: Parameter metadata not available for the given statement Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not insert: [ejemplo08.Profesor] at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2982) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3403) at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1210) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:399) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) at ejemplo08.Main.main(Main.java:37) Caused by: java.sql.SQLException: Parameter metadata not available for the given statement at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) at com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:68) at com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:117) at org.hibernate.type.EnumType.nullSafeSet(EnumType.java:121) at org.hibernate.type.CustomType.nullSafeSet(CustomType.java:155) at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2705) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2959) ... 12 more

    Hibernate JIRA | 4 years ago | Lorenzo Gonzalez
    org.hibernate.exception.GenericJDBCException: could not insert: [ejemplo08.Profesor]
  3. 0

    MySQL Bugs: #40489: MySQL Connector/J fails to return parameter type

    mysql.com | 1 year ago
    java.sql.SQLException: Parameter metadata not available for the given statement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JDBC 3.0 getParameterType call not supported

    Stack Overflow | 3 years ago | pappu_kutty
    java.sql.SQLException: Parameter metadata not available for the given statement
  6. 0

    Mysql insert query not working on insert

    Stack Overflow | 3 years ago | pappu_kutty
    java.sql.SQLException: Parameter metadata not available for the given statement

    1 unregistered visitors

    Root Cause Analysis

    1. java.sql.SQLException

      Parameter metadata not available for the given statement

      at com.mysql.jdbc.SQLError.createSQLException()
    2. MySQL jdbc
      MysqlParameterMetadata.getParameterType
      1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
      2. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
      3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
      4. com.mysql.jdbc.MysqlParameterMetadata.checkAvailable(MysqlParameterMetadata.java:68)
      5. com.mysql.jdbc.MysqlParameterMetadata.getParameterType(MysqlParameterMetadata.java:117)
      5 frames
    3. Hibernate
      AbstractTransactionImpl.commit
      1. org.hibernate.type.EnumType.nullSafeSet(EnumType.java:121)
      2. org.hibernate.type.CustomType.nullSafeSet(CustomType.java:155)
      3. org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:2705)
      4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2959)
      5. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3403)
      6. org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
      7. org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
      8. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
      9. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:275)
      10. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)
      11. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
      12. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1210)
      13. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:399)
      14. org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
      15. org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
      15 frames
    4. ejemplo08
      Main.main
      1. ejemplo08.Main.main(Main.java:37)
      1 frame