Re: TapestryFilter subclassing problem
Hi Kris, yes, moving the class to the service package below the one pointed to by tapestry.app-package solved the problem! Thanks very much! Regards. Udo. Original-Nachricht > Datum: Tue, 15 Jul 2008 09:16:50 +0200 > Von: Kristian Marinkovic <[EMAIL PROTECTED]> > An: "Tapestry users" > Betreff: Re: Antwort: Re: TapestryFilter subclassing problem > hi udo, > > i dont see what the problem is. it seems like the ioc > container has problems to build the ServletApplicationInitializer > service. i just extended my own TapestryFilter with an empty > init method and everything works as expected. > > if you look at the stacktrace you'll see that the > tapestryFilter tries to obtain the above mentioned > service from the registry. > > ServletApplicationInitializer ai = > registry.getService("ServletApplicationInitializer" > ,ServletApplicationInitializer.class); > > may be you have a classloading problem here. where (package) > did you put your implementation of your filter? where > does the tapestry.app-package parameter point to? > i put my filter into my.package.structure.services whereas > web.xml points to my.package.structure > > > g, > kris > > > > > "Udo Abel" <[EMAIL PROTECTED]> > 14.07.2008 16:05 > Bitte antworten an > "Tapestry users" > > > An > "Tapestry users" > Kopie > > Thema > Re: Antwort: Re: TapestryFilter subclassing problem > > > > > > > > Hi Kris, > thanks for your help. The stack trace is quite long, I hope this part > conatins more clues: > > ERROR main org.mortbay.log - failed PostConERP > java.lang.RuntimeException: Error building service proxy for service > 'ServletApplicationInitializer' (at > org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, > List, ApplicationInitializer) (at TapestryModule.java:951)): argument type > mismatch > at > org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) > at > org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:163) > at > org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:91) > at > org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:299) > at > org.apache.tapestry5.ioc.internal.RegistryWrapper.getService(RegistryWrapper.java:53) > at > org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:82) > at > org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) > at > org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > at > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) > at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) > at > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) > at org.mortbay.jetty.Server.doStart(Server.java:222) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at runjettyrun.Bootstrap.main(Bootstrap.java:76) > Caused by: java.lang.RuntimeException: argument type mismatch > at > org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:382) > at > org.apache.tapestry5.ioc.internal.ModuleImpl.createProxy(ModuleImpl.java:335) > at > org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:227) > ... 17 more > Caused by: java.lang.IllegalArgumentException: argument type mismatch > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at > java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.tapestry5.ioc.internal.ModuleIm
Re: Antwort: Re: TapestryFilter subclassing problem
hi udo, i dont see what the problem is. it seems like the ioc container has problems to build the ServletApplicationInitializer service. i just extended my own TapestryFilter with an empty init method and everything works as expected. if you look at the stacktrace you'll see that the tapestryFilter tries to obtain the above mentioned service from the registry. ServletApplicationInitializer ai = registry.getService("ServletApplicationInitializer" ,ServletApplicationInitializer.class); may be you have a classloading problem here. where (package) did you put your implementation of your filter? where does the tapestry.app-package parameter point to? i put my filter into my.package.structure.services whereas web.xml points to my.package.structure g, kris "Udo Abel" <[EMAIL PROTECTED]> 14.07.2008 16:05 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: Antwort: Re: TapestryFilter subclassing problem Hi Kris, thanks for your help. The stack trace is quite long, I hope this part conatins more clues: ERROR main org.mortbay.log - failed PostConERP java.lang.RuntimeException: Error building service proxy for service 'ServletApplicationInitializer' (at org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, List, ApplicationInitializer) (at TapestryModule.java:951)): argument type mismatch at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) at org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:163) at org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:91) at org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:299) at org.apache.tapestry5.ioc.internal.RegistryWrapper.getService(RegistryWrapper.java:53) at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:82) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:222) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at runjettyrun.Bootstrap.main(Bootstrap.java:76) Caused by: java.lang.RuntimeException: argument type mismatch at org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:382) at org.apache.tapestry5.ioc.internal.ModuleImpl.createProxy(ModuleImpl.java:335) at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:227) ... 17 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:376) ... 19 more ERROR main org.mortbay.log - Failed startup of context [EMAIL PROTECTED]/PostConERP,webapp/PostConERP} java.lang.RuntimeException: Error building service proxy for service 'ServletApplicationInitializer' (at org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, List, ApplicationInitializer) (at TapestryModule.java:951)): argument type mismatch at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) at org.apache.tapestry5.ioc.internal.ModuleImpl.findOrCreate(ModuleImpl.java:163) at org.apache.tapestry5.ioc.internal.ModuleImpl.getService(ModuleImpl.java:91) at org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:299) at org.apache.tapestry5.ioc.internal.RegistryWrapper.getSer
Re: Antwort: Re: TapestryFilter subclassing problem
java:335) at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:227) ... 17 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.tapestry5.ioc.internal.ModuleImpl.createProxyInstance(ModuleImpl.java:376) ... 19 more Original-Nachricht > Datum: Mon, 14 Jul 2008 14:51:42 +0200 > Von: Kristian Marinkovic <[EMAIL PROTECTED]> > An: "Tapestry users" > Betreff: Antwort: Re: TapestryFilter subclassing problem > hi, Udo, > > seems to be correct. > > i created an own filter for my testcases exactly as you > described it. and everything works fine for me. > > can you post more of your stackstrace? > > g, > kris > > > > > "Udo Abel" <[EMAIL PROTECTED]> > 14.07.2008 13:59 > Bitte antworten an > "Tapestry users" > > > An > "Tapestry users" > Kopie > > Thema > Re: TapestryFilter subclassing problem > > > > > > > > Hi Kris, > > maybe my understanding is wrong. To be clear: > what I've tried is to implement this class: > > public class ErpTapestryFilter extends TapestryFilter { > > protected void init(Registry registry) { > // .. do some initialization > } > > } > > and replaced the "TapestryFilter" with my "ErpTapestryFilter" in the > web.xml. > The result should be that the following method from TapestryFiler should > be overriden: > > /** > * Invoked from [EMAIL PROTECTED] #init(FilterConfig)} after the Registry > has > been created, to allow any additional > * initialization to occur. This implementation does nothing, and my > be overriden in subclasses. > * > * @param registry from which services may be extracted > * @throws ServletException > */ > protected void init(Registry registry) throws ServletException > { > > } > > What's wrong with that? Does "...maybe overriden in subclasses" mean: > "...in tapestry-internal subclasses" ? > > Thanks, > Udo. > > > Original-Nachricht > > Datum: Mon, 14 Jul 2008 13:40:42 +0200 > > Von: Kristian Marinkovic <[EMAIL PROTECTED]> > > An: "Tapestry users" > > Betreff: Re: TapestryFilter subclassing problem > > > Hi Udo, > > > > take a closer look at your code. the init() method > > you override is not the one from the Filter!! > > > > it is a method to add additional inits AFTER the > > Registry has been started. > > > > take a look at org.apache.tapestry5.TapestryFilter.java > > > > btw. you cannot override init() because it is marked final. > > > > g, > > kris > > > > > > > > > > "Udo Abel" <[EMAIL PROTECTED]> > > 14.07.2008 08:55 > > Bitte antworten an > > "Tapestry users" > > > > > > An > > > > Kopie > > > > Thema > > TapestryFilter subclassing problem > > > > > > > > > > > > > > > > Hi, > > > > when I try to subclass TapestryFilter to do some initialization in the > > overridden init(), I get a runtime exception during filter start: > > > > ERROR main org.mortbay.log - failed TapTest > > java.lang.RuntimeException: Error building service proxy for service > > 'ServletApplicationInitializer' (at > > > org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, > > List, ApplicationInitializer) (at TapestryModule.java:951)): argument > type > > mismatch > > at > > org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) > > > > even though the overridden method is yet empty. > > > > Using Tapestry 5.0.13. > > > > Is there anything else to do than subclassing the TapestryFilter and > using > > it in the web.xml? > > > > Thanks, > > Udo. > > > > > > -- > > Pt! Schon das coole Video vom GMX MultiMessenger gesehen? > > Der Eine für Alle: http://www.gmx.net/de/go/messenger03 > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! > Jetzt dabei sein: > http://www.shortview.de/[EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: TapestryFilter subclassing problem
hi, Udo, seems to be correct. i created an own filter for my testcases exactly as you described it. and everything works fine for me. can you post more of your stackstrace? g, kris "Udo Abel" <[EMAIL PROTECTED]> 14.07.2008 13:59 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re: TapestryFilter subclassing problem Hi Kris, maybe my understanding is wrong. To be clear: what I've tried is to implement this class: public class ErpTapestryFilter extends TapestryFilter { protected void init(Registry registry) { // .. do some initialization } } and replaced the "TapestryFilter" with my "ErpTapestryFilter" in the web.xml. The result should be that the following method from TapestryFiler should be overriden: /** * Invoked from [EMAIL PROTECTED] #init(FilterConfig)} after the Registry has been created, to allow any additional * initialization to occur. This implementation does nothing, and my be overriden in subclasses. * * @param registry from which services may be extracted * @throws ServletException */ protected void init(Registry registry) throws ServletException { } What's wrong with that? Does "...maybe overriden in subclasses" mean: "...in tapestry-internal subclasses" ? Thanks, Udo. Original-Nachricht > Datum: Mon, 14 Jul 2008 13:40:42 +0200 > Von: Kristian Marinkovic <[EMAIL PROTECTED]> > An: "Tapestry users" > Betreff: Re: TapestryFilter subclassing problem > Hi Udo, > > take a closer look at your code. the init() method > you override is not the one from the Filter!! > > it is a method to add additional inits AFTER the > Registry has been started. > > take a look at org.apache.tapestry5.TapestryFilter.java > > btw. you cannot override init() because it is marked final. > > g, > kris > > > > > "Udo Abel" <[EMAIL PROTECTED]> > 14.07.2008 08:55 > Bitte antworten an > "Tapestry users" > > > An > > Kopie > > Thema > TapestryFilter subclassing problem > > > > > > > > Hi, > > when I try to subclass TapestryFilter to do some initialization in the > overridden init(), I get a runtime exception during filter start: > > ERROR main org.mortbay.log - failed TapTest > java.lang.RuntimeException: Error building service proxy for service > 'ServletApplicationInitializer' (at > org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, > List, ApplicationInitializer) (at TapestryModule.java:951)): argument type > mismatch > at > org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) > > even though the overridden method is yet empty. > > Using Tapestry 5.0.13. > > Is there anything else to do than subclassing the TapestryFilter and using > it in the web.xml? > > Thanks, > Udo. > > > -- > Pt! Schon das coole Video vom GMX MultiMessenger gesehen? > Der Eine für Alle: http://www.gmx.net/de/go/messenger03 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TapestryFilter subclassing problem
Hi Kris, maybe my understanding is wrong. To be clear: what I've tried is to implement this class: public class ErpTapestryFilter extends TapestryFilter { protected void init(Registry registry) { // .. do some initialization } } and replaced the "TapestryFilter" with my "ErpTapestryFilter" in the web.xml. The result should be that the following method from TapestryFiler should be overriden: /** * Invoked from [EMAIL PROTECTED] #init(FilterConfig)} after the Registry has been created, to allow any additional * initialization to occur. This implementation does nothing, and my be overriden in subclasses. * * @param registry from which services may be extracted * @throws ServletException */ protected void init(Registry registry) throws ServletException { } What's wrong with that? Does "...maybe overriden in subclasses" mean: "...in tapestry-internal subclasses" ? Thanks, Udo. Original-Nachricht > Datum: Mon, 14 Jul 2008 13:40:42 +0200 > Von: Kristian Marinkovic <[EMAIL PROTECTED]> > An: "Tapestry users" > Betreff: Re: TapestryFilter subclassing problem > Hi Udo, > > take a closer look at your code. the init() method > you override is not the one from the Filter!! > > it is a method to add additional inits AFTER the > Registry has been started. > > take a look at org.apache.tapestry5.TapestryFilter.java > > btw. you cannot override init() because it is marked final. > > g, > kris > > > > > "Udo Abel" <[EMAIL PROTECTED]> > 14.07.2008 08:55 > Bitte antworten an > "Tapestry users" > > > An > > Kopie > > Thema > TapestryFilter subclassing problem > > > > > > > > Hi, > > when I try to subclass TapestryFilter to do some initialization in the > overridden init(), I get a runtime exception during filter start: > > ERROR main org.mortbay.log - failed TapTest > java.lang.RuntimeException: Error building service proxy for service > 'ServletApplicationInitializer' (at > org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, > List, ApplicationInitializer) (at TapestryModule.java:951)): argument type > mismatch > at > org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) > > even though the overridden method is yet empty. > > Using Tapestry 5.0.13. > > Is there anything else to do than subclassing the TapestryFilter and using > it in the web.xml? > > Thanks, > Udo. > > > -- > Pt! Schon das coole Video vom GMX MultiMessenger gesehen? > Der Eine für Alle: http://www.gmx.net/de/go/messenger03 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TapestryFilter subclassing problem
Hi Udo, take a closer look at your code. the init() method you override is not the one from the Filter!! it is a method to add additional inits AFTER the Registry has been started. take a look at org.apache.tapestry5.TapestryFilter.java btw. you cannot override init() because it is marked final. g, kris "Udo Abel" <[EMAIL PROTECTED]> 14.07.2008 08:55 Bitte antworten an "Tapestry users" An Kopie Thema TapestryFilter subclassing problem Hi, when I try to subclass TapestryFilter to do some initialization in the overridden init(), I get a runtime exception during filter start: ERROR main org.mortbay.log - failed TapTest java.lang.RuntimeException: Error building service proxy for service 'ServletApplicationInitializer' (at org.apache.tapestry5.services.TapestryModule.buildServletApplicationInitializer(Logger, List, ApplicationInitializer) (at TapestryModule.java:951)): argument type mismatch at org.apache.tapestry5.ioc.internal.ModuleImpl.create(ModuleImpl.java:245) even though the overridden method is yet empty. Using Tapestry 5.0.13. Is there anything else to do than subclassing the TapestryFilter and using it in the web.xml? Thanks, Udo. -- Pt! Schon das coole Video vom GMX MultiMessenger gesehen? Der Eine für Alle: http://www.gmx.net/de/go/messenger03 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]