Paul Kukiel - and what i'm interested in.
Jan 12, 2012
Railo 3 Beginners Guide
I've recently been reading through Railo 3 Beginners Guide. While I have been working with CFML and Railo for a long time it's often still worth going back to basics and revisiting from the bottom up. Railo has come along way I was using Railo year back where I had to manually compile the connectors between Resin and apache I even remeber having to compile them and send then to a few people. It was alot of fun and the result was worth it. 1 it ran a few sites ( one which generated alot of traffic for several consistent months ) and 2 gave me the opportunity to delve deeper into my application server.
This book now walks you through installing Railo ( which is now very easy ) and getting started on working with cfml. I have just put on a new developer who has never seen cfml and is already able to work solo I thin it's a great strength of the language and a decent programmer/developers should in my opinion be language agnostic but when just getting started books such as this are a great place to start. One quick example is the a nice hidden tag that is amazingly easy to use. Showing someone new to Railo that tag alone will impress.
Anyway if ( like ) you are expanding your dev team and are considering hiring devs new to cfml ( and I recommend this ) I'd consider a copy of this book for your collection.
http://www.packtpub.com/railo-3-beginners-guide-to-develop-deploy-complex-applications-online/book
Jan 4, 2012
onError cfmail errors to yourself in ColdFusion in cfscript
I'm sure lots of people do the same thing as I do. In onError I eMail myself the errors ( and some other scopes ) so when errors occur on my application I can address them. Moving to script means I can have my entire Application.cfc in script how ever this introduced a small issue. Basically what I do is into the body of an email. With script it's a little more involved but still works eg:
You'll notice that I added output = true to the method annotation. I don't think that should be needed infact it works as expected in Railo. It's strange and not consistent with the tag implementation. I think its a bug in ACF. Before adding the annotation I was receiving my emails as expected but the body was always empty.
Update
Upon further investigation the code quoted above does not actually work. I think the actually issue is in mail.addPart();
However this code works just fine:
Dec 17, 2011
OpenBD on Google appengine - ColdFusion / CFML
I've been tidying up my blog and fixing some of the lost code samples and was moving around some of my code that was on Google App Engine. After workings out how to use OpenBD desktop to deploy new OpenBD CFML apps to GAE I realized I broke my demos. After a bit of searching I found this post.
http://groups.google.com/group/openbd/browse_thread/thread/e94b47a51e5d8a86?pli=1
And this is the Bug: http://code.google.com/p/googleappengine/issues/detail?id=5898
If your interested in OpenBD on GAE then vote for it.
Dec 14, 2011
Recover a datasource password in ColdFusion
I forgot a password to a mySQL datasource on my personal VPS. Not the end of the world I can log in to mySQL and reset it if I need but I knew these passwords were in new-datasource.xml in an encrypted format and was curious to see if I could decrypt that password. Turns out you can.
I used this post as a staring point http://paulalkema.com/post.cfm/pull-a-list-of-all-coldfusion-datasources-along-with-username-and-passwords
and while I was at it built this small app in case I need it in the future.
App: http://demo.kukiel.net/jquery/pass/
Dec 4, 2011
Rail ORM tomcat hibernate jvm settings permspace error
I've just started working on a small project using ORM and Railo. I'm running Ubuntu linux and the tomcat 7 installers with not chnage to jvm settings.
The first HQL query I ran a recieved an permSpace memory error. Not a huge deal but if your not used to the locations of the jvm settings it can be a bit of a challenge. PermSize was set to 64mb on the standard install which was a little to low.
The locations of the files for a standard install are:
/opt/railo/tomcat/bin
in: setenv.sh
I changed my settings to look like this:
-Xms128m -Xmx512m -XX:+CMSIncrementalMode -XX:+ExplicitGCInvokesConcurrent -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384m -XX:PermSize=384m -XX:+UseConcMarkSweepGC
Part of this was from Kai's example's which can be found here: http://t.co/aShOtpM
I have less RAM to work with so my settings are smaller.
my setenv.sh file looks like:
Railo can then re restarted by:
/etc/init.d/railo_ctl restart
My application continued to run as expected.
The first HQL query I ran a recieved an permSpace memory error. Not a huge deal but if your not used to the locations of the jvm settings it can be a bit of a challenge. PermSize was set to 64mb on the standard install which was a little to low.
The locations of the files for a standard install are:
/opt/railo/tomcat/bin
in: setenv.sh
I changed my settings to look like this:
-Xms128m -Xmx512m -XX:+CMSIncrementalMode -XX:+ExplicitGCInvokesConcurrent -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384m -XX:PermSize=384m -XX:+UseConcMarkSweepGC
Part of this was from Kai's example's which can be found here: http://t.co/aShOtpM
I have less RAM to work with so my settings are smaller.
my setenv.sh file looks like:
/etc/init.d/railo_ctl restart
My application continued to run as expected.
Nov 17, 2011
The future of Flex from the mouth of Adobe and my thoughts - cfObjective ColdFusion Flex
So I attended CfObjective ANZ today. It was a good day great to catch up with alot of the people from the community that I haven't seen for a while and and those that I see regularly at the Melbourne ColdFusion and Flex usergroup. The venue was really quite nice and the food was some of the best I have had at a conference.
One of the main factors of attending this year was to find out from Adobe and the community how we are supposed to react to Adobe's messages recently about Flash and Flex. I think we all feel Adobe PR have done a poor job of communicating the changes and alot of people want to know the real truth. Part of what was re-iterated was:
Adobe have stopped development of the Mobile Flash player ONLY.
Moving the following projects to the Apache foundation:
I also asked if the name would change back to FlexBuilder and sadly that was no. Oh well.
We all work in a rapidly changing environment and have to adapt as technology changes but nobody wants to invest a significant amount of time and resources in a language/framework to what the carpet pulled out from under them so today we did hear some good news. With the addition of the AS/MXML to HTML and JS compiler to be released we have some promising options to look forward to.
On the ColdFusion front I had nothing to worry about but did hear some nice news that in the next 24 months Adobe has 4 planed releases ( probably 2 ColdFusion versions and 2 CFBuilder updates ) which is a good thing.
One of my favorite sessions of the day was Kai's session on tuning the jvm. I have alot of servers I look after and it's quite a science and Kai really knows whats going on and helped convert into understandable english what we can do and where to look to extract the best performance possible from our coldfusion servers.
Looking forward to day 2!
One of the main factors of attending this year was to find out from Adobe and the community how we are supposed to react to Adobe's messages recently about Flash and Flex. I think we all feel Adobe PR have done a poor job of communicating the changes and alot of people want to know the real truth. Part of what was re-iterated was:
Adobe have stopped development of the Mobile Flash player ONLY.
Moving the following projects to the Apache foundation:
- Complete, but yet-to-be-released, Spark components, including ViewStack, Accordion, DateField, DateChooser and an enhanced DataGrid.
- BlazeDS, the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Flex applications.
- Falcon, the next-generation MXML and ActionScript compiler that is currently under development (this will be contributed when complete in 2012)
- Falcon JS, an experimental cross-compiler from MXML and ActionScript to HTML and JavaScript.
- Flex testing tools, as used previously by Adobe, so as to ensure successful continued development of Flex with high quality
I also asked if the name would change back to FlexBuilder and sadly that was no. Oh well.
We all work in a rapidly changing environment and have to adapt as technology changes but nobody wants to invest a significant amount of time and resources in a language/framework to what the carpet pulled out from under them so today we did hear some good news. With the addition of the AS/MXML to HTML and JS compiler to be released we have some promising options to look forward to.
On the ColdFusion front I had nothing to worry about but did hear some nice news that in the next 24 months Adobe has 4 planed releases ( probably 2 ColdFusion versions and 2 CFBuilder updates ) which is a good thing.
One of my favorite sessions of the day was Kai's session on tuning the jvm. I have alot of servers I look after and it's quite a science and Kai really knows whats going on and helped convert into understandable english what we can do and where to look to extract the best performance possible from our coldfusion servers.
Looking forward to day 2!
Nov 10, 2011
Should I use Flex FlashBuilder to build iOS apps
So Adobe is no longer supporting a mobile version of the FlashPlayer. Does this bother me? No not really websites I work on are pure HTML and there is really nothing I need Flash ( in the browser for ) at the current time especially on mobile devices. However I do have an iPhone and I did get flash running on the iPhone but that was a "just because case".
So now that Adobe are no longer maintain a Mobile Flash player should i still build Apps for iOS and Android using FlashBuilder? Well yes why wouldn't I.
I have a need to build a smallish application that is a perfect candidate for FlashBuilder. I'm familiar with Flex and need to get the app to market pretty rapidly I still see this as the best option.
A few people I have spoken to are on the same wave length as me. Building AIR and Mobile app with FlashBuilder is really and great option specially when it take so much longer to build "natively". Sure if I were building a game but I'm not.
In any case I'd like to hear some feed back as to weather people are still going along the FlashBuilder -> iOS path.
So now that Adobe are no longer maintain a Mobile Flash player should i still build Apps for iOS and Android using FlashBuilder? Well yes why wouldn't I.
I have a need to build a smallish application that is a perfect candidate for FlashBuilder. I'm familiar with Flex and need to get the app to market pretty rapidly I still see this as the best option.
A few people I have spoken to are on the same wave length as me. Building AIR and Mobile app with FlashBuilder is really and great option specially when it take so much longer to build "natively". Sure if I were building a game but I'm not.
In any case I'd like to hear some feed back as to weather people are still going along the FlashBuilder -> iOS path.
Sep 14, 2011
Windows 8 and ColdFusion 9
I downloaded the developers edition of Windows 8 and installed it in Virtual box. Yes it works fine in Virtual box, I assigned 20g HDD and 1024ram. It booted and and ran quite well. I then installed ColdFusion 9 standalone, IIS 8 and was attpemtping to install CF 9.01 updated so I could see if CF would hook into IIS 8. No such luck the 9.01 updater stops with this:
ZeroGur: Windows DLL failed to load at ZeroGa4.b(DashoA10*..) at ZeroGa4.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..) at com.zerog.ia.installer.Main.main(DashoA10*..) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.zerog.lax.LAX.launch(DashoA10*..) at com.zerog.lax.LAX.main(DashoA10*..)
Anyway that's where I got to.
Windows 8 looks interesting and boots and installs quickly. The main piece of software the company I work for runs on it so that's another plus. I'd be interested to sort through all the new additions.
ZeroGur: Windows DLL failed to load at ZeroGa4.b(DashoA10*..) at ZeroGa4.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..) at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..) at com.zerog.ia.installer.Main.main(DashoA10*..) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.zerog.lax.LAX.launch(DashoA10*..) at com.zerog.lax.LAX.main(DashoA10*..)
Anyway that's where I got to.
Windows 8 looks interesting and boots and installs quickly. The main piece of software the company I work for runs on it so that's another plus. I'd be interested to sort through all the new additions.
Sep 9, 2011
ColdFusion and Flex error any help?
I'm really not sure what has cause this but on our dev box we started seeing this error. Now CF is running and works, but somehow flashremoting isnt. No one claims to have messed with the server so I can't understand why it's happening.
Ideas?
Sep 6, 2011
jQuery ColdFusion and cfdump into a div
I was making a small demo for someone with jQuery and populating a div when I thought it would be interesting to see if you could cfdump into a div. With jQuery and ColdFusion anything is possible. Here is the code and a working demo
Index.html
script cfc
cfc
Aug 27, 2011
Free Text to Speech with ColdFusion and jQuery
A few weeks ago I decided to build a small but fun website http://www.freetext2speech.com
The idea is simple, type some text into a box and convert it to speech. I used the FreeTTS java library and ColdFusion 9. I got started with Rays post a few years ago and did some additional conversions to swap to mp3 so I could use a small Flash based MP3 player to play back the sound. The site also has clean URL's to send a message to someone and all the javascript is of course jQuery. All in all a fun project that allowed me to use java, ColdFusion, ffmpeg, jQuery and some simple url rewrite to make a small clean site in around 150 lines of code including Application.cfc
As this is on a small VPS I decided to also run this on java 7 so far it have been up for about 2 weeks without issue and memory usage is very low.
The idea is simple, type some text into a box and convert it to speech. I used the FreeTTS java library and ColdFusion 9. I got started with Rays post a few years ago and did some additional conversions to swap to mp3 so I could use a small Flash based MP3 player to play back the sound. The site also has clean URL's to send a message to someone and all the javascript is of course jQuery. All in all a fun project that allowed me to use java, ColdFusion, ffmpeg, jQuery and some simple url rewrite to make a small clean site in around 150 lines of code including Application.cfc
As this is on a small VPS I decided to also run this on java 7 so far it have been up for about 2 weeks without issue and memory usage is very low.
Aug 26, 2011
.net C# Flex datagrids and Excel
A few people have contacted me via live chat and also via comments regarding Flex Data grid to excel post that they would like to see how to do the same thing with .NET
I made a quick demo where I pull a RSS feed with .NET, parse out a few columns and return the result to a small Flex app. Flex will handle the .NET objects as generic objects and you can cast the array to an arrayCollection and simply use this as the data provider for a datagrid.
I then used almost the same code to build up a post string as I was with ColdFusion and PHP however the spark grid is a little bit different and required some small changed.
With .NET we have access to Excel libraries which I used to generate real Excel documents where you can set styles and sheet names easily.
The app does a simple post back to a .NET page and generates a excel document on the fly and streams it back to the user.
There are many ways to do the same thing here is just one way. Currently in our apps we typically write the file out to disk and provide a download link as the front end to our .NET applications are pure html.
View source is enabled on the Flex widget at the bottom of the demo.
Webservice:
Direct Link.
Create excel:
Direct Link.
Demo App:
I made a quick demo where I pull a RSS feed with .NET, parse out a few columns and return the result to a small Flex app. Flex will handle the .NET objects as generic objects and you can cast the array to an arrayCollection and simply use this as the data provider for a datagrid.
I then used almost the same code to build up a post string as I was with ColdFusion and PHP however the spark grid is a little bit different and required some small changed.
With .NET we have access to Excel libraries which I used to generate real Excel documents where you can set styles and sheet names easily.
The app does a simple post back to a .NET page and generates a excel document on the fly and streams it back to the user.
There are many ways to do the same thing here is just one way. Currently in our apps we typically write the file out to disk and provide a download link as the front end to our .NET applications are pure html.
View source is enabled on the Flex widget at the bottom of the demo.
Webservice:
Direct Link.
Create excel:
Direct Link.
Demo App:
Aug 18, 2011
How to change the jvm arguments in Railo Tomcat package installers
The new Railo installers are fantastic Jordan has done a great job.
I have a small VPS running demos for this blog it's running Railo. It's mostly for demos but also has a few small hobby sites.
I really don't need to allocate 512 to Railo I wanted to drop it to 256mb ram ( the VPS in Windows server 2008 r2 with only 512 ram which also runs .NET 4 and SQL Server Express ).
I search for a config file but there was none.
So here is how to change your jvm args and lower or raise the amount of ram you allocate to tomcat for Railo.
Click Start, Navagate to "Railo", click "Railo-Tomcat Servcice Control"
This will allow you to edit the options on the service.
Select the java tab
Then add jvm args and adjust the memory.
Screen shots:
I have a small VPS running demos for this blog it's running Railo. It's mostly for demos but also has a few small hobby sites.
I really don't need to allocate 512 to Railo I wanted to drop it to 256mb ram ( the VPS in Windows server 2008 r2 with only 512 ram which also runs .NET 4 and SQL Server Express ).
I search for a config file but there was none.
So here is how to change your jvm args and lower or raise the amount of ram you allocate to tomcat for Railo.
Click Start, Navagate to "Railo", click "Railo-Tomcat Servcice Control"
This will allow you to edit the options on the service.
Select the java tab
Then add jvm args and adjust the memory.
Screen shots:
Aug 16, 2011
How to upgrade ColdFusion Builder 2 to java7
I use ColdFusion Builder 2 ( standalone ) every day. It's a great tool and much improved over Builder 1. If you don't have it I highly recommend it. Also if your a student you can get it for free.
As an Eclipse based IDE it runs on java and that can often mean that's it's laggy and slow. I havnt had to many issues but a few guys at work do. I suggested upgrading to java 7 and the new GC option:
-XX:+UseG1GC
In theory you shoudl be able to specify the vm location in the .ini as so:
-vm C:\Program Files (x86)\Java\jdk1.7.0
But that doesn't seam to work as It looks like within cfbuilder.exe Adobe override that setting.
Here is how to swap CFBuilder to java 7. It's very simple and easy to undo if you don't have good results. Make sure you are not running Builder while performing these steps.
Download Java 7 32 bit jdk: Here
You need 32bit JDK with ColdFusion builder.
I choose to install in the default location.
C:\Program Files (x86)\Java\jdk1.7.0
Once installed navigate to: C:\Program Files (x86)\Java\jdk1.7.0
And copy the folder: jre into clipboard
Then navigate to your CFBuilder Install Directory:
Default: C:\Program Files (x86)\Adobe\Adobe ColdFusion Builder 2
Rename the folder jre to jreOLD
Paste the new ( java 7 ) jre folder into the builder directory
Next step is to add the GC option.
In the builder directory open cfbuilder.ini and add:
-XX:+UseG1GC
To the end of the file
And thats it. Simply restart ColdFusion Builder.
Here is my complete CFBuilder.ini
If you need to undo the change simple close CFBuilder, rename jre to jre7 and jreOLD to jre. The additional GC option will still work but If you want to remove that just remove that line from the ini file.
As an Eclipse based IDE it runs on java and that can often mean that's it's laggy and slow. I havnt had to many issues but a few guys at work do. I suggested upgrading to java 7 and the new GC option:
-XX:+UseG1GC
In theory you shoudl be able to specify the vm location in the .ini as so:
-vm C:\Program Files (x86)\Java\jdk1.7.0
But that doesn't seam to work as It looks like within cfbuilder.exe Adobe override that setting.
Here is how to swap CFBuilder to java 7. It's very simple and easy to undo if you don't have good results. Make sure you are not running Builder while performing these steps.
Download Java 7 32 bit jdk: Here
You need 32bit JDK with ColdFusion builder.
I choose to install in the default location.
C:\Program Files (x86)\Java\jdk1.7.0
Once installed navigate to: C:\Program Files (x86)\Java\jdk1.7.0
And copy the folder: jre into clipboard
Then navigate to your CFBuilder Install Directory:
Default: C:\Program Files (x86)\Adobe\Adobe ColdFusion Builder 2
Rename the folder jre to jreOLD
Paste the new ( java 7 ) jre folder into the builder directory
Next step is to add the GC option.
In the builder directory open cfbuilder.ini and add:
-XX:+UseG1GC
To the end of the file
And thats it. Simply restart ColdFusion Builder.
Here is my complete CFBuilder.ini
If you need to undo the change simple close CFBuilder, rename jre to jre7 and jreOLD to jre. The additional GC option will still work but If you want to remove that just remove that line from the ini file.
Aug 14, 2011
Write dump in cfmail with cfscript in ColdFusion
I find it handy to dump out a scope and email it to myself. I use this occasionally in Application.cfc in onError() or onMissingTemplate() to dump cgi and the exception variables.
This weekend I was working on a small ColdFusion project and am using cf9. All my cfc's are in script and I wanted to dump full scopes and email them back to myself. Its not as simple as in tags but its a workable solution using savecontent.
I really expected this to just work:
mail.addPart( type="html", charset="utf-8", body=writedump(application) );
But it wont so here is the solution:
Here is the solution:
The other exception to my project was one cfc had to have a udf for cfexecute which also is not yet in cfscript.
Update.
To answer Steves question here is the code example.
You can just attach the report as a file attachment and specify the content.
This weekend I was working on a small ColdFusion project and am using cf9. All my cfc's are in script and I wanted to dump full scopes and email them back to myself. Its not as simple as in tags but its a workable solution using savecontent.
I really expected this to just work:
mail.addPart( type="html", charset="utf-8", body=writedump(application) );
But it wont so here is the solution:
Here is the solution:
The other exception to my project was one cfc had to have a udf for cfexecute which also is not yet in cfscript.
Update.
To answer Steves question here is the code example.
You can just attach the report as a file attachment and specify the content.
Subscribe to:
Posts (Atom)





