Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-448

QueryException: Incorrect arguments to mysqld_stmt_execute on inserting an "emptyString"-Lob with JPA

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.8, 1.5.9
    • 2.0.0-RC, 1.6.0
    • Other
    • None
    • Hibernate 5.2.8

    Description

      JPA-Mapping:
      @Entity
      public class someEntity

      { ... @Lob private String property = ""; ... }

      Since version 1.5.8 persisting a new instance of 'someEntity' fails with following exception:
      javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute statement
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
      at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:780)
      at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:758)
      at picture.infrastructure.rest.Request.persistEntity(Request.java:63)
      Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Incorrect arguments to mysqld_stmt_execute
      Query is: insert into SomeEntity (..., property, ...) values (...), parameters [...,<Buffer:''>, ...]
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(AbstractQueryProtocol.java:1144)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(AbstractQueryProtocol.java:1076)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1031)
      at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executePreparedQuery(AbstractQueryProtocol.java:617)
      at org.mariadb.jdbc.MariaDbServerPreparedStatement.executeInternal(MariaDbServerPreparedStatement.java:401)
      ... 73 more

      If the property contains a filled string, the entity will be persisted successfully.
      Using an earlier Connector-version (e.g. 1.5.7) does not cause the exception.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            stkl Stefan
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.