You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Muhammad Mohsen <m....@gmail.com> on 2010/10/04 23:29:26 UTC

[T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Hi All,

I'm trying to use a service but it's not working out with me. I can't see my
mistake !
I doubted that I didn't include the basic tapestry jar files so i left no
doubt and included almost every jar just thought that it's essential.
In the stack trace, i see repeated lines, so i thought this might be the
recursive initialization the documentation warned about, but i couldn't see
i did that mistake.

I'm running this locally by that way so I included this class

*public class AppEngineDevAgent {
>
> public AppEngineDevAgent() { }
>
> public static void premain(java.lang.String agentArgs,
> java.lang.instrument.Instrumentation inst) { }
>
> public static java.lang.Object getAgent() { return null; }
>
> private static java.net.URL findAgentImplLib() { return null; }
>
> static interface AgentImplStruct {
>
> void run(java.lang.instrument.Instrumentation instrumentation);
>
> java.lang.Object getInstance();
> }
>
> }*


That's my AppModule class.

> public static void
> contributeApplicationDefaults(MappedConfiguration<String, String> config) {

config.add(SymbolConstants.FILE_CHECK_INTERVAL, "10 m");

config.add(SymbolConstants.MIN_GZIP_SIZE, "300");

config.add(SymbolConstants.PRODUCTION_MODE, "false");

config.add(SymbolConstants.APPLICATION_VERSION, "0.1");

config.add(IOCSymbols.THREAD_POOL_ENABLED, "false");

}



> public static void bind(ServiceBinder binder) {

binder.bind(UserDAO.class, UserDAOImpl.class);

binder.bind(PasswordEncryptor.class, StrongPasswordEncryptor.class);

}


Here is where i try to use the service (As you see it's a page):

package org.tapestrytest.pages;


> import org.apache.tapestry5.annotations.PageLoaded;

import org.apache.tapestry5.annotations.SessionState;

import org.apache.tapestry5.ioc.annotations.Inject;

import org.tapestrytest.dao.UserDAO;

import org.tapestrytest.entities.User;

import org.jasypt.util.password.PasswordEncryptor;


> public class Start {

@SessionState(create = false)

@SuppressWarnings("unused")

private User user;


> @Inject

private PasswordEncryptor passwordEncryptor;


> @PageLoaded

public void init() {

System.out.println(passwordEncryptor);

System.out.println(passwordEncryptor.encryptPassword("a"));

System.out.println(passwordEncryptor.encryptPassword("a"));

user = new User(UserDAO.CLEARANCE_ANONYMOUS);

}

}


When this point is reached, I get:
Exception constructing service 'PasswordEncryptor': Error invoking
constructor org.jasypt.util.password.StrongPasswordEncryptor() (at
StrongPasswordEncryptor.java:67) via
org.digieg.jarmy.services.AppModule.bind(ServiceBinder) (at
AppModule.java:25) (for service 'PasswordEncryptor'):
org/apache/commons/lang/exception/NestableRuntimeException

Your help is highly appreciated :)
Please find attached some info that my assist you find out what did i do
wrong !

One final request, would you please tell what basic jars do tapestry need to
operate well ?
Is this mentioned in the documentation somewhere ?

Thanks in advance for your time :)


-- 
Muhammad Mohsen Hussien
Jr. Java Software Engineer

Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Dmitry Gusev <dm...@gmail.com>.
On Tue, Oct 5, 2010 at 16:41, Muhammad Mohsen <m....@gmail.com> wrote:

> Thanks a lot. I think Haward is correct but I can't confirm as I have no
> access to that code at the moment. I'll make sure to get back to you about
> that :)
> It's the "*commons-lang-2.1.jar*" that is mussing from the class path. I
> thought that this is the exception thrown. Not that its not actually a
> ClassNotFoundException. It's just because it's called "NestableRuntime*
> Exception*" I thought that this is the exception !
>
> Which brings one more thing. What are the basic jars needed for tapestry to
> operate ?
>

I believe this ones:

<dependency>
<groupId>org.apache.tapestry</groupId>
 <artifactId>tapestry-ioc</artifactId>
<version>5.2.0</version>
 </dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
 <artifactId>tapestry5-annotations</artifactId>
