You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yago González <yg...@4mhoteles.com> on 2014/02/21 16:35:15 UTC

Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Hello Everybody, this is mi first message.

Well, i have a problem when change the number of tapestry version.

I have a proof project with Tapestry 5.3.4 (with Hibernate and Spring). I
create a WAR file with maven and install in Tomcat and run very well,
without problems, but i change for Tapestry version to 5.3.7 or 5.4-beta-2
and Tomcat say an error (at the end of email).

Well, with the same code i create other project with Tapestry 5.4-beta-2
(or 5.3.7), create WAR file and run in Tomcat without problems, but when i
change to tapestry 5.3.4 i've got the same error when before.


The error in Tomcat:

 Catalina Log:

feb 21, 2014 4:15:42 PM org.apache.catalina.core.AprLifecycleListener init
> Información: La biblioteca nativa de Apache Tomcat basada en ARP que
> permite un rendimiento óptimo en entornos de desarrollo no ha sido hallada
> en java.library.path:
> /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
> feb 21, 2014 4:15:43 PM org.apache.coyote.AbstractProtocol init
> Información: Initializing ProtocolHandler ["http-bio-8080"]
> feb 21, 2014 4:15:43 PM org.apache.coyote.AbstractProtocol init
> Información: Initializing ProtocolHandler ["ajp-bio-8009"]
> feb 21, 2014 4:15:43 PM org.apache.catalina.startup.Catalina load
> Información: Initialization processed in 1822 ms
> feb 21, 2014 4:15:43 PM org.apache.catalina.core.StandardService
> startInternal
> Información: Arrancando servicio Catalina
> feb 21, 2014 4:15:43 PM org.apache.catalina.core.StandardEngine
> startInternal
> Información: Starting Servlet Engine: Apache Tomcat/7.0.52
> feb 21, 2014 4:15:43 PM org.apache.catalina.startup.HostConfig deployWAR
> Información: Despliegue del archivo
> /home/AAAAA/apache-tomcat/webapps/proof.war de la aplicación web
> feb 21, 2014 4:15:57 PM org.apache.catalina.core.StandardContext
> startInternal
> Grave: Error filterStart
> feb 21, 2014 4:15:57 PM org.apache.catalina.core.StandardContext
> startInternal
> Grave: Falló en arranque del Contexto [/proof] debido a errores previos
> feb 21, 2014 4:15:57 PM org.apache.catalina.loader.WebappClassLoader
> checkThreadLocalMapForLeaks
> Grave: La aplicación web [/proof] creó un ThreadLocal con clave del tipo
> [org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.MapHolder]
> (valor
> [org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl$MapHolder@416e43d7])
> y un valor del tipo [java.util.HashMap] (valor [{1=DEFINED, 2=DEFINED}])
> pero no pudo quitarlo cuando la aplicación web se paró. Los hilos se van a
> renovar con el tiempo para intentar evitar in posible fallo de memoria.
> feb 21, 2014 4:15:57 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> Información: Despliegue del directorio
> /home/AAAAA/apache-tomcat/webapps/examples de la aplicación web
> feb 21, 2014 4:16:00 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> Información: Despliegue del directorio
> /home/AAAAA/apache-tomcat/webapps/docs de la aplicación web
> feb 21, 2014 4:16:01 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> Información: Despliegue del directorio
> /home/AAAAA/apache-tomcat/webapps/ROOT de la aplicación web
> feb 21, 2014 4:16:01 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> Información: Despliegue del directorio
> /home/AAAAA/apache-tomcat/webapps/host-manager de la aplicación web
> feb 21, 2014 4:16:02 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> Información: Despliegue del directorio
> /home/AAAAA/apache-tomcat/webapps/manager de la aplicación web
> feb 21, 2014 4:16:03 PM org.apache.coyote.AbstractProtocol start
> Información: Starting ProtocolHandler ["http-bio-8080"]
> feb 21, 2014 4:16:03 PM org.apache.coyote.AbstractProtocol start
> Información: Starting ProtocolHandler ["ajp-bio-8009"]
> feb 21, 2014 4:16:03 PM org.apache.catalina.startup.Catalina start
> Información: Server startup in 19844 ms
>

 Localhost log:

