1 Reply Latest reply on Apr 19, 2002 4:27 AM by dencel

    Maximimum size of entity

    dencel

      Hello everybody,

      I’m using JBOSS 2.4.4.2001-12-29 02:04:40 PST, with MySql, with medium-blob typemap for a self-made class in an entity. Medium blob should hold for about 16 Mb, I believe, but I’m getting serious trouble when I set the Object in my entity (a picture) to a size greater than 800 kb. It is not a JDBC error, so it isn't the Dbase who is bitching(usual problems). What is that I do wrong?
      Can anybody help me? I really hope so...

      Dencel.

      Here is the error:

      [ERROR,EntitySynchronizationInterceptor] Store failed
      java.rmi.ServerException: Store failed; nested exception is:
      java.lang.IllegalArgumentException: Packet is larger than max_allowed_packet from server configuration of 104857
      6 bytes
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:101)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.storeEntity(JAWSPersistenceManager.java:168)
      at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:397)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:253)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization.beforeCompletion(EntitySynchro
      nizationInterceptor.java:401)
      at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1211)
      at org.jboss.tm.TxCapsule.commit(TxCapsule.java:305)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:406)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:504)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
      at $Proxy13.setObject(Unknown Source)
      at nl.dekit.bbo.collections.CollectionTreeImpl.setObject(CollectionTreeImpl.java:176)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.lang.IllegalArgumentException: Packet is larger than max_allowed_packet from server configuration of 104
      8576 bytes
      at org.gjt.mm.mysql.Buffer.ensureCapacity(Unknown Source)
      at org.gjt.mm.mysql.Buffer.writeBytesNoNull(Unknown Source)
      at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
      at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
      at org.jboss.pool.jdbc.PreparedStatementInPool.executeUpdate(Unknown Source)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementAndHandleResult(JDBCUpdateCommand.java:49)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:156)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:97)
      ... 28 more

        • 1. Re: Maximimum size of entity
          dencel

          Before I bother someone with this problem, I already solved it. It was of course, how coul it be not, the database again with the max_allowed_packet variable in the ini file. Strange that it doesn result in a JDBC error.

          Sorry