<version>5.2.0</version>
 </dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
 <artifactId>tapestry-core</artifactId>
<version>5.2.0</version>
 </dependency>


> And another question please (but this may change the scope of this thread
> i'm afraid) why doesn't eclipse copy all included libraries in my project's
> class path to my lib folder *web-inf\lib* automatically !?
>
>
Because Eclipse is not a packaging tool.

(best way) Try to use maven2 for this purpose.

(bad way) Or just create "web-inf\lib" folder in your project, put all your
jars there and setup project classpath to use these jars. Then you should
probably configure output of your source folders so that they compile
classes to "web-inf\classes", etc.



> Thanks again :)
>
> On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship <hl...@gmail.com>
> wrote:
>
> > You'll find more information in the console log, but from the little
> > bit you've shown me, it looks like your classpath is missing a
> > referenced library, the one that provided class
> > NestableRuntimeException.
> >
> > On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen <m....@gmail.com>
> > wrote:
> > > Thanks for the advice you are totally correct.
> > >
> > > But this error also occurs on jetty.
> > >
> > > I made a mistake putting GAE in the subject. The error actually happens
> > on
> > > both GAE and local jetty. I took my development locally to speed up the
> > > development process.
> > >
> > > Thank you for your time.
> > >
> > > On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
> > > thiagohp@gmail.com> wrote:
> > >
> > >> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <
> > m.gelbana@gmail.com>
> > >> wrote:
> > >>
> > >>  Hi All,
> > >>>
> > >>
> > >> Hi!
> > >>
> > >> I strongly suggest you to try to make your application work on Jetty
> or
> > >> Tomcat first, specially if you're still learning Tapestry, and after
> > that
> > >> try the GAE, as it is a different environment.
> > >>
> > >> --
> > >> Thiago H. de Paula Figueiredo
> > >> Independent Java, Apache Tapestry 5 and Hibernate consultant,
> developer,
> > >> and instructor
> > >> Owner, Ars Machina Tecnologia da Informação Ltda.
> > >> http://www.arsmachina.com.br
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > Muhammad Mohsen Hussien
> > > Jr. Java Software Engineer
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator of Apache Tapestry
> >
> > The source for Tapestry training, mentoring and support. Contact me to
> > learn how I can get you up and productive in Tapestry fast!
> >
> > (971) 678-5210
> > http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Muhammad Mohsen Hussien
> Jr. Java Software Engineer
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Muhammad Mohsen <m....@gmail.com>.
Back home 15 minutes ago, couldn't wait to try this and you are correct
Howard.
A jar I'm using needs commons-lang to operate.

Thank you all for your time..and pardon me for such a silly mistake :)

On Tue, Oct 5, 2010 at 4:55 PM, Howard Lewis Ship <hl...@gmail.com> wrote:

