You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Longman <gl...@intelligentworks.com> on 2004/01/16 17:31:58 UTC
[Solved] instantiation exception loading page
I figured it out.
forgot to put a <property-specification> tag in Page2.
What is still strange is that if I had neglected to put the
<property-specification> in Page1, Tapestry complains at the time it
enhances that there are unimplemented abstract methods. But once the class
is already enhanced and another page (Page 2 in this case) is missing the
<property-specification> you get the instantiation exception.
That said, one would expect that whichever page was loaded first would get
the nice error and the one loaded second would get the instantiation
exception. But this isn't the case. Page2 (missing <property-specification>)
get the instantiation exception always, regardless of whether its loaded
first or not.
Geoff
----- Original Message -----
From: "Geoff Longman" <gl...@intelligentworks.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, January 16, 2004 2:39 AM
Subject: [Q] instantiation exception loading page
> Hey,
>
> I have two pages that share the page class. One page works and the other
> tanks with a java.lang.InstantiationException (stack trace appended) when
> the PageLoader tries to instantiate it. I'm doing this somewhere else
> without incident.
>
> Page1.page -> BaseEditPage
> Page2.page ->BaseEditPage
>
> Page 1 work but Page 2 tanks on instantiation.
>
> Its weird, the class is abstract and it is being enhanced, but I didn't
> override the default constructor.
>
> Actually, I just tried this:
>
> Page1.page -> BaseEditPage
> Page2.page -> AnotherPageClass extends BaseEditPage
>
> and I got the same error on Page 2 (Page 1 still works fine)
>
> Any ideas? Or suggestions for more info I can provide?
>
> Geoff
>
> Geoffrey Longman
> Intelligent Works Inc.
>
> Tap 3.0beta3 - Win2k - JDK 1.4.1 - Running in Jetty 4.2.8
> Stack Trace:
> a..
>
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Instan
> tiationExceptionConstructorAccessorImpl.java:30)
> b..
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> c.. java.lang.Class.newInstance0(Class.java:306)
> d.. java.lang.Class.newInstance(Class.java:259)
> e..
>
org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:740)
> f..
> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:802)
> g..
> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194)
> h..
> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
> i..
>
orca.pages.features.FeatureTypeSelectionPage.formSubmitted(FeatureTypeSelect
> ionPage.java:166)
> j.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> k..
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> l..
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>
> etc...
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: [Solved] instantiation exception loading page
Posted by Harish Krishnaswamy <hk...@comcast.net>.
That's really an interesting case, should it probably be considered a bug?
-Harish
Geoff Longman wrote:
> I figured it out.
>
> forgot to put a <property-specification> tag in Page2.
>
> What is still strange is that if I had neglected to put the
> <property-specification> in Page1, Tapestry complains at the time it
> enhances that there are unimplemented abstract methods. But once the class
> is already enhanced and another page (Page 2 in this case) is missing the
> <property-specification> you get the instantiation exception.
>
> That said, one would expect that whichever page was loaded first would get
> the nice error and the one loaded second would get the instantiation
> exception. But this isn't the case. Page2 (missing <property-specification>)
> get the instantiation exception always, regardless of whether its loaded
> first or not.
>
> Geoff
> ----- Original Message -----
> From: "Geoff Longman" <gl...@intelligentworks.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, January 16, 2004 2:39 AM
> Subject: [Q] instantiation exception loading page
>
>
>
>>Hey,
>>
>>I have two pages that share the page class. One page works and the other
>>tanks with a java.lang.InstantiationException (stack trace appended) when
>>the PageLoader tries to instantiate it. I'm doing this somewhere else
>>without incident.
>>
>>Page1.page -> BaseEditPage
>>Page2.page ->BaseEditPage
>>
>>Page 1 work but Page 2 tanks on instantiation.
>>
>>Its weird, the class is abstract and it is being enhanced, but I didn't
>>override the default constructor.
>>
>>Actually, I just tried this:
>>
>>Page1.page -> BaseEditPage
>>Page2.page -> AnotherPageClass extends BaseEditPage
>>
>>and I got the same error on Page 2 (Page 1 still works fine)
>>
>>Any ideas? Or suggestions for more info I can provide?
>>
>>Geoff
>>
>>Geoffrey Longman
>>Intelligent Works Inc.
>>
>>Tap 3.0beta3 - Win2k - JDK 1.4.1 - Running in Jetty 4.2.8
>> Stack Trace:
>> a..
>>
>
> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Instan
>
>>tiationExceptionConstructorAccessorImpl.java:30)
>> b..
>
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>
>> c.. java.lang.Class.newInstance0(Class.java:306)
>> d.. java.lang.Class.newInstance(Class.java:259)
>> e..
>>
>
> org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:740)
>
>> f..
>>org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:802)
>> g..
>>org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194)
>> h..
>>org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
>> i..
>>
>
> orca.pages.features.FeatureTypeSelectionPage.formSubmitted(FeatureTypeSelect
>
>>ionPage.java:166)
>> j.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> k..
>>
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
>
>>)
>> l..
>>
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>
>>.java:25)
>>
>>etc...
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org