Ok I found the problem and it was not my code but the packages!!
Services and modules have to be in papo.services, if I declared in web.xml
tapestry.app-package with papo.

But I was able to declare my builder in AppModule but I still doesn't
achieve to create my own module, in the same package, whatever I create a
builder or use the binder or declare the module in the manifest...

When I copied the builder or binder from my module to AppModule, it works.

package papo.services;

public final class UserModule {
 public UserService buildUserService() {
   return new UserServiceImpl();
 }
}



2007/5/30, Blackwings <[EMAIL PROTECTED]>:
The only error I have is :

#  java.lang.ClassNotFoundException
caught an exception while obtaining a class file for papo.pages.Start

exception
    java.lang.RuntimeException: Error obtaining injected value for
field papo.pages.Start._userService: No service implements the
interface papo.ioc.services.UserService.

I tried to happen in AppModule the following lines and discard the
UserModule class :

public static void bind(ServiceBinder binder) {
     binder.bind(UserService.class, UserServiceImpl.class);
}

to use the autobuilding services, but I still have the same error.

What about package names? In my web.xml I declared :
        <context-param>
                <!-- The only significant configuration for Tapestry 5,
this informs Tapestry
                        of where to look for pages, components and mixins.
-->
                <param-name>tapestry.app-package</param-name>
                <param-value>papo</param-value>
        </context-param>

but maybe I have to put my services/modules classes in a specific
package rather than my papo.ioc.services ?



2007/5/30, Davor Hrg <[EMAIL PROTECTED]>:
> I tried @Inject Session session; but it didn't work.
> ....
>
> you probably have an error in log from tapestry demanding for the field
to
> be private...
>
> try:
> @Inject private Session session;
>
> Davor Hrg
>
> On 5/30/07, Joshua Jackson <[EMAIL PROTECTED]> wrote:
> >
> > I found that the @Service annotation is not available anymore in
> > tapestry-core-5.0.4
> >
> > So how do I inject a service that was created by the AppModule into my
web
> > Page/Component ?
> >
> > Let's say the Session service created by the tapestry-hibernate
module.
> >
> > I tried @Inject Session session; but it didn't work.
> >
> > Have I missed on something?
> >
> >
> > Thanks in advance.
> >
> > On 5/30/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> > > You don't need the MANIFEST.MF.
> > >
> > > You do need to name your module correctly, it should be
AppModule.  The
> > > documention is *very clear* on the naming for that.
> > >
> > > Also, you should consider letting Tapestry IoC inject the Log (
> > > org.apache.commons.logging.Log) for your service; cleans up a lot of
> > code
> > > that way.
> > >
> > > This will be
> >
> > --
> > YM!: thejavafreak
> > Blog: http://www.nagasakti.or.id/roller/joshua/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


--
Michael Bernagou
Java Developper



--
Michael Bernagou
Java Developper

Reply via email to