Re: T5: Nice balloon error for 2 text fields possible?
There's a method attach to the JavaScript DOM object to invoke. Please check out tapestry.js for details. On Sat, Feb 7, 2009 at 9:39 AM, James Sherwood wrote: > Hello, > > Is there a quick way to manually produce those balloons?:) > > IE by just calling a JavaScript function with the component's id and message > for instance? > > Thanks, > --James > > -Original Message- > From: Howard Lewis Ship [mailto:hls...@gmail.com] > Sent: February-06-09 3:05 PM > To: Tapestry users > Subject: Re: T5: Nice balloon error for 2 text fields possible? > > Not with the built in stuff. I went to a lot of trouble so that > entering one field fades out the bubbles on any other fields. It's > surprisingly tricky to get right! > > On Thu, Feb 5, 2009 at 5:38 AM, James Sherwood > wrote: >> Hello, >> >> >> >> Is it possible to have the nice balloon error run across 2 password > fields? >> >> >> >> IE password and confirm password must equal, if not the balloon error >> shows(like a required error) instead of having to output a form error? >> >> >> >> Thanks, >> >> --James >> >> > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] filesystem asset problems
thanks for the hint, it makes more sense now. So there are two parts, when it comes to assets: 1) Presenting the asset as a proper link to the client (as component link inside HTML) 2) Getting tapestry to response it when it is requested as URL. Currently built in as direct context path or assets folder -> http://x/assets/. Jonathan O'Connor schrieb: Manuel, look at the AssetDispatcher class. That will clear up a lot of problems, I think. Ciao, Jonathan On 06/02/2009 00:49, manuel aldana wrote: hi, want to create a new asset-type, which makes images available from filesystem (file:/) to webapp (http:/), but somehow I don't get it... I am sure at least some of my assumptions are wrong: -with Asset framework I can make resources available through tapestry webapp context (http://xxx url is then kind of a gateway to the Resource) -Resource is the real resource (file, other website, relative context path etc.) -AssetFactory implementation tells how to map between the resource and the client-view (-> toClientUrl()) -if everything works fine, the resource is loaded (amongst others AbstractResource.openStream() loads the contents) and is passed to the AssetFactory impl My biggest doubt to my expectations is that for tapestry it should be very difficult to track the toClientUrl() return value to its own webcontext, e.g.: how should it know that http://domain:port/tapestryApp/toClientUrlValue points to file://d:/srv/images/? It then would need to handle a lot of URL redirecting magic internally. Any other option for making my filesystem pics accessible to the same domain:host as the tapestry app is running without putting it to one of the jars or to webapp-context? thanks a lot. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Wishlist and survey for Tapestry 5 components
Hello, I just created a list of 36 UI components. Please take a survey so we (the community) can all get an impression of what is most needed and what not. http://bbwebcraft.blogspot.com. Of course, the debate is welcome! Cheers, Borut
How to style a button
Hi fellas, this isnt a T5 question but hoping someone can help out. I am looking to style buttons - how would i got about styling that one? if i change the above code to: save and have the following css it works fine a.button, button {} button {} etc if i want to style my buttons do I have to convert all my to save ? It doesnt work for the following code tho How would i apply css to this button? Any help would be appreciated guys. Regards, ..kace -- View this message in context: http://www.nabble.com/How-to-style-a-button-tp21893032p21893032.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
Re: in T5?
See the OutputRaw component Uli superoverdr...@gmx.de schrieb: How do you do: in T5? Thanks! Toby - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: in T5?
Sorry for asking, it is: ;-) Original-Nachricht > Datum: Sat, 07 Feb 2009 21:02:54 +0100 > Von: superoverdr...@gmx.de > An: users@tapestry.apache.org > Betreff: in T5? > How do you do: > > > > in T5? > > Thanks! > > Toby > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
in T5?
How do you do: in T5? Thanks! Toby - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Hard to track NPE
Also have a look at the other issue I linked mine to. That concerns the RequestHandler directly. In the end I think your problem comes down to the Session not being available at the time you are trying to access it. HTH, Uli Joost Schouten (mailing lists) schrieb: Thanks Uli, I'll have a play with this tomorrow. Looks very promising. Have a good weekend, Joost On Sat, Feb 7, 2009 at 6:58 PM, Ulrich Stärk wrote: Damn, hit the wrong key! This might help: https://issues.apache.org/jira/browse/TAP5-456 Cheers, Uli Joost Schouten (mailing lists) schrieb: Hi, I'm getting a NPE in tapestries reflected Request after I contributed a new RequestFilter (LocaleFilter below; see snippet). My pages appear as expected which leads me to assume it has something to do with the Request being completed when my code tries to access it (the stack hints that to). But since debugging is hard and the NPE non-descriptive I can't figure out what exactly is going on. Does anyone know why I get this NPE and if so, can we make it more descriptive than just this descriptionless NPE? --- my code public static void contributeRequestHandler( final OrderedConfiguration configuration, @InjectService("Utf8Filter") final RequestFilter utf8Filter, @InjectService("TransactionFilter") final RequestFilter transactionFilter, @InjectService("SecurityFilter") final RequestFilter securityFilter, @InjectService("LocaleFilter") final RequestFilter localeFilter) { configuration.add("LocaleFilter", localeFilter); configuration.add("Utf8Filter", utf8Filter); configuration.add("TransactionFilter", transactionFilter); configuration.add("SecurityFilter", securityFilter); } public RequestFilter buildLocaleFilter( @InjectService("PersistentLocale") final PersistentLocale persistantLocale, @InjectService("ThreadLocale") final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } - the exception --- java.lang.NullPointerException at $Request_11f4b87384f.getSession($Request_11f4b87384f.java) at $Request_11f4b87381c.getSession($Request_11f4b87381c.java) at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35) at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40) at $EndOfRequestEventHub_11f4b873820.fire($EndOfRequestEventHub_11f4b873820.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:762) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:748) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.SecurityFilter.service(SecurityFilter.java:151) at $RequestFilter_11f4b87383a.service($RequestFilter_11f4b87383a.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:48) at $RequestFilter_11f4b873839.service($RequestFilter_11f4b873839.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$2.service(BaseModule.java:171) at $RequestFilter_11f4b873838.service($RequestFilter_11f4b873838.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$3.service(BaseModule.java:188) at $RequestFilter_11f4b87383b.service($RequestFilter_11f4b87383b.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
Re: Localization in Services
Possibly, that's a tack I take in a lot of the Tapestry code; passing the component (actually the ComponentResources) around to gain access to the component's identity and resources. I had a lot of trouble with the naming here because from some perspectives, the ComponentResources IS the component, and your code is just the icing on the top (something I initially called the "peer"). Of course, the CR is itself largely a facade around the very internal ComponentPageElementImpl which is where most of the actual component logic live ... and so it goes! On Fri, Feb 6, 2009 at 1:54 PM, Blower, Andy wrote: > Not sure how generally useful that would be, but it would solve the problem > in an easy way. > > Thinking some more about this, would it not be easier to simply pass the > messages from the page/component event handler method into the service method > that's called to send the email? > >> -Original Message- >> From: Howard Lewis Ship [mailto:hls...@gmail.com] >> Sent: 06 February 2009 21:26 >> To: Tapestry users >> Subject: Re: Localization in Services >> >> Which Messages resource would it inject? >> >> I suppose we could add the application's Messages object as an >> injectable value. >> >> On Fri, Feb 6, 2009 at 1:04 PM, Blower, Andy >> wrote: >> > I thought that it might be possible to use constructor injection to >> inject the Messages resource just like you can with Logger. I take it >> that this is not possible to provide in T5 because of >> lifecycle/reloading issues then Howard? >> > >> >> -Original Message- >> >> From: Howard Lewis Ship [mailto:hls...@gmail.com] >> >> Sent: 06 February 2009 17:03 >> >> To: Tapestry users >> >> Subject: Re: Localization in Services >> >> >> >> I would go a different route. >> >> >> >> Using the ComponentSource service, you can get any page in the >> >> application as a Component instance. >> >> >> >> From that you can get the ComponentResources and from that, the >> >> Messages object. >> >> >> >> Just be aware of the lifecycle: once you boost a Messages instance >> out >> >> of the component layer and into the services tier, you are moving it >> >> out of Tapestry's ability to reload ... in other words, acquire the >> >> Messages and use it briefly, but don't retain it for longer than a >> >> single request. >> >> >> >> On Fri, Feb 6, 2009 at 7:24 AM, Nicolas Charles >> >> >> wrote: >> >> > Thanks for the tip Roberto, but I didn't succeed into adding the >> >> > app.properties (or just i can't get the key, i don't know) >> >> > And it feels strange to use the ValidationMessage for a standart >> >> message >> >> > >> >> > Nick >> >> > >> >> > Tapestry Infodea wrote: >> >> >> >> >> >> I've forgetten a piece of code, you must contribute the >> >> >> ValidationMessagesSource in your AppModule: >> >> >> >> >> >> public void >> >> >> contributeValidationMessagesSource(OrderedConfiguration >> >> >> configuration) { >> >> >> configuration.add("myprop", "it/infodea/app/internal/myprop"); >> >> >>} >> >> >> >> >> >> and define myprop.properties in it/infodea/app/internal/ >> >> >> >> >> >> Tapestry Infodea ha scritto: >> >> >>> >> >> >>> You can use the ValidationMessagesSource and ThreadLocale >> services: >> >> >>> >> >> >>> ValidationMessagesSource validationMessagesSource; >> >> >>> >> >> >>> ThreadLocale threadLocale; >> >> >>> >> >> >>> Messages messages = >> >> >>> >> >> >> validationMessagesSource.getValidationMessages(threadLocale.getLocale() >> >> ); >> >> >>> >> >> >>> Roberto. >> >> >>> >> >> >>> >> >> >>> Nicolas Charles ha scritto: >> >> >> >> Hello there, >> >> >> >> I'm currently struggling with a proper way to use localization >> in >> >> a >> >> service. My need is fairly simple : i'm using t5-restful- >> >> webservices from >> >> Bill Holloway (by the way great job Bill) to offer REST >> services. >> >> One of my service sends an email. The email is localized. Using >> >> the >> >> Asset for the body of the mail works great for its >> localization. >> >> However the mail's subject is stored in the app.properties... >> >> >> >> I cannot use the @Inject Messages to retrieve the oh-so- >> convenient >> >> Messages service ( Service id 'Messages' is not defined by any >> >> module. ) >> >> >> >> Thus my question is : >> >> - How can i access to the app.properties from a given service ? >> >> >> >> The best of the best would be to have a possibility to use >> >> Messages, but >> >> i'm open to any other solution >> >> >> >> Regards, >> >> Nick >> >> >> >> --- >> --- >> >> --- >> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> >> >>> >> >> >>> >> >> >>> >> --- >> >> -- >> >> >>> To unsubs
Re: Hard to track NPE
Thanks Uli, I'll have a play with this tomorrow. Looks very promising. Have a good weekend, Joost On Sat, Feb 7, 2009 at 6:58 PM, Ulrich Stärk wrote: > Damn, hit the wrong key! > > This might help: > > https://issues.apache.org/jira/browse/TAP5-456 > > Cheers, > > Uli > > Joost Schouten (mailing lists) schrieb: >> >> Hi, >> >> I'm getting a NPE in tapestries reflected Request after I contributed >> a new RequestFilter (LocaleFilter below; see snippet). My pages appear >> as expected which leads me to assume it has something to do with the >> Request being completed when my code tries to access it (the stack >> hints that to). But since debugging is hard and the NPE >> non-descriptive I can't figure out what exactly is going on. Does >> anyone know why I get this NPE and if so, can we make it more >> descriptive than just this descriptionless NPE? >> >> --- my code >> public static void contributeRequestHandler( >>final OrderedConfiguration >> configuration, >>@InjectService("Utf8Filter") final RequestFilter >> utf8Filter, >>@InjectService("TransactionFilter") final >> RequestFilter transactionFilter, >>@InjectService("SecurityFilter") final >> RequestFilter securityFilter, >>@InjectService("LocaleFilter") final RequestFilter >> localeFilter) { >>configuration.add("LocaleFilter", localeFilter); >>configuration.add("Utf8Filter", utf8Filter); >>configuration.add("TransactionFilter", transactionFilter); >>configuration.add("SecurityFilter", securityFilter); >> >> >>} >> >>public RequestFilter buildLocaleFilter( >>@InjectService("PersistentLocale") final PersistentLocale >> persistantLocale, >>@InjectService("ThreadLocale") final ThreadLocale >> threadLocale) { >> >>return new RequestFilter() { >> >>public boolean service(Request request, Response >> response, >>RequestHandler handler) throws >> IOException { >> >> persistantLocale.set(threadLocale.getLocale()); >>return handler.service(request, response); >>} >> >>}; >>} >> >> - the exception --- >> >> java.lang.NullPointerException >>at $Request_11f4b87384f.getSession($Request_11f4b87384f.java) >>at $Request_11f4b87381c.getSession($Request_11f4b87381c.java) >>at >> org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35) >>at >> org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40) >>at >> $EndOfRequestEventHub_11f4b873820.fire($EndOfRequestEventHub_11f4b873820.java) >>at >> org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:762) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:748) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> com.joostschouten.common.http.tapestrybase.services.SecurityFilter.service(SecurityFilter.java:151) >>at >> $RequestFilter_11f4b87383a.service($RequestFilter_11f4b87383a.java) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:48) >>at >> $RequestFilter_11f4b873839.service($RequestFilter_11f4b873839.java) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> com.joostschouten.common.http.tapestrybase.services.BaseModule$2.service(BaseModule.java:171) >>at >> $RequestFilter_11f4b873838.service($RequestFilter_11f4b873838.java) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> com.joostschouten.common.http.tapestrybase.services.BaseModule$3.service(BaseModule.java:188) >>at >> $RequestFilter_11f4b87383b.service($RequestFilter_11f4b87383b.java) >>at >> $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) >>at >> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) >>at >> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) >>at >> org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) >>at >> org.apache.tapestry5.internal.services.CheckForUp
RE: T5: Nice balloon error for 2 text fields possible?
Hello, Is there a quick way to manually produce those balloons?:) IE by just calling a JavaScript function with the component's id and message for instance? Thanks, --James -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: February-06-09 3:05 PM To: Tapestry users Subject: Re: T5: Nice balloon error for 2 text fields possible? Not with the built in stuff. I went to a lot of trouble so that entering one field fades out the bubbles on any other fields. It's surprisingly tricky to get right! On Thu, Feb 5, 2009 at 5:38 AM, James Sherwood wrote: > Hello, > > > > Is it possible to have the nice balloon error run across 2 password fields? > > > > IE password and confirm password must equal, if not the balloon error > shows(like a required error) instead of having to output a form error? > > > > Thanks, > > --James > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: SaltSource Error with tapestry-spring-security
I find out the cause of this error. in my POM, I forgot to remove tapestry-acegi and the class loader incorrectly loads a wrong class Thanks Ulrich Stärk wrote: > > The error says it all: You already have a service implementing SaltSource > (it gets contributed > automatically by the tapestry-spring-security module). If you want to > override it, contribute to the > AliasOverrides service: > > public static void > contributeAliasOverrides(Configuration> > configuration) > { > SaltSourceService saltSource = new SaltSourceService() { > public Object getSalt(UserDetails user) { > return null; > } > }; > > configuration.add(AliasContribution.create(SaltSourceService.class, > saltSource)); > } > > cheers, > > Uli > bongosdude schrieb: >> I Just got this error and I could not figure it out yet. >> >> java.lang.RuntimeException: Service id 'SaltSource' has already been >> defined >> by >> nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildSaltSource(String) >> (at SecurityModule.java:121) and may not be redefined by >> nu.localhost.tapestry.acegi.services.SecurityModule.buildSaltSource(String) >> (at SecurityModule.java:115). You should rename one of the service >> builder >> methods. >> at >> org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.java:170) >> at >> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:168) >> >> here is my code in AppModule.java >> >> public static void bind(ServiceBinder binder) >> { >> binder.bind(SaltSourceService.class, >> PlaintextSaltSourceImpl.class).withId("PlaintextSaltSource"); >> } >> >> public static void >> contributeProviderManager(OrderedConfiguration >> configuration, >> @InjectService("DaoAuthenticationProvider") >> AuthenticationProvider daoAuthenticationProvider) { >> configuration.add("daoAuthenticationProvider", >> daoAuthenticationProvider); >> } >> >> >> and my PlaintextSaltSourceImpl.java >> >> import org.springframework.security.userdetails.UserDetails; >> import nu.localhost.tapestry5.springsecurity.services.SaltSourceService; >> public class PlaintextSaltSourceImpl implements SaltSourceService { >> >> public Object getSalt(UserDetails user) { >> return null; >> } >> >> } >> >> >> >> >> - >> B Amigo:super: > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > - B Amigo:super: -- View this message in context: http://www.nabble.com/SaltSource-Error-with-tapestry-spring-security-tp21882494p21889296.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
Re: [T5] 5.1 Startup problem with TapestrySpringFilter
Solved. One shouldn't try to code that late and when tired. When copypasting I used the tapestry-test definition in the pom and of course forgot to delete the test for tapestry-spring sorry for the hassle. 2009/2/7 Otho > I added that of course to them pom.xml along with other dependencies I > need. The problem is, that my Spring context is read in correctly but then > Tapestry bails out with the classnotfoundexception for the > TaperstrySpringFilter. > > 2009/2/7 Howard Lewis Ship > > The new archetype doesn't have a dependency on tapestry-spring (it never >> did). >> >> On Fri, Feb 6, 2009 at 2:19 PM, Otho wrote: >> > After generating the new archetype I get a >> > >> > java.lang.ClassNotFoundException: >> > org.apache.tapestry5.spring.TapestrySpringFilter >> > >> > The same error occurs also when using a ContextLoaderListener. >> > Tapestry-Spring and the TapestrySpringFilter are definitely in the >> > classpath. The spring beans are created normally. >> > >> > Any idea what that could be? >> > >> > web.xml contents: >> > >> > >> > > >PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" >> >"http://java.sun.com/dtd/web-app_2_3.dtd";> >> > >> >Test51 Tapestry 5 Application >> > >> > >> > >> >tapestry.app-package >> >de.test.test51 >> > >> > >> >contextConfigLocation >> > >> >/WEB-INF/classes/appContext-main.xml >> > >> > >> > >> > >> > >> >app >> > >> > >> > >> org.apache.tapestry5.spring.TapestrySpringFilter >> > >> > >> >app >> >/* >> > >> > >> > >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator Apache Tapestry and Apache HiveMind >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >
Re: Hard to track NPE
Damn, hit the wrong key! This might help: https://issues.apache.org/jira/browse/TAP5-456 Cheers, Uli Joost Schouten (mailing lists) schrieb: Hi, I'm getting a NPE in tapestries reflected Request after I contributed a new RequestFilter (LocaleFilter below; see snippet). My pages appear as expected which leads me to assume it has something to do with the Request being completed when my code tries to access it (the stack hints that to). But since debugging is hard and the NPE non-descriptive I can't figure out what exactly is going on. Does anyone know why I get this NPE and if so, can we make it more descriptive than just this descriptionless NPE? --- my code public static void contributeRequestHandler( final OrderedConfiguration configuration, @InjectService("Utf8Filter") final RequestFilter utf8Filter, @InjectService("TransactionFilter") final RequestFilter transactionFilter, @InjectService("SecurityFilter") final RequestFilter securityFilter, @InjectService("LocaleFilter") final RequestFilter localeFilter) { configuration.add("LocaleFilter", localeFilter); configuration.add("Utf8Filter", utf8Filter); configuration.add("TransactionFilter", transactionFilter); configuration.add("SecurityFilter", securityFilter); } public RequestFilter buildLocaleFilter( @InjectService("PersistentLocale") final PersistentLocale persistantLocale, @InjectService("ThreadLocale") final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } - the exception --- java.lang.NullPointerException at $Request_11f4b87384f.getSession($Request_11f4b87384f.java) at $Request_11f4b87381c.getSession($Request_11f4b87381c.java) at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35) at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40) at $EndOfRequestEventHub_11f4b873820.fire($EndOfRequestEventHub_11f4b873820.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:762) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:748) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.SecurityFilter.service(SecurityFilter.java:151) at $RequestFilter_11f4b87383a.service($RequestFilter_11f4b87383a.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:48) at $RequestFilter_11f4b873839.service($RequestFilter_11f4b873839.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$2.service(BaseModule.java:171) at $RequestFilter_11f4b873838.service($RequestFilter_11f4b873838.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$3.service(BaseModule.java:188) at $RequestFilter_11f4b87383b.service($RequestFilter_11f4b87383b.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at $RequestHandler_11f4b873831.service($RequestHandler_11f4b873831.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:193)
Re: Hard to track NPE
This might help: Joost Schouten (mailing lists) schrieb: Hi, I'm getting a NPE in tapestries reflected Request after I contributed a new RequestFilter (LocaleFilter below; see snippet). My pages appear as expected which leads me to assume it has something to do with the Request being completed when my code tries to access it (the stack hints that to). But since debugging is hard and the NPE non-descriptive I can't figure out what exactly is going on. Does anyone know why I get this NPE and if so, can we make it more descriptive than just this descriptionless NPE? --- my code public static void contributeRequestHandler( final OrderedConfiguration configuration, @InjectService("Utf8Filter") final RequestFilter utf8Filter, @InjectService("TransactionFilter") final RequestFilter transactionFilter, @InjectService("SecurityFilter") final RequestFilter securityFilter, @InjectService("LocaleFilter") final RequestFilter localeFilter) { configuration.add("LocaleFilter", localeFilter); configuration.add("Utf8Filter", utf8Filter); configuration.add("TransactionFilter", transactionFilter); configuration.add("SecurityFilter", securityFilter); } public RequestFilter buildLocaleFilter( @InjectService("PersistentLocale") final PersistentLocale persistantLocale, @InjectService("ThreadLocale") final ThreadLocale threadLocale) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { persistantLocale.set(threadLocale.getLocale()); return handler.service(request, response); } }; } - the exception --- java.lang.NullPointerException at $Request_11f4b87384f.getSession($Request_11f4b87384f.java) at $Request_11f4b87381c.getSession($Request_11f4b87381c.java) at org.apache.tapestry5.internal.services.RestoreDirtySessionObjects.requestDidComplete(RestoreDirtySessionObjects.java:35) at org.apache.tapestry5.internal.services.EndOfRequestEventHubImpl.fire(EndOfRequestEventHubImpl.java:40) at $EndOfRequestEventHub_11f4b873820.fire($EndOfRequestEventHub_11f4b873820.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:762) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:748) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.SecurityFilter.service(SecurityFilter.java:151) at $RequestFilter_11f4b87383a.service($RequestFilter_11f4b87383a.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:48) at $RequestFilter_11f4b873839.service($RequestFilter_11f4b873839.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$2.service(BaseModule.java:171) at $RequestFilter_11f4b873838.service($RequestFilter_11f4b873838.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at com.joostschouten.common.http.tapestrybase.services.BaseModule$3.service(BaseModule.java:188) at $RequestFilter_11f4b87383b.service($RequestFilter_11f4b87383b.java) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_11f4b87383f.service($RequestHandler_11f4b87383f.java) at $RequestHandler_11f4b873831.service($RequestHandler_11f4b873831.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:193) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
Re: [T5] 5.1 Startup problem with TapestrySpringFilter
I added that of course to them pom.xml along with other dependencies I need. The problem is, that my Spring context is read in correctly but then Tapestry bails out with the classnotfoundexception for the TaperstrySpringFilter. 2009/2/7 Howard Lewis Ship > The new archetype doesn't have a dependency on tapestry-spring (it never > did). > > On Fri, Feb 6, 2009 at 2:19 PM, Otho wrote: > > After generating the new archetype I get a > > > > java.lang.ClassNotFoundException: > > org.apache.tapestry5.spring.TapestrySpringFilter > > > > The same error occurs also when using a ContextLoaderListener. > > Tapestry-Spring and the TapestrySpringFilter are definitely in the > > classpath. The spring beans are created normally. > > > > Any idea what that could be? > > > > web.xml contents: > > > > > > >PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" > >"http://java.sun.com/dtd/web-app_2_3.dtd";> > > > >Test51 Tapestry 5 Application > > > > > > > >tapestry.app-package > >de.test.test51 > > > > > >contextConfigLocation > > > >/WEB-INF/classes/appContext-main.xml > > > > > > > > > > > >app > > > > > > > org.apache.tapestry5.spring.TapestrySpringFilter > > > > > >app > >/* > > > > > > > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: SaltSource Error with tapestry-spring-security
The error says it all: You already have a service implementing SaltSource (it gets contributed automatically by the tapestry-spring-security module). If you want to override it, contribute to the AliasOverrides service: public static void contributeAliasOverrides(Configuration> configuration) { SaltSourceService saltSource = new SaltSourceService() { public Object getSalt(UserDetails user) { return null; } }; configuration.add(AliasContribution.create(SaltSourceService.class, saltSource)); } cheers, Uli bongosdude schrieb: I Just got this error and I could not figure it out yet. java.lang.RuntimeException: Service id 'SaltSource' has already been defined by nu.localhost.tapestry5.springsecurity.services.SecurityModule.buildSaltSource(String) (at SecurityModule.java:121) and may not be redefined by nu.localhost.tapestry.acegi.services.SecurityModule.buildSaltSource(String) (at SecurityModule.java:115). You should rename one of the service builder methods. at org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.java:170) at org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:168) here is my code in AppModule.java public static void bind(ServiceBinder binder) { binder.bind(SaltSourceService.class, PlaintextSaltSourceImpl.class).withId("PlaintextSaltSource"); } public static void contributeProviderManager(OrderedConfiguration configuration, @InjectService("DaoAuthenticationProvider") AuthenticationProvider daoAuthenticationProvider) { configuration.add("daoAuthenticationProvider", daoAuthenticationProvider); } and my PlaintextSaltSourceImpl.java import org.springframework.security.userdetails.UserDetails; import nu.localhost.tapestry5.springsecurity.services.SaltSourceService; public class PlaintextSaltSourceImpl implements SaltSourceService { public Object getSalt(UserDetails user) { return null; } } - B Amigo:super: - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org