cftry question
I want to catch missing template errors only, for example if a user has a link to an old template I don't want my exception.cfm page to load and notify me I want to load a default template. But if the template page loads and has an error I want the exception.cfm to load and notify me. This is what I tried but this will also catch errors in the page even if it loads cftry cfinclude template=#var1#/#var2#.cfm cfcatch cfinclude template=default.cfm /cfcatch /cftry ~| 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:328484 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cftry question
You can use different 'types' of catches. See here for more info, http://www.cfquickdocs.com/cf8/#cfcatch On Wed, Nov 18, 2009 at 8:08 AM, Keith McGee kpmc...@frontiernet.net wrote: I want to catch missing template errors only, for example if a user has a link to an old template I don't want my exception.cfm page to load and notify me I want to load a default template. But if the template page loads and has an error I want the exception.cfm to load and notify me. This is what I tried but this will also catch errors in the page even if it loads cftry cfinclude template=#var1#/#var2#.cfm cfcatch cfinclude template=default.cfm /cfcatch /cftry ~| 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:328485 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cftry question
Thanks, I got it to work ~| 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:328486 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Debugging Out of Memory errors, SeeFusion Memory / Active requests graph
Right, so changing Eden memory size had a slight effect on the memory useage pattern (spikes only going up to around 80% instead of 95%), but did not stop the crashing. Getting to grips with JConsole has been really useful / educating. I have been monitoring all three of our live servers overnight and one of the servers bombed this morning; I was then able to see what was going on in memory when the bomb occurred: * Old Gen - normal, using far less than peak * Perm gen - normal, sub 90MB * Eden - normal, far less than the 192MB allocated * Survivor - had been flat at max (20MB) for around 20 seconds. Normal shape of this graph for the server is very spikey, peaking very briefly and very often I then discovered the hs_err log for the crash (yes, I'm a server debugging noob) and it told me the following: # # An unexpected error has been detected by Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 1160376 bytes for Chunk::new. Out of swap space? # # Internal Error (allocation.cpp:218), pid=11476, tid=12428 # Error: Chunk::new # # Java VM: Java HotSpot(TM) Server VM (11.3-b02 mixed mode windows-x86) # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # --- T H R E A D --- Current thread (0x63bd0c00): JavaThread CompilerThread1 daemon [_thread_in_native, id=12428, stack(0x6465,0x6475)] Stack: [0x6465,0x6475] [error occurred during error reporting (printing stack bounds), id 0xc005] Current CompileTask: C2:4984 ! cfact_filter2ecfm1550348330.runPage()Ljava/lang/Object; (2377 bytes) ... Heap par new generation total 176960K, used 101114K [0x045b, 0x105b, 0x105b) eden space 157312K, 54% used [0x045b, 0x09a2da70, 0x0df5) from space 19648K, 74% used [0x0df5, 0x0ed90f30, 0x0f28) to space 19648K, 0% used [0x0f28, 0x0f28, 0x105b) concurrent mark-sweep generation total 1114112K, used 909363K [0x105b, 0x545b, 0x545b) concurrent-mark-sweep perm gen total 196608K, used 86428K [0x545b, 0x605b, 0x605b) I look at the hs_err logs from all three servers and stretching back a month or so, they generally feature two or three different cf templates (all heinously written). Questions: 1. Should I attach importance to the file in this error (act_filter.cfm, I'm guessing so) / is this proof of a problem in that script? 2. Is 1160376 bytes an alarming size for Chunk::new? 3. Any other observations with this limited data? 4. Anything else I should be looking at? Thanks again, Dominic 2009/11/16 Dominic Watson watson.domi...@googlemail.com Thanks a lot Paul, I'm getting to grips with JConsole now and looking into the Eden memory settings. I'll be sure to blog about what I find (if its the same problem as yours I'll simply link to your post, init). Dominic 2009/11/16 Paul Vernon paul.ver...@web-architect.co.uk and have reduced the troubles a great deal. However, there still seems to be an underlying problem that is causing CF to crash out with multiple instances of the error: unable to create new native thread The specific sequence of files included or processed is: [xxx] java.lang.OutOfMemoryError: unable to create new native thread Classic. I found that these errors are due to Eden memory being set way to small for the application. http://blog.newmediadevelopment.net/2009/10/tracking-down-out-of-memory-erro rs-in-coldfusion-standard.htmlhttp://blog.newmediadevelopment.net/2009/10/tracking-down-out-of-memory-erro%0Ars-in-coldfusion-standard.html In the blog entry, I state forcing the Eden to 128Mb using -Xmn128m. We ended up setting it to -Xmn192m and since then we haven't had a single out of memory issue and the server hasnt had a CF restart or reboot in 60 days. We handle a similar load to what you've described in your full post but depending on your application YMMV. Paul ~| 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:328487 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ORMExecuteQuery problem
Hi, I'm using the following line of code; users = ormExecuteQuery(from User where region_id in (?) and usergroup_id in (?), [1, 1]); the parameters are set to 1 and 1 purely for test purposes but I get a nullpointer error returned, whereas if i change the line to ; users = ormExecuteQuery(from User where region_id in (1) and usergroup_id in (1)); it runs ok...any ideas? thanks, john. ~| 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:328488 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
dead display for ADMIN page in a new installation
Good morning, I just installed Coldfusion 8 multi-server configuration on Sun Solaris 10u5. The install went fine and yielded only the issue with the cf-multi-start file (which apparently doesn't even exist). Otherwise, the install was fine. I am running Sun WebServer 7 on this machine. I put both cfusion and admin on-line (/opt/jrun4/bin/jrun -nohup start cfusion [admin]), and they came up with no errors. I also ran the cf-connectors.sh script to configure Webserver 7 to work. That also appeared to work correctly - no errors. When I go to the admin page http://myhost.site.place/CFIDE/administator, I do get a display, but what I see is binary garbage on the screen. That would indicate to me that my page is not being passed through the cfusion processor for handling. Has anyone seen this behavior? Any help, tips, and advice are appreciated!! Thanks in advance, Howard ~| 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:328489 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
JavascriptEncodedFormat?
Hi, I was looking for a function for encoding javascript output text that would be similar to the URLEncodedFormat() built in function. I have an app that users can type in javascript warning messages and there are several characters that are causing the javascript to break (i.e. CR-LF, double quotes, etc.). I looked on CFLib and there were only a handful of javascript functions. Does anyone know of a function that that will change CR-LF to \n as well as all other characters that need to be escaped? I am envisioning something like JavascriptEncodedFormat(Variables.jsWarning). Thanks, Donnie ~| 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:328490 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JavascriptEncodedFormat?
jsstringformat() Azadi Saryev On 19/11/2009 00:16, Donnie Carvajal wrote: Hi, I was looking for a function for encoding javascript output text that would be similar to the URLEncodedFormat() built in function. I have an app that users can type in javascript warning messages and there are several characters that are causing the javascript to break (i.e. CR-LF, double quotes, etc.). I looked on CFLib and there were only a handful of javascript functions. Does anyone know of a function that that will change CR-LF to \n as well as all other characters that need to be escaped? I am envisioning something like JavascriptEncodedFormat(Variables.jsWarning). Thanks, Donnie ~| 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:328491 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
stored procedures
I am trying to add a field to a stored procedure. I modified the stored proc in SQL Studio and executed it. It appears to have saved the changes. Now I added cfprocparam dbvarname=@PromoCode value=#session.promocode# cfsqltype=cf_sql_varchar to my CFStoredProc tag. I get the error Procedure or function I_Orders has too many arguments specified. Did I not edit the stored procedure right? Is it cached somewhere? ~| 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:328492 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JavascriptEncodedFormat?
jsstringformat() Azadi Saryev On 19/11/2009 00:16, Donnie Carvajal wrote: Thanks Azadi. I was very confused that nobody wrote anything for this and that's because they didn't have to. Thanks again. ~| 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:328493 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: stored procedures
When you say you modified the stored proc and executed it do you mean you executed an ALTER statement on the proc? If you re-open the proc and the new parameter shows up, then I'm sure it is saved. Did you add the new parameter to the end of the list of params? Since dbvarname is largely ignored, the params are passed by position. Something quite possibly could be cached. Check your pooled statements setting in your datasource. I'm not sure if there is a way to clear those out easily with out restarting CF, SQL, or just going in and killing all the SPIDS that represent connections from your CF server. If it's a dev server, just bounce CF I guess. Before you do that though, double check the data source you are using and make sure that you are calling the procedure you think you are and not one in a different database/server/name/etc. ~Brad Original Message Subject: stored procedures From: Chad Gray cg...@careyweb.com Date: Wed, November 18, 2009 10:43 am To: cf-talk cf-talk@houseoffusion.com I am trying to add a field to a stored procedure. I modified the stored proc in SQL Studio and executed it. It appears to have saved the changes. Now I added cfprocparam dbvarname=@PromoCode value=#session.promocode# cfsqltype=cf_sql_varchar to my CFStoredProc tag. I get the error Procedure or function I_Orders has too many arguments specified. Did I not edit the stored procedure right? Is it cached somewhere? ~| 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:328494 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: stored procedures
Never mind.. I was editing the wrong stored procedure. There was one on another table that was accessing the table I was working on. So basically there were two stored procs. One on table1 that was accessing table2. And one on table2 that was accessing table2. I changed both stored procs and now it is working. Very confusing to have a stored proc on a table that is modifying another table. Thanks for the input though! Chad -Original Message- From: b...@bradwood.com [mailto:b...@bradwood.com] Sent: Wednesday, November 18, 2009 12:26 PM To: cf-talk Subject: RE: stored procedures When you say you modified the stored proc and executed it do you mean you executed an ALTER statement on the proc? If you re-open the proc and the new parameter shows up, then I'm sure it is saved. Did you add the new parameter to the end of the list of params? Since dbvarname is largely ignored, the params are passed by position. Something quite possibly could be cached. Check your pooled statements setting in your datasource. I'm not sure if there is a way to clear those out easily with out restarting CF, SQL, or just going in and killing all the SPIDS that represent connections from your CF server. If it's a dev server, just bounce CF I guess. Before you do that though, double check the data source you are using and make sure that you are calling the procedure you think you are and not one in a different database/server/name/etc. ~Brad ~| 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:328495 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: stored procedures
By table1 and table2 I actually meant database1 and database2. Im on a roll today... -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Wednesday, November 18, 2009 12:36 PM To: cf-talk Subject: RE: stored procedures Never mind.. I was editing the wrong stored procedure. There was one on another table that was accessing the table I was working on. So basically there were two stored procs. One on table1 that was accessing table2. And one on table2 that was accessing table2. I changed both stored procs and now it is working. Very confusing to have a stored proc on a table that is modifying another table. Thanks for the input though! Chad -Original Message- From: b...@bradwood.com [mailto:b...@bradwood.com] Sent: Wednesday, November 18, 2009 12:26 PM To: cf-talk Subject: RE: stored procedures When you say you modified the stored proc and executed it do you mean you executed an ALTER statement on the proc? If you re-open the proc and the new parameter shows up, then I'm sure it is saved. Did you add the new parameter to the end of the list of params? Since dbvarname is largely ignored, the params are passed by position. Something quite possibly could be cached. Check your pooled statements setting in your datasource. I'm not sure if there is a way to clear those out easily with out restarting CF, SQL, or just going in and killing all the SPIDS that represent connections from your CF server. If it's a dev server, just bounce CF I guess. Before you do that though, double check the data source you are using and make sure that you are calling the procedure you think you are and not one in a different database/server/name/etc. ~Brad ~| 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:328496 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ORM Error - No discriminator found
I have the following tables: ---Hierarchy 1: Table per subclass without discriminator--- T1,T2,T3 T1 PK-Identity T2 PK- is FK from T1 T3 PK- is FK from T1 ---END: Hierarchy 1--- ---Hierarchy 2: Table per hierarchy--- T3 T3 PK- is FK from T1 is_simple, type = bit. (not mentioned in Hierarchy 1 - but same table, just trying to only mention the essential fields per context) ---END: Hierarchy 2--- CFCs: c1 table=t1 c2 extends=c1, table=t2, joincolumn=t2.pk c3 extends=c1, table=t3, joincolumn=t3.pk, discriminatorColumn=is_simple c4 extends=c3, table=t3, discriminatorValue=1 I get know errors when C1,C2,C3 exists only. But when I put c4 in my cfc location, and try to re-load the app I get: No discriminator found for C4. Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses. Anyone have any idea where Im going wrong here? ~| 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:328497 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: ORM Error - No discriminator found
I don't think you can use a bit typed column as the discriminator column. In fact, you don't need to specify the column and value at all, Hibernate will just create one automatically if you leave it out. Since the inner workings of the inheritance implementation are completely hidden, this shouldn't affect you at all. Brian On Wed, Nov 18, 2009 at 3:42 PM, Charlie Stell charlie.st...@gmail.comwrote: I have the following tables: ---Hierarchy 1: Table per subclass without discriminator--- T1,T2,T3 T1 PK-Identity T2 PK- is FK from T1 T3 PK- is FK from T1 ---END: Hierarchy 1--- ---Hierarchy 2: Table per hierarchy--- T3 T3 PK- is FK from T1 is_simple, type = bit. (not mentioned in Hierarchy 1 - but same table, just trying to only mention the essential fields per context) ---END: Hierarchy 2--- CFCs: c1 table=t1 c2 extends=c1, table=t2, joincolumn=t2.pk c3 extends=c1, table=t3, joincolumn=t3.pk, discriminatorColumn=is_simple c4 extends=c3, table=t3, discriminatorValue=1 I get know errors when C1,C2,C3 exists only. But when I put c4 in my cfc location, and try to re-load the app I get: No discriminator found for C4. Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses. Anyone have any idea where Im going wrong here? ~| 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:328498 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Selecting everything in a string up to a point....
Hey all! I'm trying to capture all of the data up to a point in an HTML document. So for instance... there could be the htmlheadblabla bla tags...and these could variate, but on every HTML doc there is a header image. img src=header.jpg or whatever. I need to know how I can write a string command to capture/select everything previous and including the header image (or not including the header image...I really need to know how to do both.) ~| 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:328499 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Selecting everything in a string up to a point....
cfset html = REReplace(html, '^(.*?img[^]+header.jpg[^]*).*', '\1') / I think that'll do it, but I didn't actually test. That says starting at the beginning of the string, find everything until you find the string img, followed by one or more characters excluding , followed by the string header.jpg, followed by zero or more characters excluding , and then replace the whole string with just that part. cheers, barneyb On Wed, Nov 18, 2009 at 1:43 PM, John Egbert john.egb...@milestonetech.com wrote: Hey all! I'm trying to capture all of the data up to a point in an HTML document. So for instance... there could be the htmlheadblabla bla tags...and these could variate, but on every HTML doc there is a header image. img src=header.jpg or whatever. I need to know how I can write a string command to capture/select everything previous and including the header image (or not including the header image...I really need to know how to do both.) ~| 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:328500 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Selecting everything in a string up to a point....
Hey Barney...thanks for the help! Just to simplify it, what if I just loaded whatever the header is into a string (so hypothetically, I would just want to replace everything up to a variable called headerstring)... would that just be cfset html = REReplace(html, headerstring, '\1') / Thanks again so much for your help! John Egbert Milestone Account Management work. 303.317.3397 cell. 720.883.7773 john.egb...@milestonetech.com http://www.milestonetech.com -Original Message- From: John Egbert [mailto:john.egb...@milestonetech.com] Sent: Wednesday, November 18, 2009 2:44 PM To: cf-talk Subject: Selecting everything in a string up to a point Hey all! I'm trying to capture all of the data up to a point in an HTML document. So for instance... there could be the htmlheadblabla bla tags...and these could variate, but on every HTML doc there is a header image. img src=header.jpg or whatever. I need to know how I can write a string command to capture/select everything previous and including the header image (or not including the header image...I really need to know how to do both.) ~| 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:328501 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: (ot) Google Maps API
Ray, From what I have found out so far, is that the older BB Browser won't support the new Google Maps API v.2 and above. What happens when we request driving directions on an older BB, is that we get a blank screen. Works like a champ on Android, iPhone and all Browsers we have tested, but not on BB Browsers. I had a buddy of mine try it on the new BB Storm, and it works great, just like it is suppose to. Thanks, Dave ~| 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:328502 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Senior COLDFUSION - LONDON 50K
Aqua Lime is looking for a Senior Coldfusion Developer to work in our centrally located office in London. Minimum 8 years Coldfusion Development 7/8 MX along with similiar length experience on either PHP, ASP.NEt, Ruby, Python. Ideally you would have come from another agency Please contact Amber Shankland @ Aqua Lime - 07818 022 878 am...@aqua-lime.co.uk Thanks! Best regards, Amber Shankland Director Direct D: +44 (0) 1844 350037 SW: +44 (0) 871 218 2878 Mobile: +44 (0) 781 802 2878 Skype: amber_shankland am...@aqua-lime.co.uk www.aqua-lime.co.uk http://www.linkedin.com/in/ambershankland?goback=.hom ~| 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-jobs-talk/message.cfm/messageid:4265 Subscription: http://www.houseoffusion.com/groups/cf-jobs-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11