You do need JDK1.3 in order to compile JBoss as it uses some features that were
introduced in 1.3 release.
The appearace of <clinit> in the reflected method listing appears to only occur for
certain types of interfaces. For example this causes jdk1.2.2 to show <clinit>:
public interface Foo {
String[] s = {"S"};
}
but neither of these do:
public interface Foo {
String s = "S";
}
public interface Foo extends javax.ejb.EJBObject {
public void create() throws java.rmi.RemoteException;
}
It shouldn't hurt to ignore methods that are returned by reflection that are not usable
by catching the NoSuchMethodException.
----- Original Message -----
From: "Lars Hofhansl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 31, 2001 12:05 PM
Subject: [JBoss-user] bogus <clinit> in Class.getMethods()
> Hi,
>
> the JBoss deployer seems to suffer from a bug in JDK 1.2.X
> For interfaces Class.getMethods() returns the bogus method <clinit>
> (see Sub bug id 41444465).
> This results in the following error when deploying a bean:
>
> --- snip ---
> [Container factory] java.lang.NoSuchMethodException: <clinit>
> [Container factory] at java.lang.Class.getMethod0(Native Method)
> [Container factory] at java.lang.Class.getMethod(Class.java:854)
> [Container factory] at
>
>org.jboss.ejb.StatelessSessionContainer.setupBeanMapping(StatelessSessionContainer.java:368)
> --- snip ---
>
> Here's a possible fix:
> in StatelessSessionContainer.java in method setupBeanMapping()
> catch NoSuchMethodException.
> It would look something like this:
>
> if
> (!m[i].getDeclaringClass().getName().equals("javax.ejb.EJBObject"))
> {
> try {
> // Implemented by bean
> map.put(m[i], beanClass.getMethod(m[i].getName(),
> m[i].getParameterTypes()));
> Logger.debug("Mapped "+m[i].getName()+"
> "+m[i].hashCode()+"to "+map.get(m[i]));
> } catch (NoSuchMethodException e) {
> // ignore bogus methods...
> }
> }
> else
>
> (A similar fix should be added for Stateful and Entity Beans)
> Maybe somebody with commit permission can add that to CVS...
>
> Note: I can't build with JDK 1.2 because of missing
> java.lang.reflect.InvocationHandler
> (and other classes). Is JBoss supposed to run with JDK 1.2?! Apparently
> it can
> only be built with JDK 1.3?
>
> Thanks,
>
> Lars
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user