You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joan Harrison <sr...@yahoo.co.uk> on 2003/10/03 12:26:01 UTC

Error!! - Help

Hi,
   I am experiencing a strange error. I am not able to
figure out why this error is comming. the first page(
Login) I developed with Tapestry and I am getting this
error. Please help!!!!!!

Error reported by Tapestry is:
------
org.apache.tapestry.ApplicationRuntimeException:
Method 'public abstract java.lang.String
com.ar.presentation.root.Home.getUsername()' (declared
in class com.ar.presentation.root.Home) has no
implementation in class com.ar.presentation.root.Home
(or enhanced subclass
com.ar.presentation.root.Home$Enhance_0).
----

My Home.page and Home.java looks are as follows:

------- com.ar.presentation.root.Home.page --------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
    "-//Apache Software Foundation//Tapestry
Specification 3.0//EN"
   
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<page-specification
class="com.ar.presentation.root.Home">

    <property-specification name="loginError"
type="boolean"/>
    <property-specification name="callback"
type="org.apache.tapestry.callback.ICallback"
persistent="yes"/>

    <bean name="loginValidator"
class="org.apache.tapestry.valid.StringValidator">
        <set-property name="required"
expression="true"/>
      <set-property name="clientScriptingEnabled"
expression="false"/>
    </bean>

    <component id="inputUserName" type="ValidField">
      <binding name="value" expression="username"/>
      <binding name="validator"
expression="beans.loginValidator"/>
      <static-binding name="displayName" value="User
ID"/>
    </component>

    <component id="inputPassword" type="ValidField">
      <binding name="value" expression="password"/>
      <binding name="validator"
expression="beans.loginValidator"/>
      <binding name="hidden" expression="true"/>
      <static-binding name="displayName"
value="Password"/>
    </component>

</page-specification>

--------



-------- com.ar.presentation.root.Home.java ---------

public abstract class Home extends BasePage implements
PageRenderListener {
   

    public void loginForm(IRequestCycle cycle) {
        IValidationDelegate delegate =
getValidationDelegate();
        AREngine engine = (AREngine) getEngine();

        if (delegate.getHasErrors())
            return;

        MaUsers userInfo =
ActionLogin.validateUser(getUsername(),
getPassword());

        if (userInfo == null) {
            setLoginError(true);
            return;
        }

        Visit visit = (Visit) getVisit();
        visit.setUser(userInfo);

        // After logging in, go to the ARHome page,
unless otherwise specified.

        ICallback callback = getCallback();

        if (callback == null)
            cycle.activate("ARHome");
        else
            callback.performCallback(cycle);

        engine.forgetPage(getPageName());

    }

    public abstract String getUsername();

    public abstract String getPassword();

    public abstract boolean isLoginError();

    public abstract void setLoginError(boolean value);

    public abstract void setCallback(ICallback value);

    public abstract ICallback getCallback();

    protected IValidationDelegate
getValidationDelegate() {
        return (IValidationDelegate)
getBeans().getBean("delegate");
    }


}
---------------------------------

Can some one help me please,please. I am struck here
and not able to proceed further!!!.

Regards
JH




________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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


Re: Error!! - Help

Posted by Joan Harrison <sr...@yahoo.co.uk>.
Hi Max,
   Thanks for your quick reply. But still no luck.
now my new Home.java looks like

------ Home.java ------

