java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The following error occurs when working with proxy classes deployed on JBoss: ERROR [STDERR] java.lang.ClassCastException: cannot assign instance of net.sf.hibernate.proxy.SerializableProxy to field com.hibernate.test.persistence.SubnetRightHolder.subnet of type com.hibernate.test.persistence.NetPortalSubnetwork in instance of com.hibernate.test.persistence.SubnetRightHolder 09:53:18,851 ERROR [STDERR] at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1840) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1062) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at java.util.HashMap.readObject(HashMap.java:985) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,867 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,867 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:346) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) 09:53:18,867 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:700) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) 09:53:18,882 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:148) 09:53:18,882 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:144) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) 09:53:18,882 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) 09:53:18,882 ERROR [LogInterceptor] RuntimeException: java.lang.IllegalArgumentException: wrong number of arguments 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 org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) 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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 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) The bug is reproduced in the archives attached. 1. Change db2-ds.xml to work with your db 2. Deploy ear in the JBoss 4. run the MainDevice class from the src archive (after generating tables in the DB)
    via by Steve Pop,
  • The following error occurs when working with proxy classes deployed on JBoss: ERROR [STDERR] java.lang.ClassCastException: cannot assign instance of net.sf.hibernate.proxy.SerializableProxy to field com.hibernate.test.persistence.SubnetRightHolder.subnet of type com.hibernate.test.persistence.NetPortalSubnetwork in instance of com.hibernate.test.persistence.SubnetRightHolder 09:53:18,851 ERROR [STDERR] at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1840) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1062) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at java.util.HashMap.readObject(HashMap.java:985) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,867 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,867 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,867 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,867 ERROR [STDERR] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) 09:53:18,867 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) 09:53:18,867 ERROR [STDERR] at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:346) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) 09:53:18,867 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 09:53:18,867 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) 09:53:18,882 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:700) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) 09:53:18,882 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) 09:53:18,882 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 09:53:18,882 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 09:53:18,882 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 09:53:18,882 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 09:53:18,882 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:148) 09:53:18,882 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:144) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) 09:53:18,882 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) 09:53:18,882 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536) 09:53:18,882 ERROR [LogInterceptor] RuntimeException: java.lang.IllegalArgumentException: wrong number of arguments 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 org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:700) 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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) 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) The bug is reproduced in the archives attached. 1. Change db2-ds.xml to work with your db 2. Deploy ear in the JBoss 4. run the MainDevice class from the src archive (after generating tables in the DB)
    via by Steve Pop,
  • Hitting ClassCastException to String
    via Stack Overflow by tM --
    ,
    • java.lang.ClassCastException: cannot assign instance of net.sf.hibernate.proxy.SerializableProxy to field com.hibernate.test.persistence.SubnetRightHolder.subnet of type com.hibernate.test.persistence.NetPortalSubnetwork in instance of com.hibernate.test.persistence.SubnetRightHolder 09:53:18,851 ERROR [STDERR] at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1840) at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1062) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at java.util.HashMap.readObject(HashMap.java:985) 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:824) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:78) at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:346) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)

    Users with the same issue

    Matty
    3 times, last one,
    johnxfly
    54 times, last one,
    bpbhat77
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    10 more bugmates