Author Archive: Bhakti Pingale

Apply CF Nature

I am sure most of you must be aware but still wanted to pen this one down.
This one’s specifically for converting your non-CF or non-CFBuilder Project into a CF Project.
If you wish to work on your existing projects in CF Builder, i.e. the projects that were created using any other IDE, then these projects will not open as CF Projects. They will be generic projects. Which means you need to convert them to CF Projects in order to use all the features(Editor features/Preview/Debug/Extensions etc) of CFBuilder.
This can be done in two ways:
1. Import Project: You can import the existing project that you wish to work on. When you are on the Import Project Wizard, enable the “Show All Projects” checkbox.
This will enable the “Apply CF Nature…” optoin. Select that one as well.
Now your project is ready to get imported as CF project.
1.JPG
2. You have a project in the workspace already on which you were working prior to using CF Builder(or you imported one w/o applying CF nature) and now you want to continue working on it. For converting this Project into a CF Project right click on the Project and “Apply CF Nature”.
This should also convert your project to a CF Project.
2.JPG
Simple and Handy!
P.S.: To identify that a Project in the workspace is a CF Project just check if the folder icon has a CF on it, like this   icon.JPG

Debugging in CFBuilder

Debugging in ColdFusion 8 was done using the CFDebugger (plugin on CFEclipse),This Debugger with a few more improvements is now a part of CFBuilder.
It is hence possible to create projects-preview them-debug them all under one roof.
The nicest part(and enhancement over the earlier debugger) is that its not mandatory for you to create debug configurations for each project, if you don’t create debug configs the CFBuilder will do it for you by default! We unofficially call this ‘Single Click Debugging’
I have uploaded a video of Local and Remote Debugging in CFBuilder so that its easier to follow the steps and you don’t get lost reading the essays :)
Just a note, the most essential requirement to debug is to Enable Debugging in CF Administrator so don’t miss checking that part of the video as well.
Video:
Using ColdFusion Debugger
Suggestions are welcome!

Remote Server Setup – MultiServer/ J2EE installation

Remote server setup for a Multiserver is explained here. Its a long post but I hope its worth it :)
Setting up a Remote MultiServer:
What do you need: A Remote MultiServer, A local CFBuilder installation, AdminServerComponents.zip
Setup: Unzip only two files – admin_jvm.config, and adminstart.bat/adminstart.sh from the AdminServerComponents.zip in the JRun4\bin directory of the remote machine. Example: C:\JRun4\bin
Procedure:
Steps: On the Remote Machine:
A1. Connect to your remote machine(lets call it ‘bhakti04′) and ensure that the files adminstart.bat, adminstart.sh, admin_jvm.config have been extracted to {JRun4_home}\bin
A2. Change the security Properties file located at {JRun4_home}\lib and change the
jrun.subnet.restriction and jrun.trusted.hosts to *. This is done that there is unrestricted
access to your remote CF Server. You could even add the IP of the machine on which CfBuilder is running. But for the demo purpose I am going to make it *.
A3. Goto {JRun4_home}\bin and run the adminstart.bat(for Windows) or adminstart.sh(for MAC). A console will open and admin will start. Check the port on which the
admin is running.I am going to assume its ’2910′ for further steps.

Steps: On the CFBuilder:

B1. Open the Add server Wizard.
B2. Fill the wizard fields as follows:
Screen 1:
Server Name: This is a user friendly name you want to give the remote server. I am going to call it. “Bhakti’s Desktop”
Description: The description for this server. I am going to say, ” This is a Standalone CF 8 server”
Host Name: The IP address or machine name. In my case, “bhakti04″
IsRemote: This should get automatically selected after entering the host name as “bhakti04″
Webserver port: The port on which your remote CF Server is running. Since my remote server is running on 8500, that would be my entry.
Context Root: If your install is a MultiServer install then you can ignore this. but if the CFInstall is a J2EE installation then specify the context root.
Application Server Name: If your install is a MultiServer install then you can ignore this. but if the CFInstall is a J2EE installation then specify the Application Server Name here.
RDS UserName: User Name of the RDS Server. This is the uname/pasword you specified for RDS while installing ColdFusion Server. If you dont enter this, your remote datasources and files will not be available to CFBuilder. My RDS Uname is ‘admin’
RDS Password: RDS Password. ‘admin’ in my case.
Screen 2:
Naming Port: This is the naming port of the admin server.In step A3 I asked you to keep a note of this one. Default is 2910 and so is it in my case.
User Name: This is the JNDI User Name. You can find it in jrun-users.xml at {CFServer_Home}\runtime\servers\admin\SERVER-INF
Password: This is the JNDI password. Found at same as above.
Document Root: Document root of the CF Remote Server. Precisely the location where your CFIDE resides. Its “C:\ColdFusion8\wwwroot” in my case. Other examples: C:\Inetpub\wwwroot or \opt\htdocs\wwwroot
B3. Hit Finish
You might see the status as ‘Unknown’ for a second or so. In such cases you will also see the “Getting Server Status” in the bottom right corner.After the “Getting Server Status” action is completed, the status should be seen as “Running”.
In case your status is “Unknown” even after the above mentioned operation is over, just switch to the console to check if any error is thrown.
I have specified the errors that you might face in the previous post. Do have a look in case you have missed it.
Apart from those if you face any other issues then please feel free to add them as a
comment.

