Direct Action - Unable to find Page

36 views
Skip to first unread message

Sarosh Mathew Koshy

unread,
Aug 4, 2015, 1:05:16 AM8/4/15
to AribaWeb (aribaweb.org)
Dear All

I'm facing a very simple issue with a Direct Action component I'm trying to get up-and-running. I've checked past questions and also read the blog article several times and checked my code, but am still unable to figure out what's gone wrong.

My DirectAction class is implemented within an existing application that does session management. I'm programmatically generating the URL. The link appears on the page, but when I click it, I get hit with:

AWGenericException: Unable to locate page with name "http://localhost:8080/EasyCare2.5/AribaWeb/ad/posts?awr=a"

I'm generating the URL through the following lines of code.

    public String exportURL () {
        AWDirectActionUrl url = AWDirectActionUrl.checkoutFullUrl(requestContext());
        url.setDirectActionName(DirectAction.PostsAction);
        url.setRequestContext(requestContext());
        url.setSessionId(session().sessionId());

        return url.finishUrl();
    }


What am I doing wrong? Where should the DirectAction class reside? Should it only be in the app package or can it reside in the package where the URL is being used?

My DirectAction class is very simple -- just used the code from the examples to test the concept:

package apps;

import ariba.ui.aribaweb.core.AWDirectAction;
import ariba.ui.aribaweb.core.AWResponseGenerating;
import ariba.ui.aribaweb.core.AWResponse;
import ariba.ui.aribaweb.core.AWRequest;
import ariba.ui.aribaweb.util.AWContentType;
import ariba.util.core.HTTP;
import ariba.util.core.ListUtil;
import java.util.List;

public class DirectAction extends AWDirectAction
{
    public static final String PostsAction = "posts";

    public AWResponseGenerating postsAction ()
    {
        AWRequest request = request();
        AWResponse response = application().createResponse(request);
        response.setContentType(AWContentType.TextPlain);
        response.appendContent("Hello World!");
        return response;   
    }

}


Thanks for the help!

Sarosh

Frantisek Kolar

unread,
Aug 4, 2015, 1:59:33 AM8/4/15
to arib...@googlegroups.com
Search for different exception! Find the place who throws this AWGenericException and try to find out a the real reason behind this (real exception which is then wrapped into this generic one)

-fk


--
You received this message because you are subscribed to the Google Groups "AribaWeb (aribaweb.org)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aribaweb+u...@googlegroups.com.
To post to this group, send email to arib...@googlegroups.com.
Visit this group at http://groups.google.com/group/aribaweb.
For more options, visit https://groups.google.com/d/optout.

Sarosh Mathew Koshy

unread,
Aug 4, 2015, 6:25:22 AM8/4/15
to AribaWeb (aribaweb.org)
It is an exception in the component MetaTemplateConditional.

1. Where is AribaWeb looking to locate the DirectAction class?
2. Is the exception caused by the content I am generating?

Log extract below:
------------------------------------------------------------------------

     [java] ariba.ui.aribaweb.util.AWGenericException: Unable to locate page with name "http://localhost:8080/EasyCare2.5/AribaWeb/ad/posts?awr=l"
     [java] The following exception occurred while evaluating fieldpath: : <AWKeyPathBinding> invokeAction="$invokeAction", Component: ariba.ui.aribaweb.html.AWHyperlink@524753ef
     [java] -- Component Path:
     [java]         a:MetaTemplateConditional(/home/saroshmk/My Work/1 - Development/9 - Utils/aribaweb-5.0.3GA/src/aribaweb/ariba/ui/aribaweb/html/AWHyperlink.awl:108)
     [java]         AWHyperlink(/home/saroshmk/My Work/1 - Development/3 - Build/EasyCare2.5/modules/cpoe/core/CPCTreatmentChart.awl:104)
     [java]     at ariba.ui.aribaweb.core.AWConcreteApplication.createPageWithName(AWConcreteApplication.java:507)
     [java]     at ariba.ui.aribaweb.core.AWRequestContext.pageWithName(AWRequestContext.java:258)
     [java]     at ariba.ui.aribaweb.core.AWComponent.pageWithName(AWComponent.java:1416)


The rest of the content is the stack trace.


ajin george

unread,
Aug 5, 2015, 4:59:55 AM8/5/15
to AribaWeb (aribaweb.org)
Hi sarosh,

               From the document provided by aribaweb, it has been mentioned that DirectAction class needs to be placed inside the app package. From the code that you have provided, it can me made out that your DirectAction class is under package apps. Try to place it under app package and give it a try.


Regards

  Ajin

Frantisek Kolar

unread,
Aug 5, 2015, 5:01:44 AM8/5/15
to arib...@googlegroups.com
 I think its all about the ClassNotFoundException and if it is then he needs to register this class with resource manager. 

-FK

Sarosh Mathew Koshy

unread,
Aug 5, 2015, 5:39:00 AM8/5/15
to AribaWeb (aribaweb.org)
Hello Ajin

That was one of the things I attempted before I posted. It still raised the same exception.

I've not been able to try out Frantisek's solution yet. Stuck with something else. Will try and post back on the group!

Thanks for the response!

Sarosh
Reply all
Reply to author
Forward
Message has been deleted
0 new messages