Re: AW: newbie: creating a cocoon action using AbstractMultiAction

2003-01-20 Thread Julian Klein
Thanks, but the class is in the cocoon-2.1-dev.jar
under $TOMCAT_HOME/webapps/cocoon/WEB-INF/lib.  I
tried moving it into $TOMCAT_HOME/common/lib, but
after that Cocoon would not even start...so based on
that result I did not put it on the machine's
CLASSPATH and just let TOMCAT load the classes from
the jar.

Thanks,
Julian

--- Marco Rolappe <[EMAIL PROTECTED]> wrote:
> the stacktrace says that the AbstractMultiAction
> can't be found.
> 
> make sure that this class is in the classpath (it
> should be in the cocoon
> JAR, but you better check that out).
> 
> -Ursprungliche Nachricht-
> Von:
>
[EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]]Im
> Auftrag von Julian Klein
> Gesendet: Montag, 20. Januar 2003 22:27
> An: [EMAIL PROTECTED]
> Betreff: Re: newbie: creating a cocoon action using
> AbstractMultiAction
> 
> 
> Hey Marcus,
>  Yeah I'm sorry, but I had fixed that (I jsut sent
> the
> old sitemap DUH).  You see I tried it in the
> original
> package of com.ethidium, but then thought my class
> should be in the cocoon dev jar so I moved it to
> org.apache.cocoon.acting and changed the sitemap.
> Unfortunately neither worked eventhough the sitemap
> matched the location of the class.  I know it is
> accessing the class since it is looking for the
> AbstractMultiAction class (it's superclass).  I am
> running also the slide sample from the scratchpad
> which has actions that use the AbstractMultiAction
> class as well...but they works fine.  I am boggled
> about this...could it have something to do with
> Thread
> safety from the Avalon framework or some funny
> classloading issue?
> 
> Thanks Again,
> Julian
> 
> 
> --- Marcus Crafter
> <[EMAIL PROTECTED]> wrote:
> > Hi Julian,
> >
> > Not sure what the problem is exactly, but your
> > source file has
> > your action in the package
> > 'org.apache.cocoon.acting', whereas your
> > sitemap.xmap file says that is under
> > 'com.ethidium.cocoon.action'.
> >
> > Perhaps that's causing things to go a bit pear
> > shaped. Hope that
> > helps.
> >
> > Cheers,
> >
> > Marcus
> >
> > On Mon, Jan 20, 2003 at 01:06:09PM -0800, Julian
> > Klein wrote:
> > >
> > > *ACTION JAVA
> > CODE**
> > > /*
> > >  * TaskAction.java
> > >  *
> > >  * Created on January 14, 2003, 12:16 PM
> > >  */
> > > package org.apache.cocoon.acting;
> >
> > ..
> >
> > >
> >
>
***SITEMAP**
> **
> >
> > ..
> >
> > >   
> > > > src="com.ethidium.cocoon.action.TaskAction"/>
> >
> > --
> > .
> >  ,,$,  Marcus Crafter
> > ;$'  ':Computer Systems Engineer
> > $: :   ManageSoft GmbH
> >  $   o_)$$$:   82-84 Mainzer Landstrasse
> >  ;$,_/\ &&:'   60327 Frankfurt Germany
> >' /( &&&
> >\_&&&&'
> >   &&&&.
> > &&&&&&&:
> >
> >
>
-
> > Please check that your question  has not already
> > been answered in the
> > FAQ before posting.
> > <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> >
> 
> 
> =
> Live simply so others may simply live.
> 
> -Ghandi
> 
> Pluralitas non est ponenda sine neccesitate.
> "Entities should not be multiplied unneccesarily"
> 
> -William of Occam
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


=
Live simply so others may simply live.
 
-Ghandi
 
Pluralitas non est ponenda sine neccesitate.
"Entities should not be multiplied unneccesarily"
 
-William of Occam

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




AW: newbie: creating a cocoon action using AbstractMultiAction

2003-01-20 Thread Marco Rolappe
the stacktrace says that the AbstractMultiAction can't be found.

make sure that this class is in the classpath (it should be in the cocoon
JAR, but you better check that out).

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im
Auftrag von Julian Klein
Gesendet: Montag, 20. Januar 2003 22:27
An: [EMAIL PROTECTED]
Betreff: Re: newbie: creating a cocoon action using AbstractMultiAction


Hey Marcus,
 Yeah I'm sorry, but I had fixed that (I jsut sent the