Remote Server Setup- Standalone

The Remote Server setup in CFBuilder has been a topic of discussion on the forums and the response received for the remote setup hasnt been very positive. I tried to answer as many questions on the forum as I could but still there always remains some ambiguity.The documentation team has worked very hard to be explanatory but looks like it isn’t enough.
This is yet another try to simplify things.
I want the readers here to co-operate with me for two things:
1. Please dont have any pre-followed process or assumptions in your mind before reading this post or the following ones on the same topic.
2. Try to follow the steps mentioned here to set up a remote server(may be just a mock) to get the satisfaction that you could actually connect to one. :)
Instead of talking in general about a remote server setup I am going to split this to explain the setup for Standalone Servers and MultiServers.
So those of you who are not interested in Standalone can skip this one and read the following post.
Setting up a Standalone Remote Server:
What do you need: A Remote Server, A local CFBuilder installation, AdminServerComponents.zip
Setup: Unzip the AdminserverComponents.zip in the remote CF Server Home directory. Example: C:\ColdFusion8
Disclaimer: In case your remote server is CF9-beta you don’t need this .zip file. Just directly goto Step A3 below.
Procedure:
Steps: On the Remote Machine:
A1. Connect to your remote machine(lets call it ‘bhakti04′) and ensure that the files adminstart.bat, adminstart.sh, admin_jvm.config have been extracted to {CFServer_Home}\runtime\bin
A2. Change the security Properties file located at {CFServer_Home}\runtime\lib and change the
jrun.subnet.restriction and jrun.trusted.hosts to *. This is done that there is unrestricted
access to your remote CF Server. You could even add the IP of the machine on which CfBuilder is running. But for the demo purpose I am going to make it *.
A3. Goto {CFServer_Home}\runtime\bin and run the adminstart.bat(for Windows) or adminstart.sh(for MAC). A console will open and admin will start. Check the port on which the
admin is running.I am going to assume its ’2910′ for further steps.

Steps: On the CFBuilder:

B1. Open the Add server Wizard.
B2. Fill the wizard fields as follows:
Screen 1:
Server Name: This is a user friendly name you want to give the remote server. I am going to call it. “Bhakti’s Desktop”
Description: The description for this server. I am going to say, ” This is a Standalone CF 8 server”
Host Name: The IP address or machine name. In my case, “bhakti04″
IsRemote: This should get automatically selected after entering the host name as “bhakti04″
Webserver port: The port on which your remote CF Server is running. Since my remote server is running on 8500, that would be my entry.
Context Root: Not Applicable for Standalone
Application Server Name: Not Applicable for Standalone
RDS UserName: User Name of the RDS Server. This is the uname/pasword you specified for RDS while installing ColdFusion Server. If you dont enter this, your remote datasources and files will not be available to CFBuilder. My RDS Uname is ‘admin’
RDS Password: RDS Password. ‘admin’ in my case.
Screen 2:
Naming Port: This is the naming port of the admin server.In step A3 I asked you to keep a note of this one. Default is 2910 and so is it in my case.
User Name: This is the JNDI User Name. You can find it in jrun-users.xml at {CFServer_Home}\runtime\servers\admin\SERVER-INF
Password: This is the JNDI password. Found at same as above.
Document Root: Document root of the CF Remote Server. Precisely the location where your CFIDE resides. Its “C:\ColdFusion8\wwwroot” in my case. Other examples: C:\Inetpub\wwwroot or \opt\htdocs\wwwroot
B3. Hit Finish
You might see the status as ‘Unknown’ for a second or so. In such cases you will also see the “Getting Server Status” in the bottom right corner.After the “Getting Server Status” action is completed, the status should be seen as “Running”.
In case your status is “Unknown” even after the above mentioned operation is over, just switch to the console to check if any error is thrown.
I have tried to prepare a list of the kind of errors thrown while connecting to Remote Server
and how to recover from them.
1. jrunx.rmi.RemoteInvocationHandler; ….. – We used to have a Version field earlier in Server Wizard. But that was creating a confusion. In the proocess of removing it and using some logic, this message gets Thrown. It is an absolutley HARMLESS message and can be *IGNORED*
2. Unable to fetch server mappings. Reason: null – Again this message is a bug from our side. It is a Harmless message and can be IGNORED.
3. The connection to the remote JNDI server on Host XYZ at port 2910 has failed(as have all backup hosts listed, if any) – please verify thet the server is running and the NamingService is available. – This message is thrown if your admin server is not running on the remote machine. You need to ensure if step A3 is performed.
4. One case where the status is “Unknown” and the console says “Server is available, getting server status”. The Status still remains unknown after that.- Connect to the remote machine and check the console of the admin that we ran in step A3. If it says “Security Alert….. ” then your Security.properties is not set properly. Check what you need to do in Step A2 above.
Apart from all these if you face any other issues then please feel free to add them as a
comment.
Will write the post for Multi Server in a couple of Hours.