feb 21, 2014 4:15:55 PM org.apache.catalina.core.ApplicationContext log
> Información: No Spring WebApplicationInitializer types detected on
> classpath
> feb 21, 2014 4:15:57 PM org.apache.catalina.core.StandardContext
> filterStart
> Grave: Excepción arrancando filtro app
> java.lang.RuntimeException: Service id 'ApplicationContextCustomizer' has
> already been defined by
> org.apache.tapestry5.spring.SpringModule.buildApplicationContextCustomizer(List,
> ChainBuilder) (at SpringModule.java:89) and may not be redefined by
> org.apache.tapestry5.spring.modules.SpringModule.buildApplicationContextCustomizer(List,
> ChainBuilder) (at SpringModule.java:91). You should rename one of the
> service builder methods.
>     at
> org.apache.tapestry5.ioc.internal.RegistryImpl.<init>(RegistryImpl.java:183)
>     at
> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:177)
>     at
> org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(TapestryAppInitializer.java:200)
>     at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:109)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
>     at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
>     at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>     at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>     at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
>     at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
>     at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
>     at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:744)
>
> feb 21, 2014 4:16:00 PM org.apache.catalina.core.ApplicationContext log
> Información: ContextListener: contextInitialized()
> feb 21, 2014 4:16:00 PM org.apache.catalina.core.ApplicationContext log
> Información: SessionListener: contextInitialized()
> feb 21, 2014 4:16:00 PM org.apache.catalina.core.ApplicationContext log
> Información: ContextListener:
> attributeAdded('org.apache.jasper.compiler.TldLocationsCache',
> 'org.apache.jasper.compiler.TldLocationsCache@6c99aeea')
>

Re: Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Posted by Barry Books <tr...@gmail.com>.
try

mvn clean


On Fri, Feb 21, 2014 at 10:35 AM, Yago González <yg...@4mhoteles.com>wrote:

> I can't see in the tree.
>
> I explain better, my pom have a variable for tapestry version ( used with
> tapestry-core and tapestry-spring), but when i change tapestry version and
> i compiled it's added in WEB-INF/lib the Old's JAR's what i used in the old
> version.
>
>
> 2014-02-21 17:23 GMT+01:00 Dragan Sahpaski <dr...@gmail.com>:
>
> > It's a transitive dependency. Do mvn dependency:tree of you're using
> maven.
> >
> > Cheers,
> > Dragan Sahpaski
> >
> >
> > On Fri, Feb 21, 2014 at 5:20 PM, Yago González <ygonzalez@4mhoteles.com
> > >wrote:
> >
> > > Yes, exactly but Why? Where is stored old JAR's ?
> > > In pom have not reference´ s, is cached under .m2/repository ¿?
> > >
> > >
> > >
> > >
> > > 2014-02-21 16:42 GMT+01:00 Thiago H de Paula Figueiredo <
> > > thiagohp@gmail.com>
> > > :
> > >
> > > > On Fri, 21 Feb 2014 12:35:15 -0300, Yago González <
> > > ygonzalez@4mhoteles.com>
> > > > wrote:
> > > >
> > > >  Hello Everybody, this is mi first message.
> > > >>
> > > >
> > > > Hi!
> > > >
> > > > Check your classpath. You probably have the tapestry-spring JAR added
> > > > twice, with different versions.
> > > >
> > > > --
> > > > Thiago H. de Paula Figueiredo
> > > > Tapestry, Java and Hibernate consultant and developer
> > > > http://machina.com.br
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > > >
> > > >
> > >
> >
>

Re: Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Posted by Yago González <yg...@4mhoteles.com>.
I can't see in the tree.

I explain better, my pom have a variable for tapestry version ( used with
tapestry-core and tapestry-spring), but when i change tapestry version and
i compiled it's added in WEB-INF/lib the Old's JAR's what i used in the old
version.


2014-02-21 17:23 GMT+01:00 Dragan Sahpaski <dr...@gmail.com>:

