Thanks Chris for your feedback!

I rembembered about tapestry.app-package... but not about the MANIFEST!

so your answer was of great help, anyway I 've decided to merge the
tapestry custom library/module with the application module... and then
started working all the same

I was also missing the proguard -keepattribute *Annotation* option so
please forgive the buzz I was doing here the problem was surely about
anything else...

anyway... I was forgetting about the manifest declaration of the modules so
thanks again...

cheers!

Nicolás.-


On Wed, Nov 16, 2011 at 3:05 PM, derkoe <
tapestry.christian.koeb...@gmail.com> wrote:

> I guess you did forget to change the "tapestry.app-package" context
> parameter
> or/and change the module classes in MANIFEST.MF.
>
> Chris
>
>
> Nicolas Barrera wrote:
> >
> > Hi all,
> >
> > I wanted to share my strange use case and the errors I 'm facing in my
> way
> > to accomplish it, either way if none can help me this serves as a kind of
> > therapy don't you think?
> >
> > The problem appears only after obfuscating the webapp do you think this
> > can
> > araise problems with tapestry IoC? (I 'm just obfuscating my own
> > libraries... not third parties)
> >
> > well, this is the case:
> >
> > We 've already coded all the app when some guy says "it must not contain
> > the company's name in the whole deliverable" (he does some grep to
> control
> > this),
> > so we opted to obfuscate the code using Proguard, certainly we 're not
> > obfuscating all the code we 're just obfuscating to remove the trhee
> first
> > major packages (which contains the company name), methods and class names
> > and subpackages like pages & components are kept unchanged!
> >
> > That done, we move on to test the web application after being obfuscated
> > and here I post the stactrace when I init the app in Tomcat 5.5.20 or
> > Jetty
> > standalone 7.0.0:
> >
> > It seems to be a problem while loading a Module named
> CustomSecurityModule
> > (we 're using tapestry spring security) and use this custom module to
> > contribute provider manager with an ldap provider.
> >
> > INIT org.eclipse.jetty.servlet.ServletHolder$Config@65394b
> >> 16/11/2011 14:58:37.275 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class org.apache.tapestry5.ioc.services.TapestryIOCModule
> >> 16/11/2011 14:58:37.368 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class
> >> nu.localhost.tapestry5.springsecurity.services.SecurityModule
> >> 16/11/2011 14:58:37.401 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class org.apache.tapestry5.spring.SpringModule
> >> 16/11/2011 14:58:37.520 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class org.apache.tapestry5.upload.services.UploadModule
> >> 16/11/2011 14:58:37.547 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class org.apache.tapestry5.services.TapestryModule
> >> 16/11/2011 14:58:37.626 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class
> >> org.apache.tapestry5.internal.services.InternalModule
> >> 16/11/2011 14:58:37.650 [INFO ] [RegistryBuilder] - Adding module
> >> definition for class a.cemiWebapp.services.AppModule
> >> 16/11/2011 14:58:37.951 [ERROR] [OperationTrackerImpl] - Construction of
> >> service 'Alias' has failed due to recursion: the service depends on
> >> itself
> >> in some way. Please check
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger,
> >>  String, AliasManager, Collection) (at TapestryModule.java:325) for
> >> references to another service that is itself dependent on service
> >> 'Alias'.
> >> 16/11/2011 14:58:37.952 [ERROR] [OperationTrackerImpl] - Operations
> >> trace:
> >> 16/11/2011 14:58:37.954 [ERROR] [OperationTrackerImpl] - [ 1] Realizing
> >> service ServletApplicationInitializer
> >> 16/11/2011 14:58:37.955 [ERROR] [OperationTrackerImpl] - [ 2] Invoking
> >>
> org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger,
> >> List, ApplicationInitializer) (at TapestryModule.java:1247)
> >> 16/11/2011 14:58:37.956 [ERROR] [OperationTrackerImpl] - [ 3]
> >> Constructing
> >> module class org.apache.tapestry5.services.TapestryModule
> >> 16/11/2011 14:58:37.957 [ERROR] [OperationTrackerImpl] - [ 4]
> Determining
> >> injection value for parameter #1
> >> (org.apache.tapestry5.ioc.services.PipelineBuilder)
> >> 16/11/2011 14:58:37.958 [ERROR] [OperationTrackerImpl] - [ 5] Resolving
> >> object of type org.apache.tapestry5.ioc.services.PipelineBuilder using
> >> MasterObjectProvider
> >> 16/11/2011 14:58:37.959 [ERROR] [OperationTrackerImpl] - [ 6] Realizing
> >> service Alias
> >> 16/11/2011 14:58:37.960 [ERROR] [OperationTrackerImpl] - [ 7] Invoking
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
> >> AliasManager, Collection) (at TapestryModule.java:325)
> >> 16/11/2011 14:58:37.961 [ERROR] [OperationTrackerImpl] - [ 8]
> Determining
> >> injection value for parameter #4 (java.util.Collection)
> >> 16/11/2011 14:58:37.962 [ERROR] [OperationTrackerImpl] - [ 9] Collecting
> >> unordered configuration for service Alias
> >> 16/11/2011 14:58:37.963 [ERROR] [OperationTrackerImpl] - [10] Invoking
> >> method
> >>
> a.cemiWebapp.services.AppModule.contributeAlias(AuthenticationProcessingFilter,
> >> Configuration) (at null:-1).
> >> 16/11/2011 14:58:37.964 [ERROR] [OperationTrackerImpl] - [11]
> Determining
> >> injection value for parameter #1
> >> (org.springframework.security.ui.webapp.AuthenticationProcessingFilter)
> >> 16/11/2011 14:58:37.965 [ERROR] [OperationTrackerImpl] - [12] Resolving
> >> object of type
> >> org.springframework.security.ui.webapp.AuthenticationProcessingFilter
> >> using
> >> MasterObjectProvider
> >> 16/11/2011 14:58:37.966 [ERROR] [OperationTrackerImpl] - [13] Realizing
> >> service Alias
> >> 16/11/2011 14:58:37.972 [ERROR] [RecursiveServiceCreationCheckWrapper] -
> >> Construction of service Alias failed: Error invoking service builder
> >> method
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
> >> AliasManager, Co
> >> llection) (at TapestryModule.java:325) (for service 'Alias'): Error
> >> invoking service contribution method
> >>
> a.cemiWebapp.services.AppModule.contributeAlias(AuthenticationProcessingFilter,
> >> Configuration): Exception constructing service 'Alia
> >> s': Construction of service 'Alias' has failed due to recursion: the
> >> service depends on itself in some way. Please check
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
> >> AliasManager, Collection) (at TapestryModule
> >> .java:325) for references to another service that is itself dependent on
> >> service 'Alias'.
> >> java.lang.RuntimeException: Error invoking service builder method
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
> >> AliasManager, Collection) (at TapestryModule.java:325) (for service
> >> 'Alias'): Error invoking servic
> >> e contribution method
> >>
> a.cemiWebapp.services.AppModule.contributeAlias(AuthenticationProcessingFilter,
> >> Configuration): Exception constructing service 'Alias': Construction of
> >> service 'Alias' has failed due to recursion: the service depend
> >> s on itself in some way. Please check
> >> org.apache.tapestry5.services.TapestryModule.buildAlias(Logger, String,
> >> AliasManager, Collection) (at TapestryModule.java:325) for references to
> >> another service that is itself dependent on service 'A
> >> lias'.
> >>
> >
> > the trace continues saying something like the last line.
> >
> >
> > When I run the same application *without* obfuscation on maven's jetty I
> > get everything working fine:
> >
> > 011-11-16 13:54:15.128:INFO::jetty-7.0.0.RC6
> >> 2011-11-16 13:54:19.344:INFO::No Transaction manager found - if your
> >> webapp requires one, please configure one.
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> org.apache.tapestry5.ioc.services.TapestryIOCModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> org.apache.tapestry5.spring.SpringModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> nu.localhost.tapestry5.springsecurity.services.SecurityModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> org.apache.tapestry5.upload.services.UploadModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> org.apache.tapestry5.services.TapestryModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> org.apache.tapestry5.internal.services.InternalModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> ar.com.company.cemiWebapp.services.AppModule
> >> [INFO] ioc.RegistryBuilder Adding module definition for class
> >> ar.com.company.cemiWebapp.services.CustomSecurityModule
> >> [INFO] SpringModuleDef.ApplicationContext Starting Spring (version
> 2.5.6)
> >> 2011-11-16 13:54:20.648:INFO:/cemiWebapp:Initializing Spring root
> >> WebApplicationContext[INFO] context.ContextLoader Root
> >> WebApplicationContext: initialization started
> >>
> >
> >
> > take a look, after adding module AppModule here it's adding also
> > CustomSecurityModule while when the error ocurrs..., this
> > CustomSecurityModule is not called.
> >
> >
> > sorry that I keep adding snippets but i 'd like to post the
> > CustomSecurityModule code:
> >
> > package ar.com.company.cemiWebapp.services;
> >>
> >> import org.apache.tapestry5.ioc.OrderedConfiguration;
> >> import org.apache.tapestry5.ioc.annotations.Inject;
> >> import org.springframework.security.providers.AuthenticationProvider;
> >>
> >> import ar.com.company.lib.security.authentication.LdapCemiProvider;
> >>
> >> public class CustomSecurityModule {
> >>
> >>     public static void
> >> contributeProviderManager(OrderedConfiguration<AuthenticationProvider>
> >> configuration,
> >>             @Inject LdapCemiProvider ldapImecProvider ) {
> >>         configuration.add("ldapCemiProvider", ldapCemiProvider);
> >>     }
> >>
> >> }
> >>
> >
> >
> > this is the AppModule code:
> >
> >
> > package ar.com.company.cemiWebapp.services;
> >>
> >> import java.io.IOException;
> >>
> >> import
> >> nu.localhost.tapestry5.springsecurity.services.SpringSecurityServices;
> >>
> >> import org.apache.tapestry5.SymbolConstants;
> >> import org.apache.tapestry5.ioc.Configuration;
> >> import org.apache.tapestry5.ioc.MappedConfiguration;
> >> import org.apache.tapestry5.ioc.OrderedConfiguration;
> >> import org.apache.tapestry5.ioc.ServiceBinder;
> >> import org.apache.tapestry5.ioc.annotations.Local;
> >> import org.apache.tapestry5.ioc.annotations.SubModule;
> >> import org.apache.tapestry5.services.AliasContribution;
> >> import org.apache.tapestry5.services.Request;
> >> import org.apache.tapestry5.services.RequestFilter;
> >> import org.apache.tapestry5.services.RequestHandler;
> >> import org.apache.tapestry5.services.Response;
> >> import org.slf4j.Logger;
> >> import
> >> org.springframework.security.ui.webapp.AuthenticationProcessingFilter;
> >>
> >> /**
> >>  * This module is automatically included as part of the Tapestry IoC
> >> Registry, it's a good place to
> >>  * configure and extend Tapestry, or to place your own service
> >> definitions.
> >>  */
> >>
> >> @SubModule(value = { CustomSecurityModule.class })
> >> public class AppModule
> >> {
> >>
> >>     public static void contributeApplicationDefaults(
> >>             MappedConfiguration&lt;String, String&gt; configuration)
> >>     {
> >>         configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,es");
> >>         configuration.add(SymbolConstants.PRODUCTION_MODE, "true");
> >>         configuration.add(SymbolConstants.APPLICATION_VERSION,
> >> "1.0.0.0-SNAPSHOT");
> >>      // SPRING SECURITY
> >>         configuration.add("tapestry.default-cookie-max-age",
> "31536000");
> >>         configuration.add("spring-security.loginform.url",
> >> "/login/login");
> >>         configuration.add("spring-security.failure.url",
> >> "/login/login/failed");
> >>         configuration.add("spring-security.accessDenied.url",
> >> "/error/forbidden");
> >>         configuration.add("spring-security.check.url",
> >> "/j_spring_security_check");
> >>         configuration.add("spring-security.target.url", "/start");
> >>         configuration.add("spring-security.rememberme.key",
> >> "REMEMBERMEKEY");
> >>         configuration.add("spring-security.force.ssl.login", "false");
> >>         configuration.add("spring-security.anonymous.key",
> >> "acegi_anonymous");
> >>         configuration.add("spring-security.anonymous.attribute",
> >> "anonymous,ROLE_ANONYMOUS");
> >>         configuration.add("spring-security.password.salt", "DEADBEEF");
> >>     }
> >>
> >>     public static void contributeAlias(
> >>             @SpringSecurityServices
> >>             AuthenticationProcessingFilter
> >> authenticationProcessingFilter,
> >>             Configuration&lt;AliasContribution&lt;?&gt;> configuration)
> {
> >>
> >>         // Hace qeu isempre pase por start, asi siempre se sabe si es
> >> usuario o admin
> >>
> >> authenticationProcessingFilter.setAlwaysUseDefaultTargetUrl(true);
> >>
> >>
> >>
> configuration.add(AliasContribution.create(AuthenticationProcessingFilter.class,
> >> authenticationProcessingFilter));
> >>     }
> >> }
> >>
> >
> > I 've tried this last class commenting out the contributeAlias method
> but,
> > everything kept the same way...
> >
> > hope someone out there got some invoice for me :)
> >
> > cheers and thanks in advance!
> >
> > Nicolás.-
> >
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Obfuscation-Service-Alias-recursion-tp4998477p4998572.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to