public abstract class Home extends BasePage implements
PageRenderListener {

    public void loginForm(IRequestCycle cycle) {
        IValidationDelegate delegate =
getValidationDelegate();
        AREngine engine = (AREngine) getEngine();

        if (delegate.getHasErrors())
            return;

        MaUsers userInfo =
ActionLogin.validateUser(getUsername(),
getPassword());

        if (userInfo == null) {
            setLoginError(true);
            return;
        }

        Visit visit = (Visit) getVisit();
        visit.setUser(userInfo);

        // After logging in, go to the ARHome page,
unless otherwise specified.

        ICallback callback = getCallback();

        if (callback == null)
            cycle.activate("ARHome");
        else
            callback.performCallback(cycle);

        engine.forgetPage(getPageName());

    }


    public abstract String getUsername();
    public abstract void setUsername(String value);


    public abstract String getPassword();
    public abstract void setPassword(String value);

    public abstract boolean isLoginError();

    public abstract void setLoginError(boolean value);


    public abstract ICallback getCallback();

    public abstract void setCallback(ICallback value);


    protected IValidationDelegate
getValidationDelegate() {
        return (IValidationDelegate)
getBeans().getBean("delegate");
    }

-------------------------

Any idea!!!. I cleared all the cache from Tomcat
re-compiled every thing and started still the same
error!  
Please


Regards
Joan.

 --- Max Grigoriev <da...@mail.ru> wrote: > Hello
Joan,
> 
> You have to declare setXXX methods.
> setUsername and etc.
> 
> Friday, October 3, 2003, 2:26:01 PM, you wrote:
> 
> JH> Hi,
> JH>    I am experiencing a strange error. I am not
> able to
> JH> figure out why this error is comming. the first
> page(
> JH> Login) I developed with Tapestry and I am
> getting this
> JH> error. Please help!!!!!!
> 
> JH> Error reported by Tapestry is:
> JH> ------
> JH> org.apache.tapestry.ApplicationRuntimeException:
> JH> Method 'public abstract java.lang.String
> JH> com.ar.presentation.root.Home.getUsername()'
> (declared
> JH> in class com.ar.presentation.root.Home) has no
> JH> implementation in class
> com.ar.presentation.root.Home
> JH> (or enhanced subclass
> JH> com.ar.presentation.root.Home$Enhance_0).
> JH> ----
> 
> JH> My Home.page and Home.java looks are as follows:
> 
> JH> ------- com.ar.presentation.root.Home.page
> --------
> 
> JH> <?xml version="1.0" encoding="UTF-8"?>
> JH> <!DOCTYPE page-specification PUBLIC
> JH>     "-//Apache Software Foundation//Tapestry
> JH> Specification 3.0//EN"
>    
> JH>
>
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
> 
> JH> <page-specification
> JH> class="com.ar.presentation.root.Home">
> 
> JH>     <property-specification name="loginError"
> type="boolean"/>>
> JH>     <property-specification name="callback"
> JH> type="org.apache.tapestry.callback.ICallback"
> persistent="yes"/>>
> 
> JH>     <bean name="loginValidator"
> JH>
> class="org.apache.tapestry.valid.StringValidator">
> JH>         <set-property name="required"
> expression="true"/>>
> JH>       <set-property
> name="clientScriptingEnabled"
> expression="false"/>>
> JH>     </bean>
> 
> JH>     <component id="inputUserName"
> type="ValidField">
> JH>       <binding name="value"
> expression="username"/>
> JH>       <binding name="validator"
> JH> expression="beans.loginValidator"/>
> JH>       <static-binding name="displayName"
> value="User
> ID"/>>
> JH>     </component>
> 
> JH>     <component id="inputPassword"
> type="ValidField">
> JH>       <binding name="value"
> expression="password"/>
> JH>       <binding name="validator"
> JH> expression="beans.loginValidator"/>
> JH>       <binding name="hidden" expression="true"/>
> JH>       <static-binding name="displayName"
> value="Password"/>>
> JH>     </component>
> 
> JH> </page-specification>
> 
> JH> --------
> 
> 
> 
> JH> -------- com.ar.presentation.root.Home.java
> ---------
> 
> JH> public abstract class Home extends BasePage
> implements
> JH> PageRenderListener {
>    
> 
> JH>     public void loginForm(IRequestCycle cycle) {
> JH>         IValidationDelegate delegate =
> JH> getValidationDelegate();
> JH>         AREngine engine = (AREngine)
> getEngine();
> 
> JH>         if (delegate.getHasErrors())
> JH>             return;
> 
> JH>         MaUsers userInfo =
> JH> ActionLogin.validateUser(getUsername(),
> JH> getPassword());
> 
> JH>         if (userInfo == null) {
> JH>             setLoginError(true);
> JH>             return;
> JH>         }
> 
> JH>         Visit visit = (Visit) getVisit();
> JH>         visit.setUser(userInfo);
> 
> JH>         // After logging in, go to the ARHome
> page,
> JH> unless otherwise specified.
> 
> JH>         ICallback callback = getCallback();
> 
> JH>         if (callback == null)
> JH>             cycle.activate("ARHome");
> JH>         else
> JH>             callback.performCallback(cycle);
> 
> JH>         engine.forgetPage(getPageName());
> 
> JH>     }
> 
> JH>     public abstract String getUsername();
> 
> JH>     public abstract String getPassword();
> 
> JH>     public abstract boolean isLoginError();
> 
> JH>     public abstract void setLoginError(boolean
> value);
> 
> JH>     public abstract void setCallback(ICallback
> value);
> 
> JH>     public abstract ICallback getCallback();
> 
> JH>     protected IValidationDelegate
> JH> getValidationDelegate() {
> JH>         return (IValidationDelegate)
> JH> getBeans().getBean("delegate");
> JH>     }
> 
> 
> JH> }
> JH> ---------------------------------
> 
> JH> Can some one help me please,please. I am struck
> here
> JH> and not able to proceed further!!!.
> 
> JH> Regards
> JH> JH
> 
> 
> 
> 
> JH>
>
________________________________________________________________________
> JH> Want to chat instantly with your online friends?
>  Get the FREE Yahoo!
> JH> Messenger http://mail.messenger.yahoo.co.uk
> 
> JH>
>
---------------------------------------------------------------------
> JH> To unsubscribe, e-mail:
> JH> tapestry-user-unsubscribe@jakarta.apache.org
> JH> For additional commands, e-mail:
> JH> tapestry-user-help@jakarta.apache.org
> 
> 
> 
> 
> -- 
> Best regards,
>  Max                           
> mailto:darkit@mail.ru
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>  

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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


Re: Error!! - Help

Posted by Max Grigoriev <da...@mail.ru>.
Hello Joan,

You have to declare setXXX methods.
setUsername and etc.

Friday, October 3, 2003, 2:26:01 PM, you wrote:

JH> Hi,
JH>    I am experiencing a strange error. I am not able to
JH> figure out why this error is comming. the first page(
JH> Login) I developed with Tapestry and I am getting this
JH> error. Please help!!!!!!

JH> Error reported by Tapestry is:
JH> ------
JH> org.apache.tapestry.ApplicationRuntimeException:
JH> Method 'public abstract java.lang.String
JH> com.ar.presentation.root.Home.getUsername()' (declared
JH> in class com.ar.presentation.root.Home) has no
JH> implementation in class com.ar.presentation.root.Home
JH> (or enhanced subclass
JH> com.ar.presentation.root.Home$Enhance_0).
JH> ----

