apparently the call function does work but when instantiating my apple it 
gets a java.lang.LinkageError:

I've adjusted the 
org.apache.cocoon.components.flow.apples.ApplesProcessor:
    private AppleController instantiateController(String className)
        throws Exception {

        // TODO think about dynamic reloading of these beasts in future
        // classloading stuf et al.

        if (getLogger().isDebugEnabled())
            getLogger().debug("ApplesProcessor->instantiateController() - 
className='"+className+"'");

                try {
                Class clazz = Class.forName(className);
                Object o = clazz.newInstance();
                return (AppleController) o;
                }
                catch (LinkageError e)
                {
                if (getLogger().isDebugEnabled())
 getLogger().debug("ApplesProcessor->instantiateController() - 
LinkageError msg="+e.getMessage());
                }
                return null;
    }


this generates the following logging;
(2006-02-23) 14:19.15:296 ApplesProcessor: ApplesProcessor->callFunction() 
- className='be.sofico.MyApple'
(2006-02-23) 14:19.15:296 ApplesProcessor: 
ApplesProcessor->instantiateController() - className='be.sofico.MyApple'
(2006-02-23) 14:19.15:312 ApplesProcessor: 
ApplesProcessor->instantiateController() - LinkageError 
msg=org/apache/cocoon/woody/formmodel/Widget

so it must be something inside the class MyApple that incorrectly links to 
the old Woody Widget class but looking at the import of my class this 
should not be possible:

import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.i18n.I18nUtils;
import org.apache.cocoon.components.flow.apples.AppleController;
import org.apache.cocoon.components.flow.apples.AppleRequest;
import org.apache.cocoon.components.flow.apples.AppleResponse;
import org.apache.cocoon.environment.Session;
import org.apache.cocoon.forms.FormContext;
import org.apache.cocoon.forms.FormManager;
import org.apache.cocoon.forms.binding.Binding;
import org.apache.cocoon.forms.binding.BindingManager;
import org.apache.cocoon.forms.event.FormHandler;
import org.apache.cocoon.forms.formmodel.Form;
I've recompiled all the classes correctly; I'm assuming that I don't need 
the deprecated woody-block to run the cforms-block ???

Pls, any help is welcome,

Regards,
Gunter D'Hondt
 







Gunter D'Hondt <[EMAIL PROTECTED]> 
22/02/2006 15:47
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
map:call function






I'm currently upgrading from 2.1.4 to 2.1.8 and converted all Woody stuff 
to CForms stuff but when calling the following sitemap snippet I'm getting 

the error below.

sitemap snippet:
      <map:flow language="apples"/>
 ...
      <map:match pattern="welcomepage">
        <map:call function="be.sofico.myApple">
        ...
        </map:call>
      </map:match>

the stacktrace snippet:
java.lang.NoClassDefFoundError: org/apache/cocoon/woody/formmodel/Widget
                 at java.lang.Class.forName0(Native Method)
                 at java.lang.Class.forName(Class.java:141)
                 at 
org.apache.cocoon.components.flow.apples.ApplesProcessor.instantiateController(ApplesProcessor.java:108)
                 at 
org.apache.cocoon.components.flow.apples.ApplesProcessor.callFunction(ApplesProcessor.java:52)
                 at 
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:138)

so following the ApplesProcessor.java:108 it should make a new instance 
(thru reflecting) from the "be.sofico.myApple" string "classname" but 
apparently it is trying to make a Widget object using the old woody 
package. I don't even understand why it should make a CForms widget at 
that moment.

any help is welcome,

Regards,
Gunter D'Hondt



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to