cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joseph <pjos...@gmail.com>
Subject Re: what does this error mean?
Date Wed, 11 Mar 2009 14:43:20 GMT
Hi Robby,
I have attached the .xml file and the template file and the flowscript 
is below

It gets into the function (i.e. prints out the first debug statement), 
and displays the form fine when this function tskMine() is called from 
the login page.

But it does not get into any of the function under the if 
(showPageAndContinue("tskmine-display-pipeline", form, selectListData)).

Thanks for taking a look!

Paul
-----------
function tskMine() { init();
//try {
debug("In tskMine()!");  //this works and the form displays correctly
    var form = new Form("context://webtask/task/tskmine.xml");
    form.locale = locale;
    var model = form.getModel();
 cocoon.session.setAttribute('workFlow', "tskMine"); 
var selectListData = new Object();
selectListData['securityManager'] =  
cocoon.session.getAttribute('SecurityManager');
var bean = new Packages.org.apache.cocoon.ojb.samples.bean.DictUser();
var requestBean = new Packages.org.apache.cocoon.ojb.samples.bean.Request();
var taskBean = new Packages.org.apache.cocoon.ojb.samples.bean.Task();
var taskBeanValue = new 
Packages.org.apache.cocoon.ojb.samples.bean.TaskIdValues();

var userBean = cocoon.session.getAttribute('userBean');
var fullname = " ";
if(userBean != null)
fullname = userBean.getFullName();
var assigneeId = null;
var requestedById = null;
var assigneeSortBean = cocoon.session.getAttribute('assigneeBean');
var requestSortBean = cocoon.session.getAttribute('requestSortBean');
if (assigneeSortBean != null) {
    assigneeId = assigneeSortBean.getAssignedToId();
    cocoon.session.removeAttribute('assigneeBean'); //clear out value
    if (requestSortBean != null) 
cocoon.session.removeAttribute('requestSortBean'); //clear out
} else if (requestSortBean != null) {
    requestedById = requestSortBean.getRequestedById();
    cocoon.session.removeAttribute('requestSortBean'); //clear out value
    if (assigneeSortBean != null) 
cocoon.session.removeAttribute('assigneeBean'); //clear out
}


if (userBean != null) {
var userId = userBean.getId();
var phone = userBean.getPhone();
taskBean.setAssignedToId(userId);
taskBean.setAssignedToPhone(phone);
  }
var id = taskBean.getAssignedToId();
var taskCollection = null;

if (assigneeId != null) {
var userIdBean = dao.getObject(userBean, "id", assigneeId);
var name = userIdBean.getFullName()  + "\'s";
taskBeanValue.setAssignedToId(name);
taskCollection = taskBean.getMyTasks(assigneeId);
} else if (requestedById != null) {
var requestIdBean = dao.getObject(userBean, "id", requestedById);
var requestedName = requestIdBean.getFullName() + "\'s Requested ";
taskBeanValue.setAssignedToId(requestedName);
//select t.* from array_webtask_task t left outer join 
array_webtask_dictstatus s on (t.status_id = s.id) where 
s.activetask=true and requested_by_id=9
taskCollection = dao.getObjectListbySQL(taskBean,"select  t.* from 
array_webtask_task t left outer join array_webtask_dictstatus s on 
(t.status_id = s.id) where t.requested_by_id=" + 
requestedById.toString() + " and s.activetask=true  order by id asc");
} else {

taskBeanValue.setAssignedToId("My");
taskCollection = taskBean.getMyTasks(id);

}

selectListData["taskBeanValue"] = taskBeanValue;
selectListData["myTasksCount"] = taskCollection.length;
var flagCount = new java.lang.Integer(0);
for (var m=0; m < taskCollection.length; m++) {
   if (taskCollection[m].isFlagged(userBean)) flagCount++;
}
selectListData["myFlagsCount"] = flagCount.toString();
userCollection = dao.getObjectList(factory, bean,"enabled==true",null); 
     
    if (taskCollection != null) {
    var saveBeanData = false;
        if (taskCollection.length < 38)
        for (var i=0;i<taskCollection.length;i++) {
        loadBean( taskCollection[i],model.tskmine_group[i]);
        }
    }
 cocoon.session.setAttribute('batchResult', taskCollection);
 selectListData['fullname'] = fullname;
 if (taskCollection.length < 38)
 selectListData['myTaskSummaryStatement'] = "";
 else selectListData['myTaskSummaryStatement'] = "There are a large 
number of tasks on this screen. Please click the 'Mine' button in the 
control stripe above to display them all.";

var tskMineScrollPosition = 
cocoon.session.getAttribute('tskMineScrollPosition');
 if (tskMineScrollPosition == null) tskMineScrollPosition = 0;
 else cocoon.session.removeAttribute('tskMineScrollPosition');
 model.tskMineScrollPosition = tskMineScrollPosition;
 //debug("$$$tskMineScrollPosition is: " + tskMineScrollPosition);

     if (showPageAndContinue("tskmine-display-pipeline", form, 
selectListData)) { //nothing in here seems to work!!

   
        // Let Cocoon Forms handle the form
       if(form.submitId == "edit") {
           debug("in edit function");
          
           var taskId = model.id;
           //debug("$$$Task id by new method is: " + taskId);
           if (taskId != null)
           {
       taskBean=getTaskBean(taskId);

           cocoon.session.setAttribute('taskBean', taskBean);
          
           var tskMineScrollPosition = model.tskMineScrollPosition;
           
cocoon.session.setAttribute('tskMineScrollPosition',tskMineScrollPosition);
           model.can_save_hidden = false;
           form.showForm("tskEdit");
           }  else {
                  cocoon.session.removeAttribute('taskBean');
                  errorPage("No task selected", "No task was selected to 
edit. Please click the browser back button to continue.");
           }
       }
        if(form.submitId == "create") {
           cocoon.session.removeAttribute('taskBean');
           form.showForm("tskEdit");
       }
       //copy the task
       if(form.submitId == "copy") {
                 
           var taskId = model.id;
           //debug("$$$Task id by new method is: " + taskId);
           if (taskId != null)
           {
                 taskBean=getTaskBean(taskId);
                 taskBean.setTitle(taskBean.getTitle() + "-Copied from 
Task " + taskId)
          taskBean.setId(null);

              cocoon.session.setAttribute('taskBean', taskBean);
                 
              form.showForm("tskEdit");
            }  else {
                  cocoon.session.removeAttribute('taskBean');
                  errorPage("No task selected", "No task was selected to 
edit. Please click the browser back button to continue.");
            }
       }
          // view the form
       if(form.submitId == "view") {
           var taskId = model.id;
        //debug("Task id by new method is: " + taskId);
       taskBean=getTaskBean(taskId);
       cocoon.session.setAttribute('taskBean', taskBean);
           var tskMineScrollPosition = model.tskMineScrollPosition;
           
cocoon.session.setAttribute('tskMineScrollPosition',tskMineScrollPosition);    
  

           form.showForm("tskView");
       }
}
     cocoon.releaseComponent(factory);
/* } catch(e) {
     errorPage("Error", " We apologize, but an error occurred (" + e + 
".) Please inform the system adminstrator about this error.");
     } */
}


Robby Pelssers wrote:
> Hi Paul,
>
> Can you show the javascript controller, the formdefinition and possibly
> the jxtemplate you are using?
>
> Kind regards,
> Robby Pelssers
>
> -----Original Message-----
> From: Paul Joseph [mailto:pjoseph@gmail.com] 
> Sent: Wednesday, March 11, 2009 3:05 AM
> To: users@cocoon.apache.org
> Subject: what does this error mean?
>
> Hi There,
>
> I am upgrading to 2.1.11 (from 2.1.7) and have got past several issues 
> and am ALMOST there.  I now get this error and I don't quite know what 
> it is telling me.  Any pointers would be appreciated.
>
> thx.
> Paul
> ---------
>
> cause: java.lang.NullPointerException
>
> full exception chain stacktrace[hide]
>
> org.apache.cocoon.ProcessingException: Sitemap: error calling
> continuation
> 	at <map:call> -
> file:///C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/w
> ebapps/array/webtask/login/sitemap.xmap:170:33
> 	at <map:mount> -
> file:///C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/w
> ebapps/array/webtask/sitemap.xmap:70:62
> 	at
> org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.j
> ava:113)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invo
> ke(CallFunctionNode.java:126)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:47)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(Matc
> hNode.java:108)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
> ipelineNode.java:143)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> PipelinesNode.java:93)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:235)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:177)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> cessor.java:254)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun
> tNode.java:118)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:47)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(Matc
> hNode.java:108)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
> ipelineNode.java:143)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> PipelinesNode.java:93)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:235)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:177)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> cessor.java:254)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun
> tNode.java:118)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:47)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(Matc
> hNode.java:108)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
> ipelineNode.java:143)
> 	at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
> invokeNodes(AbstractParentProcessingNode.java:69)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
> PipelinesNode.java:93)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:235)
> 	at
> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
> (ConcreteTreeProcessor.java:177)
> 	at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
> cessor.java:254)
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
> 	at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:269)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:188)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:210)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:174)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:108)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 51)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
> 0)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:665)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:528)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:81)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:685)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: org.mozilla.javascript.WrappedException: Wrapped
> java.lang.NullPointerException
> (resource://org/apache/cocoon/forms/flow/javascript/Form.js#194)
> 	at
> org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1693)
> 	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)
> 	at
> org.mozilla.javascript.ScriptableObject.getByGetter(ScriptableObject.jav
> a:1677)
> 	at
> org.mozilla.javascript.ScriptableObject.get(ScriptableObject.java:180)
> 	at
> org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.jav
> a:1315)
> 	at
> org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:13
> 37)
> 	at
> org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:13
> 26)
> 	at
> org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2816)
> 	at
> org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
> 	at
> org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java
> :161)
> 	at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
> 	at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
> 	at
> org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java
> :159)
> 	at org.mozilla.javascript.Context.call(Context.java:489)
> 	at
> org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java
> :1556)
> 	at
> org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java
> :1526)
> 	at
> org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpret
> er.handleContinuation(FOM_JavaScriptInterpreter.java:841)
> 	at
> org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invo
> ke(CallFunctionNode.java:124)
> 	... 46 more
> Caused by: java.lang.NullPointerException
> 	at
> org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsGet_reques
> t(FOM_Cocoon.java:577)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:145)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   

Mime
View raw message