> Tapestry doesn't use commons-lang, but some code in your application
> apparently does.
>
> On Tue, Oct 5, 2010 at 5:41 AM, Muhammad Mohsen <m....@gmail.com>
> wrote:
> > Thanks a lot. I think Haward is correct but I can't confirm as I have no
> > access to that code at the moment. I'll make sure to get back to you
> about
> > that :)
> > It's the "*commons-lang-2.1.jar*" that is mussing from the class path. I
> > thought that this is the exception thrown. Not that its not actually a
> > ClassNotFoundException. It's just because it's called "NestableRuntime*
> > Exception*" I thought that this is the exception !
> >
> > Which brings one more thing. What are the basic jars needed for tapestry
> to
> > operate ?
> > And another question please (but this may change the scope of this thread
> > i'm afraid) why doesn't eclipse copy all included libraries in my
> project's
> > class path to my lib folder *web-inf\lib* automatically !?
> >
> > Thanks again :)
> >
> > On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship <hl...@gmail.com>
> wrote:
> >
> >> You'll find more information in the console log, but from the little
> >> bit you've shown me, it looks like your classpath is missing a
> >> referenced library, the one that provided class
> >> NestableRuntimeException.
> >>
> >> On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen <m....@gmail.com>
> >> wrote:
> >> > Thanks for the advice you are totally correct.
> >> >
> >> > But this error also occurs on jetty.
> >> >
> >> > I made a mistake putting GAE in the subject. The error actually
> happens
> >> on
> >> > both GAE and local jetty. I took my development locally to speed up
> the
> >> > development process.
> >> >
> >> > Thank you for your time.
> >> >
> >> > On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
> >> > thiagohp@gmail.com> wrote:
> >> >
> >> >> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <
> >> m.gelbana@gmail.com>
> >> >> wrote:
> >> >>
> >> >>  Hi All,
> >> >>>
> >> >>
> >> >> Hi!
> >> >>
> >> >> I strongly suggest you to try to make your application work on Jetty
> or
> >> >> Tomcat first, specially if you're still learning Tapestry, and after
> >> that
> >> >> try the GAE, as it is a different environment.
> >> >>
> >> >> --
> >> >> Thiago H. de Paula Figueiredo
> >> >> Independent Java, Apache Tapestry 5 and Hibernate consultant,
> developer,
> >> >> and instructor
> >> >> Owner, Ars Machina Tecnologia da Informação Ltda.
> >> >> http://www.arsmachina.com.br
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Muhammad Mohsen Hussien
> >> > Jr. Java Software Engineer
> >> >
> >>
> >>
> >>
> >> --
> >> Howard M. Lewis Ship
> >>
> >> Creator of Apache Tapestry
> >>
> >> The source for Tapestry training, mentoring and support. Contact me to
> >> learn how I can get you up and productive in Tapestry fast!
> >>
> >> (971) 678-5210
> >> http://howardlewisship.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Muhammad Mohsen Hussien
> > Jr. Java Software Engineer
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Muhammad Mohsen Hussien
Jr. Java Software Engineer

Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Howard Lewis Ship <hl...@gmail.com>.
Tapestry doesn't use commons-lang, but some code in your application
apparently does.

On Tue, Oct 5, 2010 at 5:41 AM, Muhammad Mohsen <m....@gmail.com> wrote:
> Thanks a lot. I think Haward is correct but I can't confirm as I have no
> access to that code at the moment. I'll make sure to get back to you about
> that :)
> It's the "*commons-lang-2.1.jar*" that is mussing from the class path. I
> thought that this is the exception thrown. Not that its not actually a
> ClassNotFoundException. It's just because it's called "NestableRuntime*
> Exception*" I thought that this is the exception !
>
> Which brings one more thing. What are the basic jars needed for tapestry to
> operate ?
> And another question please (but this may change the scope of this thread
> i'm afraid) why doesn't eclipse copy all included libraries in my project's
> class path to my lib folder *web-inf\lib* automatically !?
>
> Thanks again :)
>
> On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
>
>> You'll find more information in the console log, but from the little
>> bit you've shown me, it looks like your classpath is missing a
>> referenced library, the one that provided class
>> NestableRuntimeException.
>>
>> On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen <m....@gmail.com>
>> wrote:
>> > Thanks for the advice you are totally correct.
>> >
>> > But this error also occurs on jetty.
>> >
>> > I made a mistake putting GAE in the subject. The error actually happens
>> on
>> > both GAE and local jetty. I took my development locally to speed up the
>> > development process.
>> >
>> > Thank you for your time.
>> >
>> > On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
>> > thiagohp@gmail.com> wrote:
>> >
>> >> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <
>> m.gelbana@gmail.com>
>> >> wrote:
>> >>
>> >>  Hi All,
>> >>>
>> >>
>> >> Hi!
>> >>
>> >> I strongly suggest you to try to make your application work on Jetty or
>> >> Tomcat first, specially if you're still learning Tapestry, and after
>> that
>> >> try the GAE, as it is a different environment.
>> >>
>> >> --
>> >> Thiago H. de Paula Figueiredo
>> >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> >> and instructor
>> >> Owner, Ars Machina Tecnologia da Informação Ltda.
>> >> http://www.arsmachina.com.br
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Muhammad Mohsen Hussien
>> > Jr. Java Software Engineer
>> >
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>>
>> The source for Tapestry training, mentoring and support. Contact me to
>> learn how I can get you up and productive in Tapestry fast!
>>
>> (971) 678-5210
>> http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Muhammad Mohsen Hussien
> Jr. Java Software Engineer
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Muhammad Mohsen <m....@gmail.com>.
Thanks a lot. I think Haward is correct but I can't confirm as I have no
access to that code at the moment. I'll make sure to get back to you about
that :)
It's the "*commons-lang-2.1.jar*" that is mussing from the class path. I
thought that this is the exception thrown. Not that its not actually a
ClassNotFoundException. It's just because it's called "NestableRuntime*
Exception*" I thought that this is the exception !

