Menu

#361 crash

open
nobody
None
5
2011-12-08
2011-12-08
No

dozer provoke to crash javassist.

if i'm not using dozer to serialize objects everyting working fine. when i use doze it crash my app:

Discussion

  • Alexey Kuznetsov

     
  • Alexey Kuznetsov

    this simple code can reproduce the problem:

    Mapper mapper = DozerBeanMapperSingletonWrapper.getInstance();
    Object oo = mapper.map(o, o.getClass());
    try {
    ObjectOutputStream os = new ObjectOutputStream(new ByteArrayOutputStream());
    os.writeObject(oo);
    } catch (Exception e) {
    throw new RuntimeException(e);
    }

     
  • Alexey Kuznetsov

    it will produce the following exception:

    java.lang.NullPointerException
    javassist.util.proxy.RuntimeSupport$DefaultMethodHandler.invoke(RuntimeSupport.java:37)
    com.payment.dao.User_$$_javassist_13.writeReplace(User_$$_javassist_13.java)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:616)
    java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:1049)
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1131)
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)

     

Log in to post a comment.