[jboss-user] [Javassist user questions] - Problem with Hibernate/JBoss 4.0.5/Seam 1.1.5
dahm
do-not-reply at jboss.com
Tue Feb 13 03:19:26 EST 2007
Hi,
I'm experiencing a problem given the constellation mentioned above.
In one of my entity classes I've got a method like this:
| public AbstractKonsiliarbogen createModelInstance() {
| AbstractKonsiliarbogen instance = Utils.konsiliarbogenModelInstance(getName());
| instance.setKonsiliarbogenZuVertrag(this);
| return instance;
| }
|
the konsiliarbogenModelInstance() method will just use Class.forName to instantiate a certain model instance.
In one of my server tests where such an instance is returned to the
remote client (using serialization) I get an exception:
| 09:04:08,500 ERROR [BasicLazyInitializer] Javassist Enhancement failed: de.kvbb.ingver.model.KonsiliarbogenZuVertrag
| java.lang.NoSuchMethodError: javassist.bytecode.Bytecode.addPutfield(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
| at javassist.util.proxy.ProxyFactory.makeConstructor(ProxyFactory.java:504)
| at javassist.util.proxy.ProxyFactory.makeConstructors(ProxyFactory.java:399)
| at javassist.util.proxy.ProxyFactory.make(ProxyFactory.java:288)
| at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:165)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:79)
| at org.hibernate.proxy.pojo.javassist.SerializableProxy.readResolve(SerializableProxy.java:54)
| 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:585)
| at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1033)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1728)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy0.executeCommand(Unknown Source)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.pruefeUeberweisungImPostfachAngekommen(KonsiliarbogenWorkflow_Test.java:220)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.arztErstelltUeberweisungsbogen(KonsiliarbogenWorkflow_Test.java:122)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.testWorkflow(KonsiliarbogenWorkflow_Test.java:36)
| 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:585)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| 09:04:08,500 ERROR [SocketClientInvoker] Got marshalling exception, exiting
| org.hibernate.HibernateException: Javassist Enhancement failed: de.kvbb.ingver.model.KonsiliarbogenZuVertrag
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:88)
| at org.hibernate.proxy.pojo.javassist.SerializableProxy.readResolve(SerializableProxy.java:54)
| 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:585)
| at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1033)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1728)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy0.executeCommand(Unknown Source)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.pruefeUeberweisungImPostfachAngekommen(KonsiliarbogenWorkflow_Test.java:220)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.arztErstelltUeberweisungsbogen(KonsiliarbogenWorkflow_Test.java:122)
| at de.kvbb.ingver.test.integration.KonsiliarbogenWorkflow_Test.testWorkflow(KonsiliarbogenWorkflow_Test.java:36)
| 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:585)
| at junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.lang.NoSuchMethodError: javassist.bytecode.Bytecode.addPutfield(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
| at javassist.util.proxy.ProxyFactory.makeConstructor(ProxyFactory.java:504)
| at javassist.util.proxy.ProxyFactory.makeConstructors(ProxyFactory.java:399)
| at javassist.util.proxy.ProxyFactory.make(ProxyFactory.java:288)
| at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:165)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:79)
| ... 59 more
|
When I omit the call to instance.setKonsiliarbogenZuVertrag(this)
it works. Funny though that the method called is called from within
javassist itself according to the stack trace.
Cheers
Markus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015660#4015660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015660
More information about the jboss-user
mailing list