JH> My Home.page and Home.java looks are as follows:

JH> ------- com.ar.presentation.root.Home.page --------

JH> <?xml version="1.0" encoding="UTF-8"?>
JH> <!DOCTYPE page-specification PUBLIC
JH>     "-//Apache Software Foundation//Tapestry
JH> Specification 3.0//EN"
   
JH> "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

JH> <page-specification
JH> class="com.ar.presentation.root.Home">

JH>     <property-specification name="loginError"
type="boolean"/>>
JH>     <property-specification name="callback"
JH> type="org.apache.tapestry.callback.ICallback"
persistent="yes"/>>

JH>     <bean name="loginValidator"
JH> class="org.apache.tapestry.valid.StringValidator">
JH>         <set-property name="required"
expression="true"/>>
JH>       <set-property name="clientScriptingEnabled"
expression="false"/>>
JH>     </bean>

JH>     <component id="inputUserName" type="ValidField">
JH>       <binding name="value" expression="username"/>
JH>       <binding name="validator"
JH> expression="beans.loginValidator"/>
JH>       <static-binding name="displayName" value="User
ID"/>>
JH>     </component>

JH>     <component id="inputPassword" type="ValidField">
JH>       <binding name="value" expression="password"/>
JH>       <binding name="validator"
JH> expression="beans.loginValidator"/>
JH>       <binding name="hidden" expression="true"/>
JH>       <static-binding name="displayName"
value="Password"/>>
JH>     </component>

