Re: JVM Memory Errors
A few of our clients have started getting errors over the past few days that stop them from starting the ColdFusion service. The errors are: Error occurred during initialization of VM. Could not reserve enough space for object heap. java.lang.OutOfMemoryError So far the only way we have found to resolve this is to edit the jvm.config and drop the memory down from our usual setting (1024) to 768. I'm not sure where this error is coming from as these servers have 4gb minimum RAM, and all had plenty of available RAM. If it changes anything, so far only cf7 sites have been affected. These sites have been running comfortably on 1024 for many months. I've seen Windows patches that cause this sort of problem. They may prevent you from allocating that much contiguous memory at runtime. You can fix this problem by rolling back the patch in question - it should be pretty easy to look at your Windows Update log, see the patches applied, then read the patch descriptions to figure out which is the culprit - or by starting the CF service earlier, using the DependOnService key to control service startup order. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324916 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Coldbox and ColdSpring How to?
On Thu, Jul 23, 2009 at 2:59 PM, Glyn Jacksonglyn.jack...@newebia.co.uk wrote: I think I have it now in my handler... variables.oUserService = getPlugin(ioc).getBean(UserService).getUserGateway(); and i now see all common.cfc methods is this right? If it has autowire by name enabled. Otherwise you need a property tag in the userService definition to inject the userGateway bean. -- Sean A Corfield -- (904) 302-SEAN Railo Technologies US -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwoo ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324917 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Coldfusion9 ORM
Hello there, I have a question about cf9 orm. I am trying to add a postInsert() event on a persistent cfc which basically logs the action in an audit table. My code looks like this. public void function postInsert(){ //log the action Audit=entitynew('Audit'); Audit.setItem_type('Art'); Audit.setAction('create'); Audit.setDate_actioned(now()); Audit.setUser(this.getLast_actioned_by()); Audit.setPage(this); entitysave(Audit); } This does not work and and do not know why. When I dump the Audit object, it is there and looks perfect but it does not save it to the database. In the docs under 'Event Handling in CFC' it says Note: When you call the EntitySave() method on an object that is not loaded using EntityLoad(), it gets updated but the intercepter call fails. This happens because an empty map is created for the object and there is no previous data associated with it. I have no idea what this means. Does this mean that you cannot save or create another object in an event handler? Thank you in advance for any advice Gavin ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324918 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Coldbox and ColdSpring How to?
Thanks Mr Corfield, perfect. last question I promise (fingers crossed). I am just playing with ColdSpring, however maybe I am missing the point with what I have done in the example so far. this could have been all done in the init() method or I could have extended the CFC or I could have passed in the details from config CFC without ColdSpring. I could have also cached my CFC in CB or on app start. I have read the docs on ColdSpring it seems to be adding an easy to use system yes, but an extra layer to my app also. what are the benefits of working this way, am just ignorant having never used it or AOP before in CF. Any docs online you can point me to (I dont know what I would be looking for) ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324919 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Coldfusion9 ORM
Be sure to turn on event handling in Application.cfc, this.ormsettins.eventhandling = true; On Fri, Jul 24, 2009 at 4:27 AM, Gavin Stewart gavin.stew...@gmail.comwrote: Hello there, I have a question about cf9 orm. I am trying to add a postInsert() event on a persistent cfc which basically logs the action in an audit table. My code looks like this. public void function postInsert(){ //log the action Audit=entitynew('Audit'); Audit.setItem_type('Art'); Audit.setAction('create'); Audit.setDate_actioned(now()); Audit.setUser(this.getLast_actioned_by()); Audit.setPage(this); entitysave(Audit); } This does not work and and do not know why. When I dump the Audit object, it is there and looks perfect but it does not save it to the database. In the docs under 'Event Handling in CFC' it says Note: When you call the EntitySave() method on an object that is not loaded using EntityLoad(), it gets updated but the intercepter call fails. This happens because an empty map is created for the object and there is no previous data associated with it. I have no idea what this means. Does this mean that you cannot save or create another object in an event handler? Thank you in advance for any advice Gavin ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324920 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Coldfusion9 ORM
Be sure to turn on event handling in Application.cfc, this.ormsettins.eventhandling = true; I have done this and it does definatley trigger the event. I can dump out the Audit object in the event handler and I see it there. It just doesnt save to the database. There are no errors, logs or any reasons why it has not been saved to the database ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324921 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Converting Year to Integer
I am looping the records starting from the Year 2000 to current year. But some how the the CFLOOP gives me an error stating Can not convert into number I tried the following ,any idea how to fix the issue:-- cfset currYear= Year((now)) cfset currYear=int(currYear) table CFLOOP index=yearCnt from='2000' to='currYear' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop /table ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324922 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
You'll need some hash signs around that currYear variable in your cfloop: CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop Francois Levesque http://blog.critical-web.com/ On Fri, Jul 24, 2009 at 9:31 AM, N K neetukais...@gmail.com wrote: I am looping the records starting from the Year 2000 to current year. But some how the the CFLOOP gives me an error stating Can not convert into number I tried the following ,any idea how to fix the issue:-- cfset currYear= Year((now)) cfset currYear=int(currYear) table CFLOOP index=yearCnt from='2000' to='currYear' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop /table ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324923 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Converting Year to Integer
## Sign does not help either. NK You'll need some hash signs around that currYear variable in your cfloop: CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop Francois Levesque http://blog.critical-web.com/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324924 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Converting Year to Integer
Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop. Adrian -Original Message- From: N K [mailto:neetukais...@gmail.com] Sent: 24 July 2009 14:31 To: cf-talk Subject: Converting Year to Integer I am looping the records starting from the Year 2000 to current year. But some how the the CFLOOP gives me an error stating Can not convert into number I tried the following ,any idea how to fix the issue:-- cfset currYear= Year((now)) cfset currYear=int(currYear) table CFLOOP index=yearCnt from='2000' to='currYear' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop /table ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324925 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Coldfusion9 ORM
1) Are you sure you are looking at the correct data source? 2) Have you run a trace on the database while the page execute to confirm if _any_ SQL is being run? ~Brad Original Message Subject: Re: Coldfusion9 ORM From: Gavin Stewart gavin.stew...@gmail.com Date: Fri, July 24, 2009 6:44 am To: cf-talk cf-talk@houseoffusion.com Be sure to turn on event handling in Application.cfc, this.ormsettins.eventhandling = true; I have done this and it does definatley trigger the event. I can dump out the Audit object in the event handler and I see it there. It just doesnt save to the database. There are no errors, logs or any reasons why it has not been saved to the database ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324926 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The value of the TO attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers, strings, and date-time values. Thank You NK Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop. Adrian ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324927 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
cfset currYear= Year((now())) cfset currYear=int(currYear) CFLOOP index=yearCnt from='2000' to='#currYear#' tr tdCFOUTPUT#yearCnt#/CFOUTPUT/td /tr /cfloop is working fine on my end. If you're still getting an error there must be a typo somewhere. Francois Levesque http://blog.critical-web.com/ On Fri, Jul 24, 2009 at 9:47 AM, N K neetukais...@gmail.com wrote: Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The value of the TO attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers, strings, and date-time values. Thank You NK Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop. Adrian ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324928 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
Have you tried outputing your currYear variable, to make sure it is what you expect? On Fri, Jul 24, 2009 at 9:47 AM, N K neetukais...@gmail.com wrote: Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The value of the TO attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers, strings, and date-time values. Thank You NK Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop. Adrian ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324929 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Coldfusion9 ORM
1) Are you sure you are looking at the correct data source? 2) Have you run a trace on the database while the page execute to confirm if _any_ SQL is being run? 1) Yes as far as i know you can only use one data source in orm. 2) The insert statement gets executed in the object but the Audit object does not get saved on the postInsert() event. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324930 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Converting Year to Integer
And failing that, post all your code... -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: 24 July 2009 14:56 To: cf-talk Subject: Re: Converting Year to Integer Have you tried outputing your currYear variable, to make sure it is what you expect? On Fri, Jul 24, 2009 at 9:47 AM, N K neetukais...@gmail.com wrote: Yes thats a typo in my email.Adding ## sign does not help The error coming up is Attribute validation error for the CFLOOP tag. The value of the TO attribute is invalid. The value cannot be converted to a numeric because it is not a simple value.Simple values are booleans, numbers, strings, and date-time values. Thank You NK Is Year((now)) a typo in your email? If not, try Year(Now()) and you will need the #'s in the to attribute of cfloop. Adrian ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324931 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
Yes thats a typo in my email.Adding ## sign does not help you need to remove the quotes araound 2000 ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324932 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP index=yearCnt from='2000' to='currYear' ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324933 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
Solved , finally works , not sure what was wrong though. NK Have you tried outputing your currYear variable, to make sure it is what you expect? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324934 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
currYear with out codes and inside ## sign WORKS !!! CFLOOP index=yearCnt from='2000' to=#currYear# NK simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP index=yearCnt from='2000' to='currYear' ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324935 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JVM Memory Errors
I guess more information is needed. What OS, 32 or 64 bit? Which JVM version are you running? What are your other JVM config settings? Have you read any of the very helpful blog posts on tuning the JVM? http://www.trunkful.com/index.cfm/JVM-Tuning http://www.cfwhisperer.com/post.cfm/blog-posts-on-clustering-tuning-and-database-design http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance.html Wil Genovese Sr. Web Application Developer On Thu, Jul 23, 2009 at 11:42 PM, Callum McLardy call...@tassweb.com.auwrote: and all had plenty of ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324936 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JVM Memory Errors
You should probably post the contents of the JVM.config file. What has changed recently? -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Wil Genovese [mailto:jugg...@visi.com] Sent: Friday, July 24, 2009 9:18 AM To: cf-talk Subject: Re: JVM Memory Errors I guess more information is needed. What OS, 32 or 64 bit? Which JVM version are you running? What are your other JVM config settings? Have you read any of the very helpful blog posts on tuning the JVM? http://www.trunkful.com/index.cfm/JVM-Tuning http://www.cfwhisperer.com/post.cfm/blog-posts-on-clustering-tuning-and-data base-design http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance.html Wil Genovese Sr. Web Application Developer On Thu, Jul 23, 2009 at 11:42 PM, Callum McLardy call...@tassweb.com.auwrote: and all had plenty of ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324937 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Converting Year to Integer
Right but something else is wrong. Azadi's example is about as simple as it gets. Something else in your code is causing the problem. -Original Message- From: N K [mailto:neetukais...@gmail.com] Sent: 24 July 2009 15:09 To: cf-talk Subject: Re: Converting Year to Integer currYear with out codes and inside ## sign WORKS !!! CFLOOP index=yearCnt from='2000' to=#currYear# NK simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP index=yearCnt from='2000' to='currYear' ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324938 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Converting Year to Integer
Try this: CFLOOP index=yearCnt from='2000' to='#currYear#' -Original Message- From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk] Sent: Friday, July 24, 2009 9:44 AM To: cf-talk Subject: RE: Converting Year to Integer Right but something else is wrong. Azadi's example is about as simple as it gets. Something else in your code is causing the problem. -Original Message- From: N K [mailto:neetukais...@gmail.com] Sent: 24 July 2009 15:09 To: cf-talk Subject: Re: Converting Year to Integer currYear with out codes and inside ## sign WORKS !!! CFLOOP index=yearCnt from='2000' to=#currYear# NK simple CFLOOP index=yearCnt from='2000' to='#year(now())#' should work just fine. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 21:31, N K wrote: CFLOOP index=yearCnt from='2000' to='currYear' ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324939 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
This is the who;e code which I had to do in order for it work cfset currYear= Year(now()) cfset currYear=int(currYear) cfoutputcfset currYear=#currYear#/cfoutput CFLOOP index=yearCnt from='2000' to=#currYear# !---Query /CFLOOP And I do understand that every thing else listed on this post should work but only the above worked and am using CF8. NK Try this: CFLOOP index=yearCnt from='2000' to='#currYear#' Right but something else is wrong. Azadi's example is about as simple as it gets. Something else in your code is causing the problem. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324940 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
1) year(now()) returns an integer - there is no need to call int() function on it. 2) the cfoutput... line in your code is totally useless and unnecessary. 3) is this code of yours in a cfm page or in a cfc function? 4) again, the simple cfloop from=2000 to=#year(now())# index=yearCnt ALWAYS works. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 23:23, N K wrote: This is the who;e code which I had to do in order for it work cfset currYear= Year(now()) cfset currYear=int(currYear) cfoutputcfset currYear=#currYear#/cfoutput CFLOOP index=yearCnt from='2000' to=#currYear# !---Query /CFLOOP And I do understand that every thing else listed on this post should work but only the above worked and am using CF8. NK Try this: CFLOOP index=yearCnt from='2000' to='#currYear#' Right but something else is wrong. Azadi's example is about as simple as it gets. Something else in your code is causing the problem. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324941 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Long running ColdFusion process and JVM Garbage collection.
You can run Garbage Collection like this: cfset runtime = CreateObject(java, java.lang.Runtime).getRuntime() cfset runtime.gc() YMMV ~Brad Is there anyway to encourage a ColdFusion server to run garbage collection during a long running, memory intensive process? Does this run Garbage Collection for the whole coldfusion server? This doesn't sound like a good idea but I am going to ask, What would the ramifications be of putting that code in a scheduled task and running it every so often? I think I read before that too much garbage collection could slow things down. Randy ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324942 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFregistry and creating a branch
Hi, I'm wondering if cfregistry under cf8 is able to create a branch with its set method, I tried, it does not seem to be able to do that, or was I not doing it right? Thanks. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324943 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Anyone here good with Event Gateways?
I'm having issues with a directory watcher event gateway. I just tried uploading 10 files to a server via FTP. The first and the last file were noticed and handled. The 2-9 files were ignored. Any idea why and how I should handle this? I have the interval set to 500. Should I try a longer amount of time? Thanks Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324944 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Long running ColdFusion process and JVM Garbage collection.
Does this run Garbage Collection for the whole coldfusion server? Yes. This doesn't sound like a good idea but I am going to ask, What would the ramifications be of putting that code in a scheduled task and running it every so often? I think I read before that too much garbage collection could slow things down. There are so many variables in play here that you can't get a single definitive answer. In general, though, garbage collection can both be resource-intensive and can cause other tasks to wait. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more informatio ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324945 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Long running ColdFusion process and JVM Garbage collection.
Because Garbage Collection can be resource intensive is why there are different types of GC methods and many settings for each. It's best to research the GC types and experiment with the ones that make the most sense for your hardware and CF Applications. I provide a cursory description of GC in this blog post, but I have links in there to the heavy hitting docs by Sun. http://www.trunkful.com/index.cfm/2008/11/25/How-to-Tune-the-JVM-Part-2 Wil Genovese Sr. Web Application Developer On Fri, Jul 24, 2009 at 12:22 PM, Dave Watts dwa...@figleaf.com wrote: Does this run Garbage Collection for the whole coldfusion server? Yes. This doesn't sound like a good idea but I am going to ask, What would the ramifications be of putting that code in a scheduled task and running it every so often? I think I read before that too much garbage collection could slow things down. There are so many variables in play here that you can't get a single definitive answer. In general, though, garbage collection can both be resource-intensive and can cause other tasks to wait. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more informatio ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324946 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Converting Year to Integer
The whole idea of not using to=#year(now())# and declaring it is because the currYear variable is used at more than one place. So if the variable is set used CFSET then there are couple of modifications required. NK 1) year(now()) returns an integer - there is no need to call int() function on it. 2) the cfoutput... line in your code is totally useless and unnecessary. 3) is this code of yours in a cfm page or in a cfc function? 4) again, the simple cfloop from=2000 to=#year(now())# index=yearCnt ALWAYS works. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 24/07/2009 23:23, N K wrote: ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324947 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
FW: Calling .ASPX.VB from .CFM
I figured out a way and will try to explain below so others can try to benefit from it. I needed to call a .NET web service passing it a complex structure of data. It would then in turn return a complex object that had the search results for room availability. I then had to do alot of CFDUMPS of my returned object until I found how to parse through the XML. == cfscript // create credentials object CheckAvailabilityR.Credentials = StructNew(); CheckAvailabilityR.Credentials.LogonID = IRMTest; CheckAvailabilityR.Credentials.Password = **; CheckAvailabilityR.Credentials.DataPath = **; CheckAvailabilityR.Credentials.DatabaseID = #attributes.databaseID#; // create availability obnject CheckAvailabilityR.AvailabilityRequest = StructNew(); CheckAvailabilityR.AvailabilityRequest.ArrivalDate = #dateFormat(attributes.arrivalDate, -mm-dd)#; CheckAvailabilityR.AvailabilityRequest.DepartureDate = #dateFormat(attributes.departureDate, -mm-dd)#; CheckAvailabilityR.AvailabilityRequest.RoomType = #attributes.roomType#; CheckAvailabilityR.AvailabilityRequest.People1 = #attributes.numAdults#; CheckAvailabilityR.AvailabilityRequest.People2 = 0; CheckAvailabilityR.AvailabilityRequest.People3 = 0; CheckAvailabilityR.AvailabilityRequest.People4 = 0; // create the web service irm = CreateObject(webservice, http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;); // pass the checkAvailability object to the services CheckAvailability method CheckAvailabilityRQ = irm.checkAvailability(CheckAvailabilityR); // get the status of the result status = CheckAvailabilityRQ.getStatus(); statusText = status.getValue(); // call the get inventory method inv = CheckAvailabilityRQ.getInventory(); // get the raw data from the result invData = inv.get_any(); // create new structure to hold raw data dataset = StructNew(); // load resulting data into new structure dataset = invData; // parse raw data from MS diffgram and parse the XML rawRoomData = xmlParse(dataset[2]); // grab array of room records roomResults = rawRoomData[diffgr:diffgram][inventory].XmlChildren; /cfscript cfdump var=#roomResults# = That's all the ColdFusion code I need to call the web service pass it the structure of data then receive and parse the results. The only thing left for me to do is to encapsulate it in a CFC that will return me a CF recordset or a no inventory available status. Thanks everyone for your help -Original Message- From: Jason Neidert [mailto:ja...@steelfusion.com] Sent: Thursday, July 23, 2009 1:54 PM To: cf-talk Subject: RE: Calling .ASPX.VB from .CFM I DID IT!! now what? I need to extract the resulting recordset. If I called the method 'getInventory() ' as such: cfscript inv = CheckAvailabilityRQ.getInventory(); /cfscript I know it has a recordset somewhere in there that contains records for each day that room is available and the inventory available on that date. The third cfdump on that page shows the info on the object created stored in the variable 'inv'. I'm thinking now I need to use Coldfusion again to create the proper object to receive a recordset extracted from the 'inv' object. The good news is this, I was able to use ColdFusion to create complex structures and very simply open a web service and return results. No where this clean and nice with the aspx.vb file that came with it. View the dumps of the object with methods I am getting back. http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal lDotNet.cfm cfset CheckAvailabilityRQ.Credentials = StructNew() / cfset CheckAvailabilityRQ.Credentials.LogonID = IRMTest / cfset CheckAvailabilityRQ.Credentials.Password = 1qasw2 / cfset CheckAvailabilityRQ.Credentials.DataPath = c:\rdp1202\rdp85 / cfset CheckAvailabilityRQ.Credentials.DatabaseID = 29005 / cfset CheckAvailabilityRQ.AvailabilityRequest = StructNew() / cfset CheckAvailabilityRQ.AvailabilityRequest.ArrivalDate = 1998-03-18 / cfset CheckAvailabilityRQ.AvailabilityRequest.DepartureDate = 1998-03-20 / cfset CheckAvailabilityRQ.AvailabilityRequest.RoomType = k / cfset CheckAvailabilityRQ.AvailabilityRequest.People1 = 1 / cfset CheckAvailabilityRQ.AvailabilityRequest.People2 = 0 / cfset CheckAvailabilityRQ.AvailabilityRequest.People3 = 0 / cfset CheckAvailabilityRQ.AvailabilityRequest.People4 = 0 / cfscript irm = CreateObject(webservice, http://irm.resortdata.com/LutsenInterface/IRMPublic.asmx?wsdl;); CheckAvailabilityRQ = irm.checkAvailability(CheckAvailabilityRQ); /cfscript cfdump var=#CheckAvailabilityRQ# View the dump here: http://lutsen.steelfusion.com/winter/rates_packages/packages/rdp/rdp/act_cal lDotNet.cfm Now how do I get the data out? -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Wednesday, July 22, 2009 1:11 PM To: cf-talk Subject: Re: Calling .ASPX.VB from .CFM SO... if I use CFINVOKE I am not quite
CFMX 8 install problems
Hello: Very frustrated... install doesn't create a CFDocs directory AND when I try to open administrator i get Open or save dialog box Any help would be appreciated Tim ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324949 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Long running ColdFusion process and JVM Garbage collection.
Just remember this should be done as a short term fix. If you are having GC problems it is best to sort them out so that Java is running smoothly without frequent stop-the-world' type pauses engendered by a full GC. -mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Randy cfedge [mailto:ra...@cfedge.com] Sent: Friday, July 24, 2009 10:36 AM To: cf-talk Subject: Re: Long running ColdFusion process and JVM Garbage collection. You can run Garbage Collection like this: cfset runtime = CreateObject(java, java.lang.Runtime).getRuntime() cfset runtime.gc() YMMV ~Brad Is there anyway to encourage a ColdFusion server to run garbage collection during a long running, memory intensive process? Does this run Garbage Collection for the whole coldfusion server? This doesn't sound like a good idea but I am going to ask, What would the ramifications be of putting that code in a scheduled task and running it every so often? I think I read before that too much garbage collection could slow things down. Randy ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324950 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFMX 8 install problems sidebyside error?
Follow-up - I'm seeing errors in the event viewer with the source being sidebyside - this must be the source of the problem... message like: Anyone ever since this? Event Type:Error Event Source:SideBySide Event Category:None Event ID:59 Resolve Partial Assembly failed for Microsoft.VC80.MFC. Reference error message: The referenced assembly is not installed on your system. Timothy Laureska tlaure...@dhmh.state.md.us 07/24/09 2:27 PM Hello: Very frustrated... install doesn't create a CFDocs directory AND when I try to open administrator i get Open or save dialog box Any help would be appreciated Tim ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324951 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFMX 8 install problems sidebyside error?
Follow-up - I'm seeing errors in the event viewer with the source being sidebyside - this must be the source of the problem... message like: Anyone ever since this? Event Type: Error Event Source: SideBySide Event Category: None Event ID: 59 Resolve Partial Assembly failed for Microsoft.VC80.MFC. Reference error message: The referenced assembly is not installed on your system. http://support.microsoft.com/kb/923014 Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more inf ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324952 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
WTF? Re: Anyone here good with Event Gateways?
I just found this. http://forums.adobe.com/message/60801#60801 Well, the directory watcher is supplied as an *example* and is not really intended to be production-quality code. The source is supplied so you are free to modify it yourself as needed. -- Sean A Corfield So I guess I spent all this time trying to get something to work that isn't meant to be used in production or anywhere else for that matter. Well that is just great. I'm trying to make ColdFusion important to the company so they don't scrap it and go to .Net or some crappy IBM product. Guess thats not going to happen using the directory watcher gateway. Phil ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324953 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfdoc to pdf displays one blank page
How do I prevent the cfdocument code below from displaying an extra blank page in pdf format? For example, instead of going to page two it displayed page two as blank and continued top page three. Is my code below at fault? Thanks. RO HWW cfdocument format=pdf scale = 90 cfoutput html My code to display as pdf cfdocumentitem type=pagebreak/ cfdocumentitem type=headermy header/cfdocumentitem cfdocumentitem type=footer div align=center font color=navy size=1 face=Tahoma page cfoutput #cfdocument.currentpagenumber# /cfoutput/ cfoutput#cfdocument.totalpagecount# /cfoutput /font /div / cfdocumentitem /cfdocument ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324954 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
SQL get the next successful transaction after a failed transaction
Yup... one of those random Friday afternoon stumpers If I have a table of transactions like this little thing here. With SQL how would I grab ID 2 based on the face that ID 3 is 0 I need to get the next successful transaction after a failed transaction but not sure how to go about it. ID Approved Date 1 1 -7/6/2009 2 1 -7/5/2009 3 0 -7/4/2009 4 1 -7/3/2009 5 0 -7/2/2009 6 1 -7/1/2009 -- Casey ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324955 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQL get the next successful transaction after a failed transaction
Do you want the most recent transaction that occurred after the most recent failure? Or do you want a list of the most recent transactions after every failed transaction? For case number 1 above, you could do something along the lines of: SELECT TOP 1 id, approved, date FROM mytable WHERE date ( SELECT MAX(date) FROM mytable WHERE approved = 0 ) ORDER BY date DESC If you really mean case number 2, I'll have to put some thought into it. That one one is more tricky. Also, is this data really correct? This would seem to indicate that you are inserting rows at the beginning of the table instead of appending to the end of the table (highest date values are corresponding to lowest id values) and that would mean that every row would get a new id every time a new row is inserted. Is that true? Judah On Fri, Jul 24, 2009 at 1:00 PM, Casey Dougallca...@uberwebsitesolutions.com wrote: Yup... one of those random Friday afternoon stumpers If I have a table of transactions like this little thing here. With SQL how would I grab ID 2 based on the face that ID 3 is 0 I need to get the next successful transaction after a failed transaction but not sure how to go about it. ID Approved Date 1 1 -7/6/2009 2 1 -7/5/2009 3 0 -7/4/2009 4 1 -7/3/2009 5 0 -7/2/2009 6 1 -7/1/2009 -- Casey ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324956 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: WTF? Re: Anyone here good with Event Gateways?
On Fri, Jul 24, 2009 at 12:22 PM, Phillip Bphilthylab...@gmail.com wrote: So I guess I spent all this time trying to get something to work that isn't meant to be used in production or anywhere else for that matter. Well that is just great. I'm trying to make ColdFusion important to the company so they don't scrap it and go to .Net or some crappy IBM product. Guess thats not going to happen using the directory watcher gateway. Be aware that is only true of the example gateways provided in source form - and that's why the source is provided! It's open source for a reason: Some people have enhanced the directory watcher to be more robust. The problem with the directory watcher (and this is the only problem I'm actually aware of) is that if you have large files being written to the watched directory, such that the file may be incomplete (still being written to) when the cycle time triggers on the watcher, you'll be told a file is added but can't tell whether it is complete or not. Essentially you have to compensate by getting the file size of new files and then on the next cycle see whether the file size is still the same (in which case you can assume it is complete). FWIW, some of the example gateways are extremely robust (both the original JMS gateway in CFMX7 and the enhanced JMS gateway (ActiveMQ) in CF8 have been heavily battle-tested in production). I would stand by both of those gateways even tho' they are only examples (since I wrote them and I've used them heavily in production!). -- Sean A Corfield -- (904) 302-SEAN Railo Technologies US -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324957 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Coldbox and ColdSpring How to?
On Fri, Jul 24, 2009 at 1:36 AM, Glyn Jacksonglyn.jack...@newebia.co.uk wrote: what are the benefits of working this way, am just ignorant having never used it or AOP before in CF. Any docs online you can point me to (I dont know what I would be looking for) As the number of CFCs being created / initialized increases, the benefits of ColdSpring increase because you don't need all that code inside your CFCs (this could have been all done in the init() method or I could have extended the CFC or I could have passed in the details from config CFC without ColdSpring). That means that dependency changes can be made without changing your code, including using AOP to add logging, security etc etc. ColdSpring is one of those tools where you can't really get it until you've experienced the problem it solves and then it's a real lightbulb moment. I wasn't sold on IoC / DI tools at first. When I really saw the light it was working on a Mach-II application (years ago, at Macromedia) and having to deal with complex and ever-growing configuration data. I needed a way to separate configuration from code and Mach-II's XML-based approach wasn't cutting it. So I rewrote the app using Model-Glue 1.0 and an external XML file for configuration data (using ChiliBeans, MG1's IoC container). As far as I was concerned, it was still just externalizing configuration, albeit object-based configuration. As the application grew, the bean factory really started to take the load off my hands as it could take care of increasing complexity without impact to my code. Then I switched to ColdSpring because it was more capable than ChiliBeans and I never looked back! -- Sean A Corfield -- (904) 302-SEAN Railo Technologies US -- http://getrailo.com/ An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324958 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4