cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject problem with forehead
Date Thu, 27 Feb 2003 16:51:58 GMT

Cocoon is using Forehead to bootstrap its services. We found a weird 
problem related to JDK 1.3.1 which is probably a JDK bug that was fixed 
on 1.4.1.

This is related to the fact that the entry point class we call extends 
another class that exposes a main() method. It seems that Forehead calls 
the right method, but JDK 1.3.1 invoques the method of the super class 
instead of the one of the extending class.

I found out that if I modify the method like the following:

     public void run(String[] args)
         Class[] method_param_types = new Class[1];
         method_param_types[0] = args.getClass();

         Method main = 

         Object[] method_params = new Object[1];
         method_params[0] = args;

         Thread.currentThread().setContextClassLoader( this.entryLoader );


the problem goes away.

I'm recompiling forehead with this patch to include in Cocoon, but I'd 
be happy to see this bug fixed in the main Forehead distribution.


Stefano Mazzocchi                               <>
    Pluralitas non est ponenda sine necessitate [William of Ockham]

View raw message