#239 Bug with Javassist

Dozer v5.3.0
closed-fixed
5
2010-09-01
2010-01-07
Josh B
No

I am getting an error using Hibernate with Javassist, where Dozer is storing the javassist proxy class in the dozer class. I have isolated the problem to ClassMapBuilder.createDefaultClassMap( (Configuration globalConfiguration, Class<?> srcClass, Class<?> destClass).

In this method, classMap.setDestClass( new DozerClass( destClass.getName(), destClass .... ) is called, where destClass is the proxied javassist class.

I resolved the issue for me by adding to the top of the method:

destClass = MappingUtils.getRealClass(destClass);
srcClass = MappingUtils.getRealClass(srcClass);

I realize this is not a very good bug submission in terms of understanding the problem, but I was hoping that someone with more understanding of the source code could perhaps take a look and understand if this is truely the bug. I could submit a patch, but as you can see, it is a 2-line fix.

Please confirm that this is in fact a bug, or please ask for clarification.

Thanks

Discussion

  • dmitry (lv)

    dmitry (lv) - 2010-01-07
    • milestone: --> 929386
    • assigned_to: nobody --> buzdin
     
  • dmitry (lv)

    dmitry (lv) - 2010-01-07

    Hi, yes, this is a bug.
    This thread has in depth investigation https://sourceforge.net/tracker/?func=detail&aid=2560608&group_id=133517&atid=727368
    I will try to set-up few integration tests reproducing the behavior before putting in the lines you suggested and fixes, explained in referenced thread. If you would find minimal hibernate mapping and configuration reproducing the problem, it could help.

     
  • dmitry (lv)

    dmitry (lv) - 2010-09-01

    Proxy handling fixes are coming in 5.3.0. Please check your test case when Snapshot becomes available.

     
  • dmitry (lv)

    dmitry (lv) - 2010-09-01
    • milestone: 929386 --> Dozer v5.3.0
    • status: open --> open-fixed
     
  • dmitry (lv)

    dmitry (lv) - 2010-09-01
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks