1 Reply Latest reply on Mar 18, 2004 11:53 AM by Collin

    Unable to store large byte[] array in entity bean

    Collin Novice

      Hi,

      For any byte array over 20MB, I'm getting a

      11:27:05,875 ERROR [STDERR] java.sql.SQLException: Communication link failure: java.net.SocketException
      11:27:05,875 ERROR [STDERR] at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
      11:27:05,875 ERROR [STDERR] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
      11:27:05,875 ERROR [STDERR] at com.mysql.jdbc.Connection.execSQL(Unknown Source)
      11:27:05,875 ERROR [STDERR] at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
      11:27:05,875 ERROR [STDERR] at com.mysql.jdbc.PreparedStatement.executeUpdate(Unknown Source)
      ...

      exception thrown when trying to store in the database using CMP. It works fine for anything under 20MB.

      I set up a separate test case outside of JBoss using plain JDBC to upload a 45 MB byte[] into the same database, same table, same columns without any errors whatsoever.

      For this reason, I don't think it is the mysql jdbc connector, but maybe instead a container configuration problem?

      I'd appreciate any ideas/hints/etc.

      thanks,
      Collin



        • 1. Re: Unable to store large byte[] array in entity bean
          Collin Novice

          More info:

          JBoss 3.2.2
          Windows XP
          mysql-connector-java-3.0.11-stable-bin.jar

          datasource dd:

          <datasources>
           <local-tx-datasource>
           <jndi-name>SystemDS</jndi-name>
           <connection-url>jdbc:mysql://server:3306/collin?useUnicode=true&characterEncoding=UTF-8</connection-url>
           <driver-class>com.mysql.jdbc.Driver</driver-class>
           <user-name>root</user-name>
           <password></password>
           <check-valid-connection-sql/>
           <min-pool-size>5</min-pool-size>
           </local-tx-datasource>
          </datasources>
          


          I checked the mysql.err log, also, and there was no information regarding this.

          thanks,