Re: tapestry 5.2.4 and spring 3.1M1
glad to see this one is fixed, Thanks, Jan On Thu, Dec 15, 2011 at 11:35 AM, Igor Drobiazko [via Tapestry] ml-node+s1045711n507709...@n5.nabble.com wrote: Fixed in trunk and 5.3 branch. On Thu, Dec 15, 2011 at 12:54 AM, Thiago H. de Paula Figueiredo [hidden email] http://user/SendEmail.jtp?type=nodenode=5077094i=0 wrote: On Wed, 14 Dec 2011 21:16:45 -0200, [hidden email]http://user/SendEmail.jtp?type=nodenode=5077094i=1 [hidden email] http://user/SendEmail.jtp?type=nodenode=5077094i=2 wrote: I was able to fix this issue (and the above error for 5.3) with the following patch: Hi, Matt! Nice! :) Could you please attach this patch to the JIRA issue you've opened? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org[hidden email] http://user/SendEmail.jtp?type=nodenode=5077094i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=5077094i=4 -- Best regards, Igor Drobiazko http://tapestry5.de -- If you reply to this email, your message will be added to the discussion below: http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5077094.html To unsubscribe from tapestry 5.2.4 and spring 3.1M1, click herehttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4462226code=emVsZW5rYS5qYW5AZ21haWwuY29tfDQ0NjIyMjZ8LTExNDY3ODcxMzQ= . NAMLhttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.InstantMailNamespacebreadcrumbs=instant+emails%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-5-2-4-and-spring-3-1M1-tp4462226p5079682.html Sent from the Tapestry - User mailing list archive at Nabble.com.
PageTester can't init JPAModule when run mvn test
Hi, How can I test my services using TestNG? I use PageTester to start tapestry and call getService to get my service instance. This works when I run in a main function. But I write some test class use TestNG, when I call mvn test in shell. I get the following Exceptions. No PersistenceProvider implementation available in the runtime environment. -- Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: Operations trace: Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 1] Realizing service RegistryStartup Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 2] Instantiating service RegistryStartup implementation via org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at RegistryStartup.java:36) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:49) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 3] Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.RegistryStartup via public org.apache.tapestry5.ioc.internal.services.RegistryStartup(org.slf4j.Logger,java.util.List) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 4] Determining injection value for parameter #2 (java.util.List) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 5] Collecting ordered configuration for service RegistryStartup Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 6] Invoking org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean) (at JpaModule.java:183) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper createObject SEVERE: Construction of service RegistryStartup failed: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. org.apache.tapestry5.ioc.internal.OperationException: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:47) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76) at org.apache.tapestry5.ioc.internal.RegistryImpl.addToOrderedConfiguration(RegistryImpl.java:626) at org.apache.tapestry5.ioc.internal.RegistryImpl.getOrderedConfiguration(RegistryImpl.java:480) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:110) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:107) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.getOrderedConfiguration(ServiceResourcesImpl.java:105) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator.getOrderedConfiguration(AbstractServiceCreator.java:123) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator.access$200(AbstractServiceCreator.java:35) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator$1.findResource(AbstractServiceCreator.java:103) at org.apache.tapestry5.ioc.internal.util.DelegatingInjectionResources.findResource(DelegatingInjectionResources.java:38) at org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:219) at org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:49) at org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:260) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
T5.3 Application Folder ?
One of new features in 5.3 is: Application Folder Tapestry can now be configured to execute inside a folder, which can be useful when running Tapestry inside a web application that contains other servlets or filters, as a way to prevent conflicts. don't really understand, some explanations ? thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-3-Application-Folder-tp5079971p5079971.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: prototypejs is dead - time to bring t5-jquery in?
Just to add some more fire :) ,and think it's a nice idea. Found this , in here( grails 2.0.0 release ) http://grails.org/doc/latest/guide/gettingStarted.html#requirements jQuery Replaces Prototype The Protoype Javascript library has been removed from Grails core and now new Grails applications have the jQuery plugin configured by default. This will only impact you if you are using Prototype with the adaptive AJAX tags in your application, e.g. g:remoteLink/ etc, because those tags will break as soon as you upgrade. To resolve this issue, simply install thePrototype plugin http://grails.org/plugin/prototypein your application. You can also remove the prototype files from your|web-app/js/prototype|directory if you want. On Thu, 15 Dec 2011 15:17:35 -0200, trsvax trs...@gmail.com wrote: I agree about having a prototype.jar and I don't view this as a backward compatibility problem. Dependencies change from version to version anyway. It would also make it easier to create something other than jQuery if needed. The original idea is to create a framework-agnostic JavaScript layer to be used by Tapestry-provided JS code. It would be implemented in Prototype and jQuery out-of-the-box and anyone could provide your own implementation too. This way, there's no useless code in either option. -- *Jose Luis Sanchez* Senior Developer *E-mail*: joseluis.sanc...@m-centric.com *Phone* : +34 91 277 03 16 mCentric mobilising imagination c/ Jose Echegaray, 8 Building 3 28230 Las Rozas (Madrid). SPAIN. This message may contain confidential information or privileged material, and is intended only for the individual(s) named. If you are not in the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: prototypejs is dead - time to bring t5-jquery in?
Hi All, The most important consideration in this debate imho is backwards compatibility. Some companies have tens of thousands of lines of Tapestry code, so are heavily invested. Whilst removing prototype is probably a good idea, Tapestry must maintain legacy support for prototype, at least as an optional inclusion going forward. Not doing so will alienate many, not a mistake worth repeating. This is why the 5.4 planned JavaScript abstraction layer is a great idea. regards, Peter - Original Message - From: Jose Luis Sanchez joseluis.sanc...@m-centric.com To: Tapestry users users@tapestry.apache.org Sent: Friday, 16 December, 2011 1:41:32 PM Subject: Re: prototypejs is dead - time to bring t5-jquery in? Just to add some more fire :) ,and think it's a nice idea. Found this , in here( grails 2.0.0 release ) http://grails.org/doc/latest/guide/gettingStarted.html#requirements jQuery Replaces Prototype The Protoype Javascript library has been removed from Grails core and now new Grails applications have the jQuery plugin configured by default. This will only impact you if you are using Prototype with the adaptive AJAX tags in your application, e.g. g:remoteLink/ etc, because those tags will break as soon as you upgrade. To resolve this issue, simply install thePrototype plugin http://grails.org/plugin/prototypein your application. You can also remove the prototype files from your|web-app/js/prototype|directory if you want. On Thu, 15 Dec 2011 15:17:35 -0200, trsvax trs...@gmail.com wrote: I agree about having a prototype.jar and I don't view this as a backward compatibility problem. Dependencies change from version to version anyway. It would also make it easier to create something other than jQuery if needed. The original idea is to create a framework-agnostic JavaScript layer to be used by Tapestry-provided JS code. It would be implemented in Prototype and jQuery out-of-the-box and anyone could provide your own implementation too. This way, there's no useless code in either option. -- *Jose Luis Sanchez* Senior Developer *E-mail*: joseluis.sanc...@m-centric.com *Phone* : +34 91 277 03 16 mCentric mobilising imagination c/ Jose Echegaray, 8 Building 3 28230 Las Rozas (Madrid). SPAIN. This message may contain confidential information or privileged material, and is intended only for the individual(s) named. If you are not in the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: prototypejs is dead - time to bring t5-jquery in?
javascript abstraction layer +1, I guess it also sounds like the way of making things right, which is what tapestry rings a bell for me... cheers Nicolás.-
Re: PageTester can't init JPAModule when run mvn test
The message No PersistenceProvider implementation available in the runtime environment. means that no JPA implementor like EclipseLink is not available on the classpath. On Fri, Dec 16, 2011 at 10:50 AM, Bo Gao eli...@gmail.com wrote: Hi, How can I test my services using TestNG? I use PageTester to start tapestry and call getService to get my service instance. This works when I run in a main function. But I write some test class use TestNG, when I call mvn test in shell. I get the following Exceptions. No PersistenceProvider implementation available in the runtime environment. -- Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: Operations trace: Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 1] Realizing service RegistryStartup Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 2] Instantiating service RegistryStartup implementation via org.apache.tapestry5.ioc.internal.services.RegistryStartup(Logger, List) (at RegistryStartup.java:36) via org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:49) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 3] Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.RegistryStartup via public org.apache.tapestry5.ioc.internal.services.RegistryStartup(org.slf4j.Logger,java.util.List) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 4] Determining injection value for parameter #2 (java.util.List) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 5] Collecting ordered configuration for service RegistryStartup Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.OperationTrackerImpl log SEVERE: [ 6] Invoking org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean) (at JpaModule.java:183) Dec 16, 2011 5:29:46 PM org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper createObject SEVERE: Construction of service RegistryStartup failed: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. org.apache.tapestry5.ioc.internal.OperationException: Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): No PersistenceProvider implementation available in the runtime environment. at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:47) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76) at org.apache.tapestry5.ioc.internal.RegistryImpl.addToOrderedConfiguration(RegistryImpl.java:626) at org.apache.tapestry5.ioc.internal.RegistryImpl.getOrderedConfiguration(RegistryImpl.java:480) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:110) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$2.invoke(ServiceResourcesImpl.java:107) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.getOrderedConfiguration(ServiceResourcesImpl.java:105) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator.getOrderedConfiguration(AbstractServiceCreator.java:123) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator.access$200(AbstractServiceCreator.java:35) at org.apache.tapestry5.ioc.internal.AbstractServiceCreator$1.findResource(AbstractServiceCreator.java:103) at org.apache.tapestry5.ioc.internal.util.DelegatingInjectionResources.findResource(DelegatingInjectionResources.java:38) at org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:219) at org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:49) at
Re: Race condition in T5-pubsub?
Or t5-pub-sub should do a copy-on-write, rather than copying it for each iteration. I miss Clojure collections! On Thu, Dec 15, 2011 at 3:37 AM, Jochen Berger foober...@googlemail.com wrote: Hi again, I think I was wrong with the term race condition. After some investigation I found out what causes the problem. I created a simple demo application that I can upload I you want me to. Basically, the problem occurs, when there are multiple subscribers for the same topic and one of them changes the subscriptions (e.g. by unsubscribing) for the topic while the publisher function runs. That will lead to the listener cache being cleared and publisher.listeners being undefined upon the next iteration of the for loop. I think this could be fixed by iterating over a clone of publisher.listeners instead of publisher.listeners itself. Of course that would mean that if one listener unsubscribes other listeners while running, those would be notified for the current run anyway. Any thoughts on that? Jochen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.3 Application Folder ?
I had some clients who wanted to run their T4 app side-by-side with their T5 app. The application folder means that all URLs can be prefixed with /t5 (or whatever you like). It's a minor thing that gets into a lot of little places. On Fri, Dec 16, 2011 at 2:50 AM, angelochen angelochen...@yahoo.com.hk wrote: One of new features in 5.3 is: Application Folder Tapestry can now be configured to execute inside a folder, which can be useful when running Tapestry inside a web application that contains other servlets or filters, as a way to prevent conflicts. don't really understand, some explanations ? thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-3-Application-Folder-tp5079971p5079971.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 -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: prototypejs is dead - time to bring t5-jquery in?
I'm not for anything breaking backward compatibility and I'm not interesting in Tapestry 6, version 5 is fine by me. I've been using Tapestry since 3.0 and I've got some Tapestry 4 code and some 5.2 Prototype code now. I'm also running 5.3 with the Tapestry5-jQuery library. But IMHO another abstraction layer is a really bad idea. There is a ton of documentation on Prototype and jQuery but none on the Tapestry Javascript abstraction layer. Secondly like it or not at this point in time jQuery is more popular that Prototype. I think trying to maintain parity between the jQuery enhanced components and the Prototype enhanced components would only serve to limit the number of jQuery components and thus Tapestry components. Lastly I think the correct abstraction layer already exists and that's mixin. I think all the Javascript behavior should be added via mixins. With that approach it should be easy enough to have a jQuery and a Prototype project where the mixins add the Javascript functionality instead of building it into the component. If mixins prove inadequate for the task then the focus should be on improving them not trying to create two identical sets of components one with jQuery and the other with Prototype. One more thing: You should be able to include both libraries and have things work. Otherwise I'd say you do have a backward compatibility problem that will leave the Prototype crowd (me included) orphaned. This would allow existing users to keep doing what they are doing. It would also allow them to include jQuery and get additional components only supported by jQuery and keep using thier existing Prototype code. It would allow new projects to be jQuery only. Lastly and perhaps most important it lessens the learning curve to integrate Tapestry and Javascript because you don't need to learn yet another Javascript abstraction layer that runs on top of yet another Javascript abstraction layer. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: prototypejs is dead - time to bring t5-jquery in?
On Fri, 16 Dec 2011 16:01:31 -0200, Barry Books trs...@gmail.com wrote: But IMHO another abstraction layer is a really bad idea. There is a ton of documentation on Prototype and jQuery but none on the Tapestry Javascript abstraction layer. I think the abstraction layer is for Tapestry itself and for people who want to implement Tapestry's own JS code (Zone, Autocomplete, etc) in different JS frameworks, not for developers using Tapestry, which would use their chosen JS framework directly. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Creating custom service using build() failed
Hi I have probably some small problem but I can not figure it out. According to documentation it should work but it is not. I have defined some servervice using public static void bind(ServiceBinder binder) { binder.bind(StudioService.class, StudioServiceHibernate.class); binder.bind(ProjectService.class, ProjectServiceHibernate.class); } after that I have defined the one service using build() method public static DataGenerator buildDataGenerator() { return new DummyDataGenerator(); } I will later make this method complicated based on some condition it will create service using DummyDataGenerator or NoDataGenerator. Also I have add the initialization database mathod like so @Startup public static void initApplicationData(DataGenerator dataGenerator) { dataGenerator.generate(); } This line dataGenerator.generate(); throws a NullPointerException What am I missing. Thank you in advance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081119.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: Creating custom service using build() failed
On Fri, 16 Dec 2011 17:08:43 -0200, bhorvat horvat.z.bo...@gmail.com wrote: Hi Hi! This line dataGenerator.generate(); throws a NullPointerException Full stack trace please. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Creating custom service using build() failed
On that line I have studioService.save(tempStudio); DummyDataGenerator generated the dummy code for the database and it doing so using the service that are defined in the bind method. Is it possible that the services are are not defined? When I put in the bind method binder.bind(DataGenerator.class, DummyDataGenerator.class); and remove the custom builDataGenerator method all works as it should be -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081312.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: Creating custom service using build() failed
On Fri, 16 Dec 2011 18:15:29 -0200, bhorvat horvat.z.bo...@gmail.com wrote: On that line I have studioService.save(tempStudio); So the problem is there. ;) Make sure studioService isn't null. Please post the full class here. DummyDataGenerator generated the dummy code for the database and it doing so using the service that are defined in the bind method. Is it possible that the services are are not defined? Please post the classes sources here. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Creating custom service using build() failed
The service is just a hibernate service that saves data to the database. public class StudioServiceHibernate implements StudioService { private final Session session; public StudioServiceHibernate(Session session) { this.session = session; } public Studio save(Studio studio) { return (Studio) session.get(Studio.class, session.save(studio)); } } I was looking at the execution order. First it executes the bind method which binds all the services including binder.bind(StudioService.class, StudioServiceHibernate.class); After that it give control to the @Startup public static void initApplicationData(DataGenerator dataGenerator) { dataGenerator.generate(); } which should fill in the database. Since the DataGenerator is created with the build method it then triggers this method public static DataGenerator buildDataGenerator() { return new DummyDataGenerator(); } Which creates generator and then starts to generate the method. Inside it are the services for filling the database like StudioService which is injected into the Generator class. However for some reason it is as if the bind method didn't bind the StudioService to its implementation. When I remove the buildDataGenerator and manually bind it inside the bind method all is ok. But when I put it in special method it is not. What am I missing? Idea? Thx for trying to help -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081462.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: Creating custom service using build() failed
I solved or at very least I am aware how to bypass the problem. It seems that the services can not be injected into the DummyDataGenerator if I create it using the build method but if I create it in the bind it can inject the service. The only problem is that I have about 20 service so can you imagine the argument list :( Any idea if it possible to solve this in a cleaner way because now I will have to modify argument list every time I want to add or remove service. Thank you for assistance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081570.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
Accessing symbols from system properties
I am trying to access the symbol properties that are defined when starting the application using maven like so configuration systemProperties systemProperty namehibernate.configuration/name valuedbt.cfg.xml/value /systemProperty systemProperty nametapestry.production-mode/name valuefalse}/value /systemProperty /systemProperties /configuration If I try to access the property that is standard to tapestry like tapestry.production-mode using the instructions http://tapestry.apache.org/symbols.html http://tapestry.apache.org/symbols.html like this @Value(${tapestry.production-mode}) boolean productionMode it works fine but if try to access the non tapestry property in the same manner it is not working and it should according to the link SystemProperties Provider The first provider allows JVM System Properties to provide symbol values. This allows the use of the java command's -D option to provide runtime overrides. This is most often used when testing code, rather than in production. SystemProperties is always checked first. How can I access the property from the SystemProperties. Any idea? Thank you and sorry for all the questions today :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Accessing-symbols-from-system-properties-tp5081589p5081589.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
Choosing hibernate configuration
This is my third question and the final one I promise :) I know that I can add more hibernate configuration to the application like this public void contributeHibernateSessionSource(OrderedConfigurationHibernateConfigurer conf) { conf.add(Default, new HibernateConfigurer() { public void configure(org.hibernate.cfg.Configuration configuration) { configuration.configure(hibernate.xml); } }); } but this sometimes throw an error 'hibernate.dialect' must be set when no Connection available from what I read at the internet it is because the tapestry is trying to use its default file hibernate.cfg.xml I have also set configuration.add(tapestry.hibernate.default-configuration, false); but it is not working. I still get this error on some occasions Since I can add more configuration to the OrderdConfiguration how can I tell tapestry which one to take? Thank you for assistance. Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Choosing-hibernate-configuration-tp5081667p5081667.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: Choosing hibernate configuration
If you set HibernateConstants.DEFAULT_CONFIGURATION to true(which it is by default), then org.hibernate.cfg.Configuration#configure() is called, which tries to look for hibernate.xml in the classpath. If it is not able to find the file, this exception is thrown. If you set this Symbol to false, you have to call the configure() yourself and still in that case, if the file is not found the same error will be thrown. In short this exception is thrown 1) it can't find your hibernate.xml 2) you have actually not configured your 'hibernate-dialect' :) Also, if you add multiple HibernateConfigurers, each one of them will be called to configure the same SessionFactory (in the order specified) regards Taha On Dec 17, 2011, at 4:09 AM, bhorvat wrote: This is my third question and the final one I promise :) I know that I can add more hibernate configuration to the application like this public void contributeHibernateSessionSource(OrderedConfigurationHibernateConfigurer conf) { conf.add(Default, new HibernateConfigurer() { public void configure(org.hibernate.cfg.Configuration configuration) { configuration.configure(hibernate.xml); } }); } but this sometimes throw an error 'hibernate.dialect' must be set when no Connection available from what I read at the internet it is because the tapestry is trying to use its default file hibernate.cfg.xml I have also set configuration.add(tapestry.hibernate.default-configuration, false); but it is not working. I still get this error on some occasions Since I can add more configuration to the OrderdConfiguration how can I tell tapestry which one to take? Thank you for assistance. Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Choosing-hibernate-configuration-tp5081667p5081667.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Accessing symbols from system properties
I don't think if can differentiate between a standard property Are you sure it is picking up your configuration. This might help http://stackoverflow.com/questions/3231797/specify-system-property-to-maven-project regards Taha On Dec 17, 2011, at 3:41 AM, bhorvat wrote: I am trying to access the symbol properties that are defined when starting the application using maven like so configuration systemProperties systemProperty namehibernate.configuration/name valuedbt.cfg.xml/value /systemProperty systemProperty nametapestry.production-mode/name valuefalse}/value /systemProperty /systemProperties /configuration If I try to access the property that is standard to tapestry like tapestry.production-mode using the instructions http://tapestry.apache.org/symbols.html http://tapestry.apache.org/symbols.html like this @Value(${tapestry.production-mode}) boolean productionMode it works fine but if try to access the non tapestry property in the same manner it is not working and it should according to the link SystemProperties Provider The first provider allows JVM System Properties to provide symbol values. This allows the use of the java command's -D option to provide runtime overrides. This is most often used when testing code, rather than in production. SystemProperties is always checked first. How can I access the property from the SystemProperties. Any idea? Thank you and sorry for all the questions today :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Accessing-symbols-from-system-properties-tp5081589p5081589.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: Creating custom service using build() failed
Instead of public static DataGenerator buildDataGenerator() { return new DummyDataGenerator(); } try public static DataGenerator buildDataGenerator(ObjectLocator locator) { return locator.autobuild(DummyDataGenerator.class); } When you use new DummyDataGenerator(), @Inject won't work regards Taha On Dec 17, 2011, at 3:33 AM, bhorvat wrote: I solved or at very least I am aware how to bypass the problem. It seems that the services can not be injected into the DummyDataGenerator if I create it using the build method but if I create it in the bind it can inject the service. The only problem is that I have about 20 service so can you imagine the argument list :( Any idea if it possible to solve this in a cleaner way because now I will have to modify argument list every time I want to add or remove service. Thank you for assistance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081570.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Creating custom service using build() failed
Perfect, worked like a charm. Thanks a million. Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-custom-service-using-build-failed-tp5081119p5081860.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: Accessing symbols from system properties
Now it is working fine, maybe I have misspelled the property before. I am using it like this as a parameter of the method (maybe that is the point), before I have used it as a property of the class @Value(${hibernate.configuration}) final String configFile Anyway thanks for help -- View this message in context: http://tapestry.1045711.n5.nabble.com/Accessing-symbols-from-system-properties-tp5081589p5081871.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: Choosing hibernate configuration
Hm...That is pretty much what I thought. However it is acting a bit differently. I did set the property to full. But the system logged (whens starting up) was showing that the duplicate config file Default exists and that it will be ignored. Also for some reason on some occasions it would go fine and on others it would throw that exception Eventually I have changed the name from Default to HibernateConfig and it stop throwing errors. So probably even though I have set it to false the system was still complaining for using the same name. One question if I add more configurations this way. Which one will be used? The last one? Thanks for help -- View this message in context: http://tapestry.1045711.n5.nabble.com/Choosing-hibernate-configuration-tp5081667p5081908.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: Choosing hibernate configuration
I think the problem is the naming. Default already exists so you should name it something else, otherwise it will use the one loaded first and so sometimes you will see it working correctly(as your configuration is being used) and sometimes it wont (when it uses the DefaultConfigurer from HibernateCoreModule and as DEFAULT_CONFIGURATION is set to false, it will not load hibernate.xml and so no dialect). So the solution is to name it something else. Then it will load both and as DEFAULT_CONFIGURATION=false, your configuration will be used. If you have multiple configurations(with different names/ids) all will be used in the order specified regards Taha On Dec 17, 2011, at 8:02 AM, bhorvat wrote: Hm...That is pretty much what I thought. However it is acting a bit differently. I did set the property to full. But the system logged (whens starting up) was showing that the duplicate config file Default exists and that it will be ignored. Also for some reason on some occasions it would go fine and on others it would throw that exception Eventually I have changed the name from Default to HibernateConfig and it stop throwing errors. So probably even though I have set it to false the system was still complaining for using the same name. One question if I add more configurations this way. Which one will be used? The last one? Thanks for help -- View this message in context: http://tapestry.1045711.n5.nabble.com/Choosing-hibernate-configuration-tp5081667p5081908.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
shiro
I wrote this following code to restrict the user from accessing certain pages. Problem is it isn't working correctly. configuration.add(factory.createChain(/index).add(factory.authc()).build()); I wrote this code so that only authorized user view the page, But in my program everyone can view. configuration.add(factory.createChain(/medicine/**).add(factory.roles(), employee).build()); configuration.add(factory.createChain(/medicine/**).add(factory.roles(), doctor).build()); With this code employee cannot access tml file of medicine folder but doctor can. Why is this so? public static void contributeSecurityConfiguration(ConfigurationSecurityFilterChain configuration, SecurityFilterChainFactory factory) { configuration.add(factory.createChain(/signin).add(factory.anon()).build()); configuration.add(factory.createChain(/index).add(factory.authc()).build()); configuration.add(factory.createChain(/medicine/**).add(factory.roles(), employee).build()); configuration.add(factory.createChain(/prescription/**).add(factory.roles(), doctor).build()); configuration.add(factory.createChain(/medicine/**).add(factory.roles(), doctor).build()); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/shiro-tp5082018p5082018.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: template refresh in development
so from idea cmd-9 did nothing for me (neither did the use of the menu option of cmd-9. Again running with parameters for prod mode set to false. Kalle, could you recommend the magic incarnation for tweaking jetty:run plugin to fix the path so that it will look at the resource tree rather than target (tried scan target). My preference is to tweak idea since I don't natively use jetty:run as my way of running things but I don't see an obvious way to point to my resource tree…is this something I can hack in intellij or should I be tweaking a web.xml parameter? Howard ironically I moved to mvn from a shitty ant build based upon how cool tapestry was using mvn….eerrr just as you moved to gradle. I would be happy to move to gradle but since its not free to magically migrate I won't be doing that any time soon (perhaps you could do a blog on your experience migrating tapestry from mvn to gradle to help poor people like me who are too scared of change :-} ). Best C On Dec 14, 2011, at 12:28 PM, Kalle Korhonen wrote: On Wed, Dec 14, 2011 at 12:24 PM, Howard Lewis Ship hls...@gmail.com wrote: IntelliJ requires that you rebuild (Cmd-F9) after making a change for it to be visible. I use the built-in Jetty support. When using mvn jetty:run, the problem is that the directories that the Jetty instance see contains copies of the files from your workspace; changing them and rebuilding does not copy them to that directory, so you don't see the changes. Don't use Maven. It's unrelated to Maven. Whether you use Maven or not, configure your build environment so the templates are not copied and Jetty picks up the templates from the source directory. Kalle On Wed, Dec 14, 2011 at 12:16 PM, Chris Collins chris...@me.com wrote: I tried a few ways. I have tried editing tml files both from vi and from intellij. I have also run the archetype demo from mvn jetty:run (so I was not even running through an intellij debug session). I even put a little logic in a page to test if I was in production mode or not (I was not). So basically I tried my own app and then I went back to basics and tried the demo app that you can create via mvn archetype C On Dec 14, 2011, at 12:13 PM, Howard Lewis Ship wrote: On Wed, Dec 14, 2011 at 12:05 PM, Chris Collins chris...@me.com wrote: Never got any takers on this. Any tips from any of the wise elders? Also what is the functionally equiv of Blackbird since it was taken out of 5.3? It should just work. What IDE are you using? How are you running the application. Basically, if Tapestry can't see the updated files, it can't make them referesh. No configuration should be necessary, besides ensuring that the application is running in development mode (not production mode). The Tapestry Quickstart archetype sets this up for you. In terms of blackbrird ... that's gone, and the replacement is to use the native console (if present), and to use floating divs when there is no native console. C On Dec 11, 2011, at 9:47 PM, Chris Collins wrote: Ok, another dumb question from Chris. How do you make template refreshes work at least in dev mode? I am specifically setting: configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, 1 s); configuration.add(SymbolConstants.PRODUCTION_MODE, false); Perhaps thats my error. I then start my app and fetch a page. change the content (just a simple spelling change). Wait a few seconds. Refresh. No change in the output. I even tried this experiment with the tapestry archetype demo app using mvn jetty:run target. C - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - 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 of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org