old sitemap DUH).  You see I tried it in the original
package of com.ethidium, but then thought my class
should be in the cocoon dev jar so I moved it to
org.apache.cocoon.acting and changed the sitemap.
Unfortunately neither worked eventhough the sitemap
matched the location of the class.  I know it is
accessing the class since it is looking for the
AbstractMultiAction class (it's superclass).  I am
running also the slide sample from the scratchpad
which has actions that use the AbstractMultiAction
class as well...but they works fine.  I am boggled
about this...could it have something to do with Thread
safety from the Avalon framework or some funny
classloading issue?

Thanks Again,
Julian


--- Marcus Crafter
<[EMAIL PROTECTED]> wrote:
> Hi Julian,
>
>   Not sure what the problem is exactly, but your
> source file has
>   your action in the package
> 'org.apache.cocoon.acting', whereas your
>   sitemap.xmap file says that is under
> 'com.ethidium.cocoon.action'.
>
>   Perhaps that's causing things to go a bit pear
> shaped. Hope that
>   helps.
>
>   Cheers,
>
>   Marcus
>
> On Mon, Jan 20, 2003 at 01:06:09PM -0800, Julian
> Klein wrote:
> >
> > *ACTION JAVA
> CODE**
> > /*
> >  * TaskAction.java
> >  *
> >  * Created on January 14, 2003, 12:16 PM
> >  */
> > package org.apache.cocoon.acting;
>
> ..
>
> >
>
***SITEMAP**
**
>
> ..
>
> >   
> > src="com.ethidium.cocoon.action.TaskAction"/>
>
> --
> .
>  ,,$,  Marcus Crafter
> ;$'  ':Computer Systems Engineer
> $: :   ManageSoft GmbH
>  $   o_)$$$:   82-84 Mainzer Landstrasse
>  ;$,_/\ &&:'   60327 Frankfurt Germany
>' /( &&&
>\_&&&&'
>   &&&&.
> &&&&&&&:
>
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <[EMAIL PROTECTED]>
>


=
Live simply so others may simply live.

-Ghandi

Pluralitas non est ponenda sine neccesitate.
"Entities should not be multiplied unneccesarily"

-William of Occam

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: newbie: creating a cocoon action using AbstractMultiAction

2003-01-20 Thread Julian Klein
Hey Marcus,
 Yeah I'm sorry, but I had fixed that (I jsut sent the
old sitemap DUH).  You see I tried it in the original
package of com.ethidium, but then thought my class
should be in the cocoon dev jar so I moved it to
org.apache.cocoon.acting and changed the sitemap.
Unfortunately neither worked eventhough the sitemap
matched the location of the class.  I know it is
accessing the class since it is looking for the
AbstractMultiAction class (it's superclass).  I am
running also the slide sample from the scratchpad
which has actions that use the AbstractMultiAction
class as well...but they works fine.  I am boggled
about this...could it have something to do with Thread
safety from the Avalon framework or some funny
classloading issue?

Thanks Again,
Julian


--- Marcus Crafter
<[EMAIL PROTECTED]> wrote:
> Hi Julian,
> 
>   Not sure what the problem is exactly, but your
> source file has
>   your action in the package
> 'org.apache.cocoon.acting', whereas your
>   sitemap.xmap file says that is under
> 'com.ethidium.cocoon.action'.
>   
>   Perhaps that's causing things to go a bit pear
> shaped. Hope that
>   helps.
>   
>   Cheers,
>   
>   Marcus
>   
> On Mon, Jan 20, 2003 at 01:06:09PM -0800, Julian
> Klein wrote:
> > 
> > *ACTION JAVA
> CODE**
> > /*
> >  * TaskAction.java
> >  *
> >  * Created on January 14, 2003, 12:16 PM
> >  */
> > package org.apache.cocoon.acting;
> 
> ..
> 
> >
>
***SITEMAP
> 
> ..
> 
> >   
> > src="com.ethidium.cocoon.action.TaskAction"/>
> 
> -- 
> .
>  ,,$,  Marcus Crafter
> ;$'  ':Computer Systems Engineer
> $: :   ManageSoft GmbH
>  $   o_)$$$:   82-84 Mainzer Landstrasse
>  ;$,_/\ &&:'   60327 Frankfurt Germany
>' /( &&&
>\_'
>   .
> &&&:
> 
>
-
> Please check that your question  has not already
> been answered in the
> FAQ before posting.
> 
> 
> To unsubscribe, e-mail:
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


=
Live simply so others may simply live.
 
-Ghandi
 
Pluralitas non est ponenda sine neccesitate.
"Entities should not be multiplied unneccesarily"
 
-William of Occam

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: newbie: creating a cocoon action using AbstractMultiAction

2003-01-20 Thread Marcus Crafter
Hi Julian,

Not sure what the problem is exactly, but your source file has
your action in the package 'org.apache.cocoon.acting', whereas your
sitemap.xmap file says that is under 'com.ethidium.cocoon.action'.

Perhaps that's causing things to go a bit pear shaped. Hope that
helps.

Cheers,

Marcus

On Mon, Jan 20, 2003 at 01:06:09PM -0800, Julian Klein wrote:
> 
> *ACTION JAVA CODE**
> /*
>  * TaskAction.java
>  *
>  * Created on January 14, 2003, 12:16 PM
>  */
> package org.apache.cocoon.acting;