Previewing a File in 1-2-3 Steps

3 things are necessary here:
1. It is necessary that the file you want to preview is in webroot.
2. It is necessary that the file is a part of a project in CFBuilder.
3. It is necessary that a server is associated with this project.
Considering these conditions the three steps should be as simple as:
1. Create/Import a Project in CFBuilder and create a cfm/cfc in it.
2. Associate that server with this Project, whose webroot will contain your file to be previewed**
3. Move to the Firefox/IE tab from the Source tab to internally preview this file. Else right-click on the editor and say Run As -> ColdFusion Application to open it in external browser.
**Checkpoint: A checkpoint for preview to be successful is that when you associate a server with a project the ‘Sample URL’ field below it shows the url for the project correctly.
The same checkpoint also holds good when you want to debug. You will see me re-iterating this in my post on Debugging.
Note: Though the F12 like shortcut key is not available to preview a file, there is a small button(green arrow) at the top in the tool bar. Clicking this button will run the currently opened cfm.

Server Manager

As the name suggests CF Builder comes in with a packaged Server Manager giving you the ability to add various ColdFusion Servers and manage all of them under one roof.
In the public beta build you should be able to add CF8 and CF9 – Standalone, MultiServer and J2EE Installations. For now we are providing support only to JRun based CF Servers.
When I say, you can manage servers I mean that once these servers(local or remote) are added in CFBuilder you can do the following the things with it :
- Start/Stop/ Restart Remote as well as local servers.
- Launch your administrator page(CFIDE) and make changes in it within CFB.
- Launch your Server Monitor and do related tasks
- View the server logs.
- Have the server collect mappings for you so that the content assist and CFC wizard gives you the fully qualified name(Believe me you are going to love this and I am going to talk more about it soon)
- Flexibility to have the CF server running as a Service or through Console.
- Flexibility to restrict users from starting-stopping remote servers.
- SSL Support
If you want to know specifically about any of the above just write a comment so that I can take that up on priority.
Needless to say, the Preview and Debugging(Local and Remote) are Courtsey, Server Manager!
And all you need to do is just add a valid server, specify its Doc root correctly and rest is taken care of.
As far as possible we have tried to keep the processes and user actions simple. But while supporting considerable configurations and providing features, things tend to get complicated. :)
That is it, for the first post. I have a lot to mention about Server manager and CFBuilder in general and will be doing so in the next sets.

Adobe ColdFusion Builder Public Beta

Adobe ColdFusion Builder peeks out of the door and everyone wants to have a look!
Most of you reading this are aware that the Adobe ColdFusion Builder’s Public Beta is now available. For those who
don’t, I guess its high time you rush and get it installed :)
For introduction, we would like to point you to Ben Forta’s Write-up on CFBuilder.
Apart from what Ben says, we will be posting stuff which take you on a Macro-Tour of the CFBuilder features.
Though this is a ColdFusion Builder Team Blog, all opinions mentioned here are personal.
Our aim here is to showcase all that you will find and that you might miss when using ColdFusion Builder!