[webbeans-issues] [JBoss JIRA] Commented: (WBRI-193) resolve potential LinkageError

Takeshi Kondo (JIRA) jira-events at lists.jboss.org
Thu Mar 19 23:00:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/WBRI-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12458310#action_12458310 ] 

Takeshi Kondo commented on WBRI-193:
------------------------------------

> though I don't understand where the LinkageError comes from.
ProxyFactory don't cause LinkageError, because ProxyFactory ensure generated class naming uniqueness.

But, Seam have ProxyFactory coped  from Javassist(http://docs.jboss.org/seam/2.0.2.SP1/api/org/jboss/seam/util/ProxyFactory.html) ,so ProxyFactory's generated class naming uniqueness is lost.

Using Seam's ProxyFactory and Javassist's ProxyFactory , monotone class naming rule cause dumplicate class name.
LinkageError comes from it.


> resolve potential LinkageError
> ------------------------------
>
>                 Key: WBRI-193
>                 URL: https://jira.jboss.org/jira/browse/WBRI-193
>             Project: Web Beans
>          Issue Type: Patch
>    Affects Versions: 1.0.0.BETA1
>            Reporter: Takeshi Kondo
>            Assignee: Nicklas Karlsson
>            Priority: Trivial
>             Fix For: 1.1.0.BETA1
>
>         Attachments: Proxies.java.patch
>
>
> Some time age, LinkageError is caused by Seam's Javassist ProxyFactory usage.
> It same applies to WebBeans.
> if possible, make a modification 
> from 
> ---
> 	     ProxyFactory proxyFactory = new ProxyFactory();
>          proxyFactory.setSuperclass(getSuperClass();
>          proxyFactory.setInterfaces(getInterfaces());
>          return proxyFactory;
> to 
> ---
> 	 ProxyFactory proxyFactory = new ProxyFactory();
>          Class<?> superClass = getSuperClass();
>          if(superClass != Object.class)
>          {
>             proxyFactory.setSuperclass(superClass);
>          }
>          proxyFactory.setInterfaces(getInterfaces());
>          return proxyFactory;
> ---
> Apply to this patch, 
> If proxy target class is interface, generated proxy class name changes 
> form "org.javassist.tmp.java.lang.Object_$$_javassist_0"
> to "org.javassist.tmp.java.util.List_$$_javassist_0".
> All interface generated proxy class name is "org.javassist.tmp.java.lang.Object_$$_javassist_(number)"
> Because proxy class name pattern is monotone,
> duplicate proxy class name, then it causes LinkageError.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the weld-issues mailing list