..

> ***SITEMAP

..

>   
>

-- 
.
 ,,$,  Marcus Crafter
;$'  ':Computer Systems Engineer
$: :   ManageSoft GmbH
 $   o_)$$$:   82-84 Mainzer Landstrasse
 ;$,_/\ &&:'   60327 Frankfurt Germany
   ' /( &&&
   \_'
  .
&&&:

-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




newbie: creating a cocoon action using AbstractMultiAction

2003-01-20 Thread Julian Klein
Hi all,

I am currently trying to create my own action for
cocoon 2.  Moreover, I am trying to use the
AbstractMultiAction class so I can call methods on the
action via a http post form field.  Unfortunately I
have been able to compile it, but get a Class Not
Found Exception when I try access the URL that points
to the sitemap with the mounted action.  I am not
trying to use the action, I just have the action
mounted.  Below is my java action code and I have
attached my stack trace/sitemap as one text file.  Any
help would be appreciated.  I am using red hat 8.0,
j2sdk 1.4, and a cocoon 2.x build from about a month
ago.

Thanks in Advance


*ACTION JAVA CODE**
/*
 * TaskAction.java
 *
 * Created on January 14, 2003, 12:16 PM
 */
package org.apache.cocoon.acting;
/**
 *
 * @author  Julian
 */ 

import org.apache.avalon.framework.context.Context;
import
org.apache.avalon.framework.context.ContextException;
import
org.apache.avalon.framework.context.Contextualizable;
import
org.apache.avalon.framework.parameters.ParameterException;
import
org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;

import org.apache.cocoon.Constants;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.acting.AbstractMultiAction;
import
org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.SourceResolver;

import java.util.Map;

import com.ethidium.wEMR.classes.Task;
import com.ethidium.wEMR.classes.TaskManager;
import com.ethidium.wEMR.classes.TaskGroup;

public class TaskAction extends AbstractMultiAction
implements ThreadSafe {

  public static final String TASK_ACTION =
"task-action";
  public static final String SUBJECT_NODE =
"task-subject-node";
  public static final String CATEGORY =
"task-category";
  public static final String DEST_CATEGORY =
"task-dest-category";
  public static final String DEST_SUBJECT_NODE =
"task-dest-subject-node";
  public static final String TASK_TITLE =
"task-title";
  public static final String TASK_DESCRIPTION =
"task-description";
  public static final String TASK_DUE_DATE =
"task-due-date";
  public static final String TASK_PRIORITY =
"task-priority";
  public static final String TASK_STATUS =
"task-status";
  public static final String TASK_URI = "task-uri";
  public static final String TASK_OWNER =
"task-owner";
  
  /*public Map act (Redirector redirector, 
  SourceResolver resolver, 
  Map objectModel, 
  String source, 
  Parameters params) {
Map sitemapParams = new HashMap();
sitemapParams.put("world", "hello");

Request request =
ObjectModelHelper.getRequest(objectModel);

action = request.getAttribute("action");

return sitemapParams;
  }*/
  
  public Map doCreateTask(Redirector redirector,
   SourceResolver resolver,
   Map objectModel,
   String src,
   Parameters parameters) throws
Exception {
   
Request request =
ObjectModelHelper.getRequest(objectModel);

//determine dest of task to be created
String subjectNode =
parameters.getParameter(SUBJECT_NODE,
 
request.getParameter(SUBJECT_NODE));
String category =
parameters.getParameter(CATEGORY,
 
request.getParameter(CATEGORY));
//get task values
String taskTitle =
parameters.getParameter(TASK_TITLE,
 
request.getParameter(TASK_TITLE));
String taskDescription =
parameters.getParameter(TASK_DESCRIPTION,
 
request.getParameter(TASK_DESCRIPTION));
String taskDueDate =
parameters.getParameter(TASK_DUE_DATE,
 
request.getParameter(TASK_DUE_DATE));
String taskPriority =
parameters.getParameter(TASK_PRIORITY,
 
request.getParameter(TASK_PRIORITY));
String taskStatus =
parameters.getParameter(TASK_STATUS,
 
request.getParameter(TASK_STATUS));
String taskURI =
parameters.getParameter(TASK_URI,
 
request.getParameter(TASK_URI));
String taskOwner =
parameters.getParameter(TASK_OWNER,
 
request.getParameter(TASK_OWNER));

getLogger().info("create task "+taskTitle+" at
"+subjectNode+"/"+category);

TaskManager taskManager = new TaskManager();
Task task = new Task(taskOwner, taskTitle,
taskDescription, taskURI, taskDueDate, taskPriority,
taskStatus);
taskManager.storeTask(subjectNode, category,
task);

return EMPTY_MAP;
  }
}

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up n