4 Replies Latest reply on Sep 27, 2002 1:50 PM by dsundstrom

    java.sql.SQLException: Unable to load to deserialize result:

    pippi74

      Using JBoss-3.0.2 and MySQL with the drivers mm.mysql-2.0.14-bin.jar, using Entity Bean with CMP 2.0 with multi directional CRM field, i obtain the following exception:

      12:06:37,182 ERROR [LogInterceptor] TransactionRolledbackLocalException, caus
      y:
      java.sql.SQLException: Unable to load to deserialize result: java.io.EOFExcep
      n
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.convertByteArrayToObject(J
      Util.java:612)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.getResult(JDBCUtil.java:31
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.l
      ArgumentResults(JDBCAbstractCMPFieldBridge.java:350)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.l
      InstanceResults(JDBCAbstractCMPFieldBridge.java:304)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCL
      EntityCommand.java:147)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCL
      EntityCommand.java:62)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCSto
      anager.java:572)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersiste
      Manager.java:410)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.l
      Entity(CachedConnectionInterceptor.java:353)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(Enti
      ynchronizationInterceptor.java:262)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.i
      ke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInsta
      Interceptor.java:152)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInter
      tor.java:107)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreat
      Interceptor.java:69)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxI
      rceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInter
      torCMT.java:232)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.jav
      0)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityIntercept
      java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:20
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.invokeAdd
      ation(JDBCCMRFieldBridge.java:670)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRel
      onLinks(JDBCCMRFieldBridge.java:581)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.add(RelationSet.
      a:102)
      at it.frametech.ipvalue.ejb.entity.CampaignBean.addSchedule(CampaignB
      .java:122)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityCo
      iner.java:1191)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBC
      ationInterceptor.java:95)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(Enti
      ynchronizationInterceptor.java:308)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.i
      ke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInsta
      Interceptor.java:152)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInter
      tor.java:107)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreat
      Interceptor.java:69)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxI
      rceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInter
      torCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.jav
      0)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityIntercept
      java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:20
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseL
      lContainerInvoker.java:301)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38
      at $Proxy72.addSchedule(Unknown Source)
      at it.frametech.ipvalue.ejb.session.CampaignManagerBean.addScheduleTo
      paign(CampaignManagerBean.java:94)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invok
      tatelessSessionContainer.java:660)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.i
      ke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(S
      elessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxI
      rceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInter
      torCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.jav
      0)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityIntercept
      java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:20
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionCon
      ner.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:51
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:9
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.
      a:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionIntercept
      java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.jav
      6)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSe
      onInterceptor.java:111)

        • 1. Re: java.sql.SQLException: Unable to load to deserialize res
          aloubyansky

          How did the data get into the database?
          Is it possible the data was written by earlier version of JBoss?
          Do you meet the same problem writting data and then reading data back immediately?

          • 2. Re: java.sql.SQLException: Unable to load to deserialize res
            pippi74

            The data into the database are saved and obtained from JBoss because the error is from a CRM field. The error happens when the method addSchedule(...) is called:

            /**
            * @ejb:relation name="campaign-schedule" role-name="campaign" multiple="yes"
            *
            * @jboss:relation-table table-name="SCHEDULES"
            * @jboss:relation fk-column="SCHEDULE" related-pk-field="name"
            */
            public abstract Set getSchedules();
            public abstract void setSchedules(Set schedules);

            /**
            * @ejb:interface-method
            */
            public void addSchedule(ScheduleBeanLocal schedule) {
            getSchedules().add(schedule);
            }

            how you can see, this method uses getSchedules that is a relation field collection to obtain all the Schedule (the databse is empty) and add one more schedule.

            The data is not written by an earlier version of JBoss, because i'm starting with an empty database.

            It is strange because the follow method addChannels (that is like the previous one) work without problems:
            /**
            * @ejb:relation name="campaign-channel" role-name="campaign" multiple="yes"
            *
            * @jboss:relation-table table-name="CHANNELS"
            * @jboss:relation fk-column="CHANNEL" related-pk-field="address"
            */
            public abstract Set getChannels();
            public abstract void setChannels(Set channels);

            /**
            * @ejb:interface-method
            */
            public void addChannel(ChannelBeanLocal channel) {
            getChannels().add(channel);
            }

            i don't have any idea, help me please.

            bye

            • 3. Re: java.sql.SQLException: Unable to load to deserialize res
              pippi74

              The data into the database are saved and obtained from JBoss because the error is from a CRM field. The error happens when the method addSchedule(...) is called:

              /**
              * @ejb:relation name="campaign-schedule" role-name="campaign" multiple="yes"
              *
              * @jboss:relation-table table-name="SCHEDULES"
              * @jboss:relation fk-column="SCHEDULE" related-pk-field="name"
              */
              public abstract Set getSchedules();
              public abstract void setSchedules(Set schedules);

              /**
              * @ejb:interface-method
              */
              public void addSchedule(ScheduleBeanLocal schedule) {
              getSchedules().add(schedule);
              }

              how you can see, this method uses getSchedules that is a relation field collection to obtain all the Schedule (the databse is empty) and add one more schedule.

              The data is not written by an earlier version of JBoss, because i'm starting with an empty database.

              It is strange because the follow method addChannels (that is like the previous one) work without problems:
              /**
              * @ejb:relation name="campaign-channel" role-name="campaign" multiple="yes"
              *
              * @jboss:relation-table table-name="CHANNELS"
              * @jboss:relation fk-column="CHANNEL" related-pk-field="address"
              */
              public abstract Set getChannels();
              public abstract void setChannels(Set channels);

              /**
              * @ejb:interface-method
              */
              public void addChannel(ChannelBeanLocal channel) {
              getChannels().add(channel);
              }

              i don't have any idea, help me please.

              bye

              • 4. Re: java.sql.SQLException: Unable to load to deserialize res
                dsundstrom

                What cmp-field (not cmr-field) can not be deserialized? All of the code you have shown is relationship code.