You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nikola Vulovic <ni...@gmail.com> on 2013/08/02 05:21:38 UTC

kaptcha deployment error

this is the error:
java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
defined by
org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
KaptchaProducerImpl.java:34) via
org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) (at
KaptchaModule.java:38) and may not be redefined by
org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
KaptchaProducerImpl.java:34) via
domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
You should rename one of the service builder methods.

This is appmodule
import org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
import org.apache.tapestry5.kaptcha.services.KaptchaProducer;

 public static void bind(ServiceBinder binder) {
  // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
  // Make bind() calls on the binder object to define most IoC services.
  // Use service builder methods (example below) when the implementation
  // is provided inline, or requires more initialization than simply
  // invoking the constructor.
  binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
 }
Added library's
tapestry-kaptcha-5.3.7.jar
 kaptcha-2.3.2.jar
kaptcha-2.3.2-jdk14.jar

What should be renamed?
Thanks for help

-- 
Pozdrav Nikola Vulovic

Re: kaptcha deployment error

Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Why are you binding KaptchaProvider service in your AppModule when it is already bound in tapestry-kaptcha ?

regards
Taha

On 02-Aug-2013, at 8:51 AM, Nikola Vulovic <ni...@gmail.com> wrote:

> this is the error:
> java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
> defined by
> org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
> KaptchaProducerImpl.java:34) via
> org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) (at
> KaptchaModule.java:38) and may not be redefined by
> org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
> KaptchaProducerImpl.java:34) via
> domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
> You should rename one of the service builder methods.
> 
> This is appmodule
> import org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
> import org.apache.tapestry5.kaptcha.services.KaptchaProducer;
> 
> public static void bind(ServiceBinder binder) {
>  // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
>  // Make bind() calls on the binder object to define most IoC services.
>  // Use service builder methods (example below) when the implementation
>  // is provided inline, or requires more initialization than simply
>  // invoking the constructor.
>  binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
> }
> Added library's
> tapestry-kaptcha-5.3.7.jar
> kaptcha-2.3.2.jar
> kaptcha-2.3.2-jdk14.jar
> 
> What should be renamed?
> Thanks for help
> 
> -- 
> Pozdrav Nikola Vulovic


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


Re: kaptcha deployment error

Posted by Lance Java <la...@googlemail.com>.
1. Tapestry is built on top of an IOC container (called unimaginatively
Tapestry IOC)
2. Services are added to the IOC registry by an IOC Module (
http://tapestry.apache.org/tapestry-ioc-modules.html)
3. Components often require Services
4. Component libraries can include a "Tapestry-Module-Classes" entry in
their jar manifest which will cause tapestry to load additional IOC Modules
5. Tapestry IOC provides loads of goodies including service overriding,
decorating and contributions

Some reading to get you started:
http://tapestry.apache.org/ioc.html
http://tapestry.apache.org/component-libraries.html
On 2 Aug 2013 10:18, "Nikola Vulovic" <ni...@gmail.com> wrote:

> do not know why?
> Services are not very clear to me and documentation is unclear
> it worked when I removed line
> binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
>
>
> On Fri, Aug 2, 2013 at 5:21 AM, Nikola Vulovic <ni...@gmail.com> wrote:
>
> > this is the error:
> > java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
> > defined by
> > org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map)
> (at
> > KaptchaProducerImpl.java:34) via
> > org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder)
> (at
> > KaptchaModule.java:38) and may not be redefined by
> > org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map)
> (at
> > KaptchaProducerImpl.java:34) via
> > domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
> > You should rename one of the service builder methods.
> >
> > This is appmodule
> > import
> org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
> > import org.apache.tapestry5.kaptcha.services.KaptchaProducer;
> >
> >  public static void bind(ServiceBinder binder) {
> >   // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
> >   // Make bind() calls on the binder object to define most IoC services.
> >   // Use service builder methods (example below) when the implementation
> >   // is provided inline, or requires more initialization than simply
> >   // invoking the constructor.
> >   binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
> >  }
> > Added library's
> > tapestry-kaptcha-5.3.7.jar
> >  kaptcha-2.3.2.jar
> > kaptcha-2.3.2-jdk14.jar
> >
> > What should be renamed?
> > Thanks for help
> >
> > --
> > Pozdrav Nikola Vulovic
> >
>
>
>
> --
> Pozdrav Nikola Vulovic
>

Re: kaptcha deployment error

Posted by Nikola Vulovic <ni...@gmail.com>.
do not know why?
Services are not very clear to me and documentation is unclear
it worked when I removed line
binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);


On Fri, Aug 2, 2013 at 5:21 AM, Nikola Vulovic <ni...@gmail.com> wrote:

> this is the error:
> java.lang.RuntimeException: Service id 'KaptchaProducer' has already been
> defined by
> org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
> KaptchaProducerImpl.java:34) via
> org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) (at
> KaptchaModule.java:38) and may not be redefined by
> org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) (at
> KaptchaProducerImpl.java:34) via
> domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33).
> You should rename one of the service builder methods.
>
> This is appmodule
> import org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl;
> import org.apache.tapestry5.kaptcha.services.KaptchaProducer;
>
>  public static void bind(ServiceBinder binder) {
>   // binder.bind(MyServiceInterface.class, MyServiceImpl.class);
>   // Make bind() calls on the binder object to define most IoC services.
>   // Use service builder methods (example below) when the implementation
>   // is provided inline, or requires more initialization than simply
>   // invoking the constructor.
>   binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class);
>  }
> Added library's
> tapestry-kaptcha-5.3.7.jar
>  kaptcha-2.3.2.jar
> kaptcha-2.3.2-jdk14.jar
>
> What should be renamed?
> Thanks for help
>
> --
> Pozdrav Nikola Vulovic
>



-- 
Pozdrav Nikola Vulovic