Hi,

> have you tried explicitly setting the id?

No I didn't try explicitly setting the service id for I only have the
one service which I only define the once. (Will try it tonight
though!)

> So, there's no chance that you have a copy of the common module lib on
> the general classpath and in WEB-INF/lib?

Nope. It's a brand spanking new install of jetty 5.1.x fresh from the
.zip from the mortbay ftp site. All I've done is copied the .war into
the webapps dir and run start.jar. That's when the exception occurs
and the app never starts up.

I get the same message on fresh installs of Jetty 5.1.9, 5.1.5, 5.1.2
and even Jetty 6.1.6.

Steve.

On 05/12/2007, Chris Lewis <[EMAIL PROTECTED]> wrote:
> You say you've tried auto binding, but have you tried explicitly setting
> the id? Like so:
>
>   public static void bind(ServiceBinder binder)
>   {
>      binder.bind(AssetFinder.class,
> AssetFinderImpl.class).withId("AssetFinderWithExplicitId");
>   }
>
> Auto binding assigns the class name as the service id, which is logical.
> However if you have colliding names then you need to specify unique ids.
>
> The fact that you're seeing this problem in deployment but not
> production smells a bit off though. Does there happen to be two copies
> of your war lying around? It sounds like that builder method is being
> called more than once (very odd), or that another part of the app is
> contributing a service with the same name - but if that were the case
> you'd probably know it.
>
> Steve Eynon wrote:
> > Hello,
> >
> > I have a number of T5 web apps that all use a common component module.
> > In the component's module class (as defined by the
> > Tapestry-Module-Classes property in its jar's MANIFEST.MF) there is a
> > simlpe build method:
> >
> > public static AssetFinder buildAssetFinder(@InjectService AssetSource
> > assetSource) {
> >     return new AssetFinder(assetSource);
> > }
> >
> > All is well whilst developing in Eclipse using the Jetty Launcher but
> > when I try to deploy in a standalone Jetty instance by copying the war
> > into its webapps folder I get the following exception:
> >
> > java.lang.RuntimeException:
> > Service id 'AssetFinder' has already been defined by
> > com.alienfactory.websitetags.WebsiteTagsModule.buildAssetFinder(AssetSource)
> > (at WebsiteTagsModule.java:28)
> > and may not be redefined by
> > com.alienfactory.websitetags.WebsiteTagsModule.buildAssetFinder(AssetSource)
> > (at WebsiteTagsModule.java:28).
> > You should rename one of the service builder methods.
> >
> > It's as if the MANIFEST.MF and hence my module class is being parsed
> > more than once. I've checked the .war and that module class does only
> > exist the once.
> >
> > I've also tried autobuilding with the "public static void
> > bind(ServiceBinder binder)" method and receive a similar message.
> >
> > I've done the usual searches (tapestry website, google, mailing lists)
> > and not found any mention of anyone having deployment problems outside
> > of Tomcat. Are there any known gotchas with respect to deploying
> > component modules?
> >
> > Regards,
> >
> > Steve.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Steve Eynon
0780 390 5424

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to