cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Velychko <v_pe...@ukr.net>
Subject Re[2]: Continuation - strange problem
Date Fri, 23 Jan 2004 16:34:12 GMT
Hello Christopher,

My flowscript looks like the following:
var user, permittedRubrics;

function login(errorMsg) {
    var login = "";
    var password = "";
    while (true) {
        var viewData = {
                         errorMsg : errorMsg,
                         login : login,
                         password : password
                       };
        cocoon.sendPageAndWait("screens/ru/admin/login.jx", viewData);
        errorMsg = null;

        login = cocoon.request.getParameter("login");
        password = cocoon.request.getParameter("psw");

        if (login != "" && password != "") {
            try {
                var userReg = factory.createUserRegistry();
                user = userReg.getUserWithLogin(login, password);
                userReg.release();

                if (user != undefined) {
                    break;
                } else {
                    errorMsg = "No such user or bad password";
                }
            }
            catch (e) {}
        } else {
            errorMsg = "Please input correct values";
        }
    }
    // collecting rubrics permitted for the user
    try {
        var userReg2 = factory.createUserRegistry();
        if (userReg2.existsPermission(user, "manageAllDocuments")) {
            // getting all rubrics
            permittedRubrics = getAllRubrList();
        } else {
            permittedRubrics = userReg2.getPermittedRubrics(user);
        }
    }
    catch (e) {
        cocoon.log.error("--> Exception "+e);
    }

    // area where exception arises
    try {
        userReg2.release();
    }
    catch (e) {
        cocoon.log.error("--> Exception "+e);
    }
    userReg = null;
        
    var session = cocoon.session;

    rubrView("Rubric List");
}

The exception arises without any visible reason for me.

CO> What does your flowscript look like?

CO> Peter Velychko wrote:

>>Hello All,
>>
>>Could anyone help me with the following error?
>>ERROR   (2004-01-23) 17:39.03:234   [sitemap.] (/private/continue.1c29510e1319484e1e178266285e076570517f14)
Thread-13/PipelineNode: 2
>>java.lang.ArrayIndexOutOfBoundsException: 2
>>        at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:374)
>>        at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:190)
>>        at org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(ContinuationInterpreter.java:138)
>>        at org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(InterpretedFunctionImpl.java:121)
>>        at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)
>>        at org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:1591)
>>        at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.handleContinuation(FOM_JavaScriptInterpreter.java:606)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:151)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:163)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)
>>        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354)
>>        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:163)
>>        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>>        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:152)
>>        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:354)
>>        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)
>>        at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
>>        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>        at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>        at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>>        at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>        at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>>        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
>>        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
>>        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
>>        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
>>        at java.lang.Thread.run(Thread.java:534)
>>
>>
>>My environment is the following:
>>jdk 1.4.2
>>tomcat 4.1.18
>>cocoon 2.1.3
>>
>>Thank you in advance.
>>
>>  
>>



CO> ---------------------------------------------------------------------
CO> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
CO> For additional commands, e-mail: users-help@cocoon.apache.org





-- 
Best regards,
Peter Velychko                            
v_peter@ukr.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message