Ok, some steps of debug later, i found that Jboss 4.0.4.ga.patch1 use javassist
3.2.0.cr2, and the production (stable) version of javassist is 3.1.
Well, i tried to put the stable version in new Jboss and voilá, nothing
happens, the error continued to occur. I think that the stable version of
javassist, associated with the 3.1.beta version of hibernate
annotations/entitymanager, the position of the Moon, Mars and Pluto was
influencing this error.
The error of duplicated method occurs because Sun has implemented generics in a
very awful way: a unique generic method produces 2 method in runtime, with the
same signature, one volatile returning Object, and other the correct. This was
confusing my javassist, and making some mods I could correct the bizarre
"duplicated method" error.
Do something like that in class ProxyFactory:
javassist.util.proxy.ProxyFactory
|
| ...
|
| private static boolean isVisible(int mod, String from, Member meth) {
| // this allow generics
| if ((mod & Modifier.VOLATILE) != 0)
| return false;
| else if ((mod & Modifier.PRIVATE) != 0)
| return false;
| else if ((mod & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0)
| return true;
| else {
| String p = getPackageName(from);
| String q = getPackageName(meth.getDeclaringClass().getName());
| if (p == null)
| return q == null;
| else
| return p.equals(q);
| }
| }
| }
|
| ...
In this way, any volatile method isn't added to the class, avoiding the
"duplicated" error.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945510#3945510
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945510
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user