<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hello List,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US>we ran into a problem with javassist when recently
upgrading to hibernate 3.3.1.GA, whid did not occur with the previous cglib
implementation. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>We sometimes make use of the cloneable
interface and therefore have declared a public clone() on some objects.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>If those objects are initially loaded
lazily, even if they are fully initialized later on, a call to the clone()
method will result in a java.lang.IllegalAccessError at runtime.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>This is caused by the Javassist proxy,
which exposes the protected clone() of java.lang.Object instead of the public definition
from the interface, which I believe to be a bug.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I submitted a proposed fix for this at </span><a
href="https://jira.jboss.org/jira/browse/JASSIST-85"><span lang=EN-US>https://jira.jboss.org/jira/browse/JASSIST-85</span></a><o:p></o:p></p>
<p class=MsoNormal><span lang=EN-US>The result of the fix is, that the clone
method of the target is called, which returns a cloned instance of the target
object (not a clone of the proxy object), which is exactly what we need.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Maybe someone can give their 2 cent if this
is actually desired behavior or if this could cause unwanted side-effects.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I believe it's in every case better than
the current state (runtime errors), and others seem to have had similar issues
as well<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>(see HHH-1726 and http://preview.tinyurl.com/mpnz9p)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Kind
regards<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Tobias
Meyer<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
</div>
</body>
</html>