Which brings one more thing. What are the basic jars needed for tapestry to
operate ?
And another question please (but this may change the scope of this thread
i'm afraid) why doesn't eclipse copy all included libraries in my project's
class path to my lib folder *web-inf\lib* automatically !?

Thanks again :)

On Tue, Oct 5, 2010 at 9:40 AM, Howard Lewis Ship <hl...@gmail.com> wrote:

> You'll find more information in the console log, but from the little
> bit you've shown me, it looks like your classpath is missing a
> referenced library, the one that provided class
> NestableRuntimeException.
>
> On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen <m....@gmail.com>
> wrote:
> > Thanks for the advice you are totally correct.
> >
> > But this error also occurs on jetty.
> >
> > I made a mistake putting GAE in the subject. The error actually happens
> on
> > both GAE and local jetty. I took my development locally to speed up the
> > development process.
> >
> > Thank you for your time.
> >
> > On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
> > thiagohp@gmail.com> wrote:
> >
> >> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <
> m.gelbana@gmail.com>
> >> wrote:
> >>
> >>  Hi All,
> >>>
> >>
> >> Hi!
> >>
> >> I strongly suggest you to try to make your application work on Jetty or
> >> Tomcat first, specially if you're still learning Tapestry, and after
> that
> >> try the GAE, as it is a different environment.
> >>
> >> --
> >> Thiago H. de Paula Figueiredo
> >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> >> and instructor
> >> Owner, Ars Machina Tecnologia da Informação Ltda.
> >> http://www.arsmachina.com.br
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Muhammad Mohsen Hussien
> > Jr. Java Software Engineer
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Muhammad Mohsen Hussien
Jr. Java Software Engineer

Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Howard Lewis Ship <hl...@gmail.com>.
You'll find more information in the console log, but from the little
bit you've shown me, it looks like your classpath is missing a
referenced library, the one that provided class
NestableRuntimeException.

On Tue, Oct 5, 2010 at 12:17 AM, Muhammad Mohsen <m....@gmail.com> wrote:
> Thanks for the advice you are totally correct.
>
> But this error also occurs on jetty.
>
> I made a mistake putting GAE in the subject. The error actually happens on
> both GAE and local jetty. I took my development locally to speed up the
> development process.
>
> Thank you for your time.
>
> On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
> thiagohp@gmail.com> wrote:
>
>> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <m....@gmail.com>
>> wrote:
>>
>>  Hi All,
>>>
>>
>> Hi!
>>
>> I strongly suggest you to try to make your application work on Jetty or
>> Tomcat first, specially if you're still learning Tapestry, and after that
>> try the GAE, as it is a different environment.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> --
> Muhammad Mohsen Hussien
> Jr. Java Software Engineer
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by Muhammad Mohsen <m....@gmail.com>.
Thanks for the advice you are totally correct.

But this error also occurs on jetty.

I made a mistake putting GAE in the subject. The error actually happens on
both GAE and local jetty. I took my development locally to speed up the
development process.

Thank you for your time.

On Tue, Oct 5, 2010 at 12:10 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <m....@gmail.com>
> wrote:
>
>  Hi All,
>>
>
> Hi!
>
> I strongly suggest you to try to make your application work on Jetty or
> Tomcat first, specially if you're still learning Tapestry, and after that
> try the GAE, as it is a different environment.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Muhammad Mohsen Hussien
Jr. Java Software Engineer

Re: [T5.2, Google Application Engine] Can't get a method to be realized (i.e. invoke a method)

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 04 Oct 2010 18:29:26 -0300, Muhammad Mohsen <m....@gmail.com>  
wrote:

> Hi All,

Hi!

I strongly suggest you to try to make your application work on Jetty or  
Tomcat first, specially if you're still learning Tapestry, and after that  
try the GAE, as it is a different environment.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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