You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Shing Hing Man <ma...@yahoo.com> on 2007/06/28 23:29:46 UTC

Tap 4.1.2 PageNotFoundException not caught

After updating to the latest Tap 4.1.2, a
PageNotFoundException is no longer 
caught in the following piece of code in my border
component.

public boolean isShowHelpLink() {
		boolean show = true;
		IPage currentPage = getPage();
		String helpPageName = currentPage.getPageName() +
"Help";
		try {
			IRequestCycle  requestCycle =
getPage().getRequestCycle();
			requestCycle.getPage(helpPageName); // Exception
here is not caught
		} catch (PageNotFoundException pnfe) {
			show = false;
		}

		return show;
	}

Instead, the exception is shown on the exception page
:
org.apache.hivemind.ApplicationRuntimeException
There was an error borrowing the page with key
PageKey[_pageName='HomeHelp' , _locale=en_GB ] from
the page pool.
 
[ +/- ] Exception: Page 'HomeHelp' not found in
application namespace.
org.apache.tapestry.PageNotFoundException
Page 'HomeHelp' not found in application namespace.
pageName: 	HomeHelp
Stack Trace:

    *
org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve(PageSpecificationResolverImpl.java:147)
    *
$PageSpecificationResolver_113742bd0e2.resolve($PageSpecificationResolver_113742bd0e2.java)
    *
$PageSpecificationResolver_113742bd0e3.resolve($PageSpecificationResolver_113742bd0e3.java)
    *
org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:148)
    *
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:797)
    *
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177)
    *
$IPageSource_113742bd03e.getPage($IPageSource_113742bd03e.java)
    *
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
    *
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
    *
$IRequestCycle_113742bd14e.getPage($IRequestCycle_113742bd14e.java)
    *
$IRequestCycle_113742bd068.getPage($IRequestCycle_113742bd068.java)
    *
net.sf.financial.components.Border.isShowHelpLink(Border.java:103)
    *
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) 



Is the above the expected behaviour ?

Shing 

Home page : http://uk.geocities.com/matmsh/


      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

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


Re: Tap 4.1.2 PageNotFoundException not caught

Posted by Shing Hing Man <ma...@yahoo.com>.
I have created a jira for it.
 https://issues.apache.org/jira/browse/TAPESTRY-1616

Shing

--- Jesse Kuhnert <jk...@gmail.com> wrote:

> Damn those commons-pool developers for making me
> catch their checked
> exception.......And not even a specific type at
> that...Oh no...just
> java.lang.Exception.  fuc%4%-ers...
> 
> I should probably try some strategy to re-throw the
> original exception if
> it's within the org.apache.tapestry package.
> 
> If someone logs a jira issue I won't forget about
> it.
> 
> On 6/28/07, Shing Hing Man <ma...@yahoo.com> wrote:
> >
> >
> > After updating to the latest Tap 4.1.2, a
> > PageNotFoundException is no longer
> > caught in the following piece of code in my border
> > component.
> >
> > public boolean isShowHelpLink() {
> >                 boolean show = true;
> >                 IPage currentPage = getPage();
> >                 String helpPageName =
> currentPage.getPageName() +
> > "Help";
> >                 try {
> >                         IRequestCycle 
> requestCycle =
> > getPage().getRequestCycle();
> >                        
> requestCycle.getPage(helpPageName); // Exception
> > here is not caught
> >                 } catch (PageNotFoundException
> pnfe) {
> >                         show = false;
> >                 }
> >
> >                 return show;
> >         }
> >
> > Instead, the exception is shown on the exception
> page
> > :
> > org.apache.hivemind.ApplicationRuntimeException
> > There was an error borrowing the page with key
> > PageKey[_pageName='HomeHelp' , _locale=en_GB ]
> from
> > the page pool.
> >
> > [ +/- ] Exception: Page 'HomeHelp' not found in
> > application namespace.
> > org.apache.tapestry.PageNotFoundException
> > Page 'HomeHelp' not found in application
> namespace.
> > pageName:       HomeHelp
> > Stack Trace:
> >
> >     *
> >
>
org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve(
> > PageSpecificationResolverImpl.java:147)
> >     *
> >
> >
>
$PageSpecificationResolver_113742bd0e2.resolve($PageSpecificationResolver_113742bd0e2.java)
> >     *
> >
> >
>
$PageSpecificationResolver_113742bd0e3.resolve($PageSpecificationResolver_113742bd0e3.java)
> >     *
> >
>
org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:148)
> >     *
> >
>
org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(
> > GenericKeyedObjectPool.java:797)
> >     *
> >
>
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177)
> >     *
> >
>
$IPageSource_113742bd03e.getPage($IPageSource_113742bd03e.java)
> >     *
> >
>
org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
> >     *
> >
>
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
> >     *
> >
>
$IRequestCycle_113742bd14e.getPage($IRequestCycle_113742bd14e.java)
> >     *
> >
>
$IRequestCycle_113742bd068.getPage($IRequestCycle_113742bd068.java)
> >     *
> >
>
net.sf.financial.components.Border.isShowHelpLink(Border.java:103)
> >     *
> >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >
> >
> >
> > Is the above the expected behaviour ?
> >
> > Shing
> >
> > Home page : http://uk.geocities.com/matmsh/
> >
> >
> >      
>
___________________________________________________________
> > Yahoo! Mail is the world's favourite email. Don't
> settle for less, sign up
> > for
> > your free account today
> >
>
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail:
> users-help@tapestry.apache.org
> >
> >
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
> http://blog.opencomponentry.com
> 


