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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 1.5.9
    • Fix Version/s: 2.0.0-RC, 1.6.0
    • Component/s: Other
    • Labels:
      None
    • Environment:
      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

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

              Dates

              Created:
              Updated:
              Resolved: