Re: [T5.1] Log4j and Application Development/Production Mode
Just put your log4j.properties into src/test/resources. This way the config file will be on the classpath of the dev environment and is not shipped inside the war. In production put the config file into the container. 18.02.2010, в 19:13, Everton Agner everton_ag...@yahoo.com.br написал(а): Hi, There is any T5 Elegant way so I can automatically switch between distincts Log4J configurations related to Development/Production Mode? We have the @Symbol productionMode, so I believe there is some way I can achieve that using this information... I saw something like that on an old Struts 1.3 application, so there was a log4j.properties file on the project and, on the Deployment Server, other log4j.properties (and some weird conf to make it works). So, I could work on DEBUG mode on the Development environment, and in ERROR mode on Deployment environment without having to change. I don't want to do that here, though... Any help would be appreciated. Thanks! Everton Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: exceptions sometimes are omitted completely
hi, can you post some code. i guess you are in tapestry production mode g, kris Yury Luneff bitter...@ya.ru 19.02.2010 04:42 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema exceptions sometimes are omitted completely Hello! I'm fighting with my app for features now. There is a problem about valueencoders and such and i guess this problem should report as any kind of exception - either the beautiful one done by tapestry or at least stacktrace in log window. But tapestry chooses neither. Just empty page and that's all. Sometime ago this also happened a lot - one mistake in property binding and you get the right exception sometimes, but sometimes you get completely nothing. Debug in log4j doesn't quite help here. Did anyone meet that behavior? It is very unpleasant to debug something with empty pages and no exceptions (log4j, btw, is set for error level as default which should do exceptions). - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Log4j and Application Development/Production Mode
There is any T5 Elegant way so I can automatically switch between distincts Log4J configurations Yes, I simply place mine side by side in src/main/resources and then just supply a JVM argument to choose the correct one in production, i.e.: -Dlog4j.configuration=log4j_prod.xml if you supply none the default will be log4j.properties / log4j.xml regards, Peter - Original Message - From: Igor Drobiazko igor.drobia...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Friday, 19 February, 2010 10:10:50 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [T5.1] Log4j and Application Development/Production Mode Just put your log4j.properties into src/test/resources. This way the config file will be on the classpath of the dev environment and is not shipped inside the war. In production put the config file into the container. 18.02.2010, в 19:13, Everton Agner everton_ag...@yahoo.com.br написал(а): Hi, There is any T5 Elegant way so I can automatically switch between distincts Log4J configurations related to Development/Production Mode? We have the @Symbol productionMode, so I believe there is some way I can achieve that using this information... I saw something like that on an old Struts 1.3 application, so there was a log4j.properties file on the project and, on the Deployment Server, other log4j.properties (and some weird conf to make it works). So, I could work on DEBUG mode on the Development environment, and in ERROR mode on Deployment environment without having to change. I don't want to do that here, though... Any help would be appreciated. Thanks! Everton Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.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: exceptions sometimes are omitted completely
configuration.add(SymbolConstants.PRODUCTION_MODE, false); so it is definetely not production mode. Actually, code posting here is difficult -- the project is large. As for now I can tell about some problems. I had t:select with model of string like 00:00,00:30,... for all the day. The binded property was of type Time (t:select value=startTime .../, java.sql.Time time. Of course, it leads to some kind of exception while the form submits. But I don't receive any of it. I change time type to String (it will work too for me) and everything is ok. But I had to guess the reason of just blank page. As I remember, even in production mode tapestry can say something about internal server error :) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: exceptions sometimes are omitted completely
right now i have exception stacktrace in log, but none on page: Caused by: java.lang.RuntimeException: Bean editor model for model does not contain a property named 'route'. Available properties: carmodel, drivername, endDate, mileage, passengersInsideVehicle, passengersTransported, registrationnumber, startDate. at org.apache.tapestry5.internal.beaneditor.BeanModelImpl.get(BeanModelImpl.java:152) at org.apache.tapestry5.internal.beaneditor.BeanModelImpl.reorder(BeanModelImpl.java:213) at org.apache.tapestry5.internal.beaneditor.BeanModelUtils.reorder(BeanModelUtils.java:100) at org.apache.tapestry5.internal.beaneditor.BeanModelUtils.modify(BeanModelUtils.java:46) at org.apache.tapestry5.corelib.components.Grid.getDataModel(Grid.java:502) at org.apache.tapestry5.corelib.components.GridColumns.setupRender(GridColumns.java:113) at org.apache.tapestry5.corelib.components.GridColumns.setupRender(GridColumns.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:184) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.run(ComponentPageElementImpl.java:164) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:933) ... 125 more [ERROR] InternalModule.PagePool Page Page[waybill/List ru] is dirty, and will be discarded (rather than returned to the page pool). i mean, it is something not quite right if tapestry doesn't do its exception reports. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: exceptions sometimes are omitted completely
maybe some kind of service catches all of your Exceptions maybe a Tapestry filter or dispatcher? obviously RuntimeExceptions make it through we also have a large T5 application and never experienced your problems. except someone added some bugs to our exception reporter :). i'd do a search for try/catch blocks and analyze them. i guess it is not a Tapestry problem. g, kris Yury Luneff bitter...@ya.ru 19.02.2010 12:03 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: exceptions sometimes are omitted completely right now i have exception stacktrace in log, but none on page: Caused by: java.lang.RuntimeException: Bean editor model for model does not contain a property named 'route'. Available properties: carmodel, drivername, endDate, mileage, passengersInsideVehicle, passengersTransported, registrationnumber, startDate. at org.apache.tapestry5.internal.beaneditor.BeanModelImpl.get(BeanModelImpl.java:152) at org.apache.tapestry5.internal.beaneditor.BeanModelImpl.reorder(BeanModelImpl.java:213) at org.apache.tapestry5.internal.beaneditor.BeanModelUtils.reorder(BeanModelUtils.java:100) at org.apache.tapestry5.internal.beaneditor.BeanModelUtils.modify(BeanModelUtils.java:46) at org.apache.tapestry5.corelib.components.Grid.getDataModel(Grid.java:502) at org.apache.tapestry5.corelib.components.GridColumns.setupRender(GridColumns.java:113) at org.apache.tapestry5.corelib.components.GridColumns.setupRender(GridColumns.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:184) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.run(ComponentPageElementImpl.java:164) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:933) ... 125 more [ERROR] InternalModule.PagePool Page Page[waybill/List ru] is dirty, and will be discarded (rather than returned to the page pool). i mean, it is something not quite right if tapestry doesn't do its exception reports. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5: logging statements logged twice using Log4j
Hi, I'm having the problem (always had as far as I remember, but it starts to bug me now) that when using Log4j with Tapestry every log-statement is logged twice to the console. For example, the last few lines before the tapestry is initialized look like this: INFO - ApplicationContext.log(646) | org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: null org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: null INFO - ApplicationContext.log(646) | org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok) INFO - Http11BaseProtocol.init(144) | Initializing Coyote HTTP/1.1 on http-8080 Initializing Coyote HTTP/1.1 on http-8080 INFO - Http11BaseProtocol.start(156) | Starting Coyote HTTP/1.1 on http-8080 Starting Coyote HTTP/1.1 on http-8080 Since the formatting of the 'duplicates' is different I figure there must somehow be a different logger at work. I already tried pluggin in the vanilla logging.properties from the tapestry 5 archetype but nothing changes. Anyone got any clue where to look? p.s: I'm running in Tomcat 5.5 does this have anything to do with it? -- View this message in context: http://n2.nabble.com/T5-logging-statements-logged-twice-using-Log4j-tp4597599p4597599.html Sent from the Tapestry Users 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: exceptions sometimes are omitted completely
maybe some kind of service catches all of your Exceptions maybe a Tapestry filter or dispatcher? obviously RuntimeExceptions make it through we have spring-security here and Timing filter from default tapestry app. we also have a large T5 application and never experienced your problems. except someone added some bugs to our exception reporter :). i'd like that too i'd do a search for try/catch blocks and analyze them. i guess it is not a Tapestry problem. nothing of that is here. at least in our code. the suspicion is to spring-security and tapestry-spring-security from nu.localhost.tapestry - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: logging statements logged twice using Log4j
set log4j.additivity.org.tuckey=false pozdrawiam Paweł Kamiński kami...@gmail.com pkaminski@gmail.com __ On 19 February 2010 13:39, britske gbr...@gmail.com wrote: Hi, I'm having the problem (always had as far as I remember, but it starts to bug me now) that when using Log4j with Tapestry every log-statement is logged twice to the console. For example, the last few lines before the tapestry is initialized look like this: INFO - ApplicationContext.log(646) | org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: null org.tuckey.web.filters.urlrewrite.utils.Log ERROR: logLevelConf: null INFO - ApplicationContext.log(646) | org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok) INFO - Http11BaseProtocol.init(144) | Initializing Coyote HTTP/1.1 on http-8080 Initializing Coyote HTTP/1.1 on http-8080 INFO - Http11BaseProtocol.start(156) | Starting Coyote HTTP/1.1 on http-8080 Starting Coyote HTTP/1.1 on http-8080 Since the formatting of the 'duplicates' is different I figure there must somehow be a different logger at work. I already tried pluggin in the vanilla logging.properties from the tapestry 5 archetype but nothing changes. Anyone got any clue where to look? p.s: I'm running in Tomcat 5.5 does this have anything to do with it? -- View this message in context: http://n2.nabble.com/T5-logging-statements-logged-twice-using-Log4j-tp4597599p4597599.html Sent from the Tapestry Users 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: Hosting Apache Tapestry5.1 on GAE (Google Application Engine)
Kalle, do you have any issues w/ static assets not being served from GAE ? I'm prepping an app to be deployed in production on GAE, and in its development state (http://zadachite-dev.appspot.com), I'm a bit discouraged : often, when the app is loaded, I often get missing assets and I have to reload the pages a few times before I get all assets showing up. Additionally, I've set up the app to be monitored by Dmitry's Ping-Service ( http://ping-service.appspot.com), and a few times a day it takes more than 10 seconds to load (and ping service times out). I've considered trying to figure out a way to deploy these assets (e.g. images, swf files, js) on a static server somewhere but that will unnecessarily complicate the app... Regards, Alex K On Thu, Feb 18, 2010 at 10:19 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: On that note, I also recently deployed Tynamo's conversation example to GAE (see http://tynamo.org/tapestry-conversations+guide and http://tapestry-conversations.tynamo.org/), it was pretty straight-forwarded. It's all mavenized and naturally, the source is available for others to look at. Kalle On Wed, Feb 17, 2010 at 7:21 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: I'd like to share my experience regarding the issue. I'm not a tapestry guru but I just fought my way through hosting it on google application engine. Here is my blogpost about hosting tapestry5.1 on Google application engine http://java-army.blogspot.com/2010/02/hosting-apache-tapestry51-on-gae-google.html You'll find the application's link it but here it is againhttp://j-army.appspot.com/ . Please note that it has absolutely NOTHING but registering, logging in and logging out ! That's as much as I've gone with tapestry so far. I had nothing in mind to do ! Enjoy :) -- Muhammad Mohsen Hussien Jr. Java Software Engineer HP Enterprise Services - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[Tapestry Central] Evolving the Meta Programming in Tapestry 5
I've set a goal of removing Javassist from Tapestry 5 and I've made some nice advances on that front. Tapestry uses Javassist inside the web framework layer to load and transform component classes. All that code is now rewritten to updated APIs that no longer directly expose Javassist technology. In other words, where in the past, the transformer code would write psuedo-Java and add it to a method using Javassist (for example adding value = null; to the containingPageDidDetach() method), Tapestry 5.2 will instead add advice to the (otherwise empty) containingPageDidDetach() method, and the advice will use a FieldAccess object to set the value field to null. Basically, I've vastly reduced the number of operations possible using the ClassTransformation API. Before, it was pretty much unbounded due to the expressive power of Javassist. Now a small set of operations exist that can be combined into any number of desired behaviors: - Add new implemented interfaces to a component Class - Add new fields to a Class - Initialize the value of a field to a fixed value, or via a per-instance callback - Delegate read and write access to a field to a provided FieldValueConduit delegate - Add new methods to a component Class with empty implementations - Add advice to any method of a class - Create a MethodAccess object from a method, to allow a method to be invoked (regardless of visibility) - Create a FieldAccess object from a field, to allow the field to be read or updated (regardless of visibility) What's amazing is that these few operations, combined in different ways, supports all the different meta-programming possible in Tapestry 5.1. There's costs and benefits to this new approach. Costs There will be many more objects associated with each component class: new objects to represent advice on methods, and new objects to provide access to private component fields and methods. Javassist could be brutally efficient, the new approach adds several layers of method invocation that was not present in 5.1. Incorrect use of method advice can corrupt or disable logic provided by the framework and is hard to debug. Benefits We can eventually switch out Javassist for a more stable, more mainstream, better supported framework such as ASM. ASM should have superior performance to Javassist (no tedious Java-ish parse and compile, just raw bytecode manipulation). The amount of generated bytecode is lower is many cases. Fewer methods and fields to accomplish the same behavior. The generated bytecode is more regular across different utilizations: fewer edge cases, less untested, generated bytecode Key logic returns to normal code space, rather than being indirectly generated into Javassist code space ... this is easier to debug as there's some place to put your breakpoints! Summary Overall, I'm pretty happy with what's been put together so far. In the long run, we'll trade instantiation of long lived objects for dynamic bytecode generation. There's much more room to create ways to optimize memory utilization and overall resource utilization and the coding model is similar (closures and callbacks vs. indirect programming via Javassist script). I'm liking it! -- Posted By Howard to Tapestry Central at 2/19/2010 05:55:00 PM
Re: Hosting Apache Tapestry5.1 on GAE (Google Application Engine)
No, I haven't had issues with static assets but then again, the current example is pretty bare bones. I've certainly noticed that GAE is dog slow though. I read about how GAE scales and it's evident in our example as well that GAE just spawns new JVMs rather the new threads for additional instance fairly often. You end up using memcache and having to optimize for GAE quite a bit. I wouldn't run a production system on GAE. The bigger issue for me is no threading - if I was satisfied with that I'd just do PHP apps. Decent hosted VMs cost less than $50/month and they are blazingly fast compared to GAE. Depending on where you live and what the system does it's not a huge cost; but fully understand the other side of it as well - can't beat free. Kalle On Fri, Feb 19, 2010 at 6:14 PM, Alex Kotchnev akoch...@gmail.com wrote: Kalle, do you have any issues w/ static assets not being served from GAE ? I'm prepping an app to be deployed in production on GAE, and in its development state (http://zadachite-dev.appspot.com), I'm a bit discouraged : often, when the app is loaded, I often get missing assets and I have to reload the pages a few times before I get all assets showing up. Additionally, I've set up the app to be monitored by Dmitry's Ping-Service ( http://ping-service.appspot.com), and a few times a day it takes more than 10 seconds to load (and ping service times out). I've considered trying to figure out a way to deploy these assets (e.g. images, swf files, js) on a static server somewhere but that will unnecessarily complicate the app... Regards, Alex K On Thu, Feb 18, 2010 at 10:19 PM, Kalle Korhonen kalle.o.korho...@gmail.com wrote: On that note, I also recently deployed Tynamo's conversation example to GAE (see http://tynamo.org/tapestry-conversations+guide and http://tapestry-conversations.tynamo.org/), it was pretty straight-forwarded. It's all mavenized and naturally, the source is available for others to look at. Kalle On Wed, Feb 17, 2010 at 7:21 AM, Muhammad Mohsen m.gelb...@gmail.com wrote: I'd like to share my experience regarding the issue. I'm not a tapestry guru but I just fought my way through hosting it on google application engine. Here is my blogpost about hosting tapestry5.1 on Google application engine http://java-army.blogspot.com/2010/02/hosting-apache-tapestry51-on-gae-google.html You'll find the application's link it but here it is againhttp://j-army.appspot.com/ . Please note that it has absolutely NOTHING but registering, logging in and logging out ! That's as much as I've gone with tapestry so far. I had nothing in mind to do ! Enjoy :) -- Muhammad Mohsen Hussien Jr. Java Software Engineer HP Enterprise Services - 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