Home page : http://uk.geocities.com/matmsh/


	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

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


Re: Tap 4.1.2 PageNotFoundException not caught

Posted by Jesse Kuhnert <jk...@gmail.com>.
Damn those commons-pool developers for making me catch their checked
exception.......And not even a specific type at that...Oh no...just
java.lang.Exception.  fuc%4%-ers...

I should probably try some strategy to re-throw the original exception if
it's within the org.apache.tapestry package.

If someone logs a jira issue I won't forget about it.

On 6/28/07, Shing Hing Man <ma...@yahoo.com> wrote:
>
>
> After updating to the latest Tap 4.1.2, a
> PageNotFoundException is no longer
> caught in the following piece of code in my border
> component.
>
> public boolean isShowHelpLink() {
>                 boolean show = true;
>                 IPage currentPage = getPage();
>                 String helpPageName = currentPage.getPageName() +
> "Help";
>                 try {
>                         IRequestCycle  requestCycle =
> getPage().getRequestCycle();
>                         requestCycle.getPage(helpPageName); // Exception
> here is not caught
>                 } catch (PageNotFoundException pnfe) {
>                         show = false;
>                 }
>
>                 return show;
>         }
>
> Instead, the exception is shown on the exception page
> :
> org.apache.hivemind.ApplicationRuntimeException
> There was an error borrowing the page with key
> PageKey[_pageName='HomeHelp' , _locale=en_GB ] from
> the page pool.
>
> [ +/- ] Exception: Page 'HomeHelp' not found in
> application namespace.
> org.apache.tapestry.PageNotFoundException
> Page 'HomeHelp' not found in application namespace.
> pageName:       HomeHelp
> Stack Trace:
>
>     *
> org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve(
> PageSpecificationResolverImpl.java:147)
>     *
>
> $PageSpecificationResolver_113742bd0e2.resolve($PageSpecificationResolver_113742bd0e2.java)
>     *
>
> $PageSpecificationResolver_113742bd0e3.resolve($PageSpecificationResolver_113742bd0e3.java)
>     *
> org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:148)
>     *
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(
> GenericKeyedObjectPool.java:797)
>     *
> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177)
>     *
> $IPageSource_113742bd03e.getPage($IPageSource_113742bd03e.java)
>     *
> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239)
>     *
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226)
>     *
> $IRequestCycle_113742bd14e.getPage($IRequestCycle_113742bd14e.java)
>     *
> $IRequestCycle_113742bd068.getPage($IRequestCycle_113742bd068.java)
>     *
> net.sf.financial.components.Border.isShowHelpLink(Border.java:103)
>     *
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>
>
>
> Is the above the expected behaviour ?
>
> Shing
>
> Home page : http://uk.geocities.com/matmsh/
>
>
>       ___________________________________________________________
> Yahoo! Mail is the world's favourite email. Don't settle for less, sign up
> for
> your free account today
> http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com