JH> </page-specification>

JH> --------



JH> -------- com.ar.presentation.root.Home.java ---------

JH> public abstract class Home extends BasePage implements
JH> PageRenderListener {
   

JH>     public void loginForm(IRequestCycle cycle) {
JH>         IValidationDelegate delegate =
JH> getValidationDelegate();
JH>         AREngine engine = (AREngine) getEngine();

JH>         if (delegate.getHasErrors())
JH>             return;

JH>         MaUsers userInfo =
JH> ActionLogin.validateUser(getUsername(),
JH> getPassword());

JH>         if (userInfo == null) {
JH>             setLoginError(true);
JH>             return;
JH>         }

JH>         Visit visit = (Visit) getVisit();
JH>         visit.setUser(userInfo);

JH>         // After logging in, go to the ARHome page,
JH> unless otherwise specified.

JH>         ICallback callback = getCallback();

JH>         if (callback == null)
JH>             cycle.activate("ARHome");
JH>         else
JH>             callback.performCallback(cycle);

JH>         engine.forgetPage(getPageName());

JH>     }

JH>     public abstract String getUsername();

JH>     public abstract String getPassword();

JH>     public abstract boolean isLoginError();

JH>     public abstract void setLoginError(boolean value);

JH>     public abstract void setCallback(ICallback value);

JH>     public abstract ICallback getCallback();

JH>     protected IValidationDelegate
JH> getValidationDelegate() {
JH>         return (IValidationDelegate)
JH> getBeans().getBean("delegate");
JH>     }


JH> }
JH> ---------------------------------

JH> Can some one help me please,please. I am struck here
JH> and not able to proceed further!!!.

JH> Regards
JH> JH




JH> ________________________________________________________________________
JH> Want to chat instantly with your online friends?  Get the FREE Yahoo!
JH> Messenger http://mail.messenger.yahoo.co.uk

JH> ---------------------------------------------------------------------
JH> To unsubscribe, e-mail:
JH> tapestry-user-unsubscribe@jakarta.apache.org
JH> For additional commands, e-mail:
JH> tapestry-user-help@jakarta.apache.org




-- 
Best regards,
 Max                            mailto:darkit@mail.ru


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


RE: Error!! - Help

Posted by Joan Harrison <sr...@yahoo.co.uk>.
Mr. Mind Bridge,
   Thanks for your tips. That worked.

regards
JH 

--- Mind Bridge <mi...@yahoo.com> wrote: > Hi
John,
> 
> The error gives some clue as to what the problem is:
> 
> Method 'public abstract java.lang.String
> com.ar.presentation.root.Home.getUsername()'
> (declared
> in class com.ar.presentation.root.Home) has no
> implementation in class
> com.ar.presentation.root.Home
> (or enhanced subclass
> com.ar.presentation.root.Home$Enhance_0).
> 
> In other words, you have an abstract method
> getUsername(), but Tapestry is
> not adding its implementation.
> 
> The reason it is not adding it is that "username" is
> not defined as a
> property in the .page file using
> <property-specification> in the way that
> you have defined 'loginError' and 'callback', for
> example.
> 
> Define username using <property-specification> in
> the .page file and you
> should be all set.
> 
> Best regards,
> -mb
> 

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

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


RE: Error!! - Help

Posted by Mind Bridge <mi...@yahoo.com>.
Hi John,

The error gives some clue as to what the problem is:

Method 'public abstract java.lang.String
com.ar.presentation.root.Home.getUsername()' (declared
in class com.ar.presentation.root.Home) has no
implementation in class com.ar.presentation.root.Home
(or enhanced subclass
com.ar.presentation.root.Home$Enhance_0).

In other words, you have an abstract method getUsername(), but Tapestry is
not adding its implementation.

The reason it is not adding it is that "username" is not defined as a
property in the .page file using <property-specification> in the way that
you have defined 'loginError' and 'callback', for example.

Define username using <property-specification> in the .page file and you
should be all set.

Best regards,
-mb

-----Original Message-----
From: Joan Harrison [mailto:srcfrguser@yahoo.co.uk]
Sent: Friday, October 03, 2003 1:26 PM
To: tapestry-user@jakarta.apache.org
Subject: Error!! - Help


Hi,
   I am experiencing a strange error. I am not able to
figure out why this error is comming. the first page(
Login) I developed with Tapestry and I am getting this
error. Please help!!!!!!

Error reported by Tapestry is:
------
org.apache.tapestry.ApplicationRuntimeException:
Method 'public abstract java.lang.String
com.ar.presentation.root.Home.getUsername()' (declared
in class com.ar.presentation.root.Home) has no
implementation in class com.ar.presentation.root.Home
(or enhanced subclass
com.ar.presentation.root.Home$Enhance_0).
----

My Home.page and Home.java looks are as follows:

------- com.ar.presentation.root.Home.page --------

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
    "-//Apache Software Foundation//Tapestry
Specification 3.0//EN"

"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<page-specification
class="com.ar.presentation.root.Home">

    <property-specification name="loginError"
type="boolean"/>
    <property-specification name="callback"
type="org.apache.tapestry.callback.ICallback"
persistent="yes"/>

    <bean name="loginValidator"
class="org.apache.tapestry.valid.StringValidator">
        <set-property name="required"
expression="true"/>
      <set-property name="clientScriptingEnabled"
expression="false"/>
    </bean>

    <component id="inputUserName" type="ValidField">
      <binding name="value" expression="username"/>
      <binding name="validator"
expression="beans.loginValidator"/>
      <static-binding name="displayName" value="User
ID"/>
    </component>

    <component id="inputPassword" type="ValidField">
      <binding name="value" expression="password"/>
      <binding name="validator"
expression="beans.loginValidator"/>
      <binding name="hidden" expression="true"/>
      <static-binding name="displayName"
value="Password"/>
    </component>

</page-specification>

--------



-------- com.ar.presentation.root.Home.java ---------

public abstract class Home extends BasePage implements
PageRenderListener {


    public void loginForm(IRequestCycle cycle) {
        IValidationDelegate delegate =
getValidationDelegate();
        AREngine engine = (AREngine) getEngine();

        if (delegate.getHasErrors())
            return;

        MaUsers userInfo =
ActionLogin.validateUser(getUsername(),
getPassword());

        if (userInfo == null) {
            setLoginError(true);
            return;
        }

        Visit visit = (Visit) getVisit();
        visit.setUser(userInfo);

        // After logging in, go to the ARHome page,
unless otherwise specified.

        ICallback callback = getCallback();

        if (callback == null)
            cycle.activate("ARHome");
        else
            callback.performCallback(cycle);

        engine.forgetPage(getPageName());

    }

    public abstract String getUsername();

    public abstract String getPassword();

    public abstract boolean isLoginError();

    public abstract void setLoginError(boolean value);

    public abstract void setCallback(ICallback value);

    public abstract ICallback getCallback();

    protected IValidationDelegate
getValidationDelegate() {
        return (IValidationDelegate)
getBeans().getBean("delegate");
    }


}
---------------------------------

Can some one help me please,please. I am struck here
and not able to proceed further!!!.

Regards
JH




________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

---------------------------------------------------------------------
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