> It's a transitive dependency. Do mvn dependency:tree of you're using maven.
>
> Cheers,
> Dragan Sahpaski
>
>
> On Fri, Feb 21, 2014 at 5:20 PM, Yago González <ygonzalez@4mhoteles.com
> >wrote:
>
> > Yes, exactly but Why? Where is stored old JAR's ?
> > In pom have not reference´ s, is cached under .m2/repository ¿?
> >
> >
> >
> >
> > 2014-02-21 16:42 GMT+01:00 Thiago H de Paula Figueiredo <
> > thiagohp@gmail.com>
> > :
> >
> > > On Fri, 21 Feb 2014 12:35:15 -0300, Yago González <
> > ygonzalez@4mhoteles.com>
> > > wrote:
> > >
> > >  Hello Everybody, this is mi first message.
> > >>
> > >
> > > Hi!
> > >
> > > Check your classpath. You probably have the tapestry-spring JAR added
> > > twice, with different versions.
> > >
> > > --
> > > Thiago H. de Paula Figueiredo
> > > Tapestry, Java and Hibernate consultant and developer
> > > http://machina.com.br
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
>

Re: Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Posted by Dragan Sahpaski <dr...@gmail.com>.
It's a transitive dependency. Do mvn dependency:tree of you're using maven.

Cheers,
Dragan Sahpaski


On Fri, Feb 21, 2014 at 5:20 PM, Yago González <yg...@4mhoteles.com>wrote:

> Yes, exactly but Why? Where is stored old JAR's ?
> In pom have not reference´ s, is cached under .m2/repository ¿?
>
>
>
>
> 2014-02-21 16:42 GMT+01:00 Thiago H de Paula Figueiredo <
> thiagohp@gmail.com>
> :
>
> > On Fri, 21 Feb 2014 12:35:15 -0300, Yago González <
> ygonzalez@4mhoteles.com>
> > wrote:
> >
> >  Hello Everybody, this is mi first message.
> >>
> >
> > Hi!
> >
> > Check your classpath. You probably have the tapestry-spring JAR added
> > twice, with different versions.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>

Re: Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Posted by Yago González <yg...@4mhoteles.com>.
Yes, exactly but Why? Where is stored old JAR's ?
In pom have not reference´ s, is cached under .m2/repository ¿?




2014-02-21 16:42 GMT+01:00 Thiago H de Paula Figueiredo <th...@gmail.com>
:

> On Fri, 21 Feb 2014 12:35:15 -0300, Yago González <yg...@4mhoteles.com>
> wrote:
>
>  Hello Everybody, this is mi first message.
>>
>
> Hi!
>
> Check your classpath. You probably have the tapestry-spring JAR added
> twice, with different versions.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry IOC: Multiple bindings for same interface

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 21 Feb 2014 12:58:26 -0300, Michael Gagauz <ga...@gmail.com>  
wrote:

> Is it possible in T5 to inject multiple services which implemented same  
> interface into array field?
> I.e:
> @Inject
> private SomeService[] services;

No.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


Re: Tapestry IOC: Multiple bindings for same interface

Posted by Muhammad Gelbana <m....@gmail.com>.
He still needs to manually contribute the interface-implementing services
to this single service. Still, it sounds like the closes solution.

*---------------------*
*Muhammad Gelbana*
http://www.linkedin.com/in/mgelbana


On Sat, Feb 22, 2014 at 11:18 AM, Lance Java <la...@googlemail.com>wrote:

> I think the "tapestry way" of doing what you want is to make multiple
> contributions to a single service and inject the single service.
>

Re: Tapestry IOC: Multiple bindings for same interface

Posted by Lance Java <la...@googlemail.com>.
I think the "tapestry way" of doing what you want is to make multiple
contributions to a single service and inject the single service.

Tapestry IOC: Multiple bindings for same interface

Posted by Michael Gagauz <ga...@gmail.com>.
Is it possible in T5 to inject multiple services which implemented same 
interface into array field?
I.e:
@Inject
private SomeService[] services;


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


Re: Error: 'ApplicationContextCustomizer' has already been defined after changed Tapestry version (up or down)

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 21 Feb 2014 12:35:15 -0300, Yago González  
<yg...@4mhoteles.com> wrote:

> Hello Everybody, this is mi first message.

Hi!

Check your classpath. You probably have the tapestry-spring JAR added  
twice, with different versions.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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