ColdFusion 11 - MySQL no Suitable Driver

For reasons too complicated to get into, ColdFusion 11 no longer ships with a JDBC driver for MySQL. This is a change over previous versions of ColdFusion. Largely, this is because of a license issue relating to redistributing the Jar file.

How to fix it

The fix is easy:

  1. download the JDBC driver JDBC Driver for MySQL (Connector/J) here: http://dev.mysql.com/downloads/connector/j/.
  2. in the Platform select box, choose platform independent
  3. next, choose the tar or zip version appropriate for your platform. If you don't know which to pick, choose the zip version.
  4. next, on the screen titled "Begin Your Download - mysql-connector-java-5.1.35.zip", scroll to the bottom and choose the small link "No thanks, just start my download."
  5. finally, once the download completes, extract "mysql-connector-java-5.1.35-bin.jar" and put it in the lib directory of your CF install. For me it is located at: C:\ColdFusion11\cfusion\lib (your platform and coldfusion edition impacts the path for you.
  6. restart ColdFusion and validate your datasource in the ColdFusion Administrator.

That's all there is too it!

Presentation Files - Our application got popular and now it breaks!

I've just posted the presentation "Our application got popular and now it breaks!" that was delivered at Dev.Objective() 15. If you were at the conference and would like the presentation files, you can find a PDF version here. You can also view this presentation on Slideshare

So you helped build a cool application and the public is flooding your site with traffic. What's that smell? Is a server on fire? Oh No! If only you'd thought more about the performance implications of some of your decisions, things would be better. Now, the phones ring at 4AM with angry customers, rousing you out of bed. There isn't enough coffee in the world to get you through these disastrous weeks ahead. You could have avoided all of this by coming to this session.

Bullet Points:

  • Simple design decisions that come back to bite you
  • How to use infrastructure for fun and profit
  • Making the data tier work for you
  • Performance traps and how to get out of them
  • How to be sure your application can handle popularity
  • The audience should have a working knowledge of server programming

Senior Software Developer / Architect / Dev Ninja (Durham, NC)

Local Job Posting for friend. This is a good position for a high quality ColdFusion person who understands start up culture and wants to make a difference!


We are seeking a Senior Web Developer / Architect / Dev Ninja to join our team. Be a part of a young organization with a disruptive idea and good momentum in need of your technical creativity and expertise. The chosen candidate would have the opportunity to help establish the processes and standards for the team and contribute to high-level architectural decisions. We want someone who has "been there and done that" who can help us plan for the future and avoid common growing pains as the team and application increase in scale.

The goal of our company and application is to increase efficiencies in athletic organizations by leveraging the latest technologies to improve collaboration, communication and data analysis. Our application is used daily by coaches and athletes at several top universities and your contributions would have a direct impact of the workflows of these organizations. We are a small and informal but fast-paced team that likes to have fun while delivering impactful solutions.

Responsibilities:

  • Collaborate on technical vision and direction for application and integration with other systems or devices.
  • Produce code in a timely manner that is reliable, scalable and secure.
  • Provide guidance on refining the entire SDLC including requirements, project management, source control and deployment.

Qualifications:

  • 5+ years of development and architecture experience working on a large web application.
  • Experience with object-oriented programming and methodologies including common design patterns with knowledge of ColdFusion or other java technology preferred.
  • Must demonstrate ability or previous experience with scalability concepts and strategies such as caching at various levels in the stack.
  • Experience with TDD and unit testing.
  • Working knowledge of HTML, CSS and JavaScript a plus.
  • Good knowledge of relational database systems and SQL would be preferable.
  • Ability to write technical and functional specifications.
  • Experience with Agile concepts and methodologies.

This is a full-time position and you would be expected to either live in the Triangle area or be close enough to spend most of your time at our office located in Durham, NC. Please send a resume and links to any previous projects if possible to jobs [at] lasllc [dot] com

How to solve error: [Oracle JDBC Driver]Transliteration failed, reason: invalid UTF8 data

I got a strange error "[Oracle JDBC Driver]Transliteration failed, reason: invalid UTF8 data" while working on a client system. I spent a reasonable amount of time trying to work out what caused this.

The Oracle database was a restore of an Oracle 8.1.6 system onto the new Oracle XE 11.2. During the import, the character sets changed.

  • export client uses WE8ISO8859P1 character set (possible charset conversion)
  • export server uses WE8ISO8859P1 NCHAR character set (possible ncharset conversion)
  • import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
  • import server uses AL32UTF8 character set (possible charset conversion)

So, I'm guessing since the new database did a conversion of NCHARSET from WE8ISO8859P1 to AL16UTF16, the size of the characters threw off something. Thus, there were problems and none of the queries on certain tables worked.

The Solution

The DataDirect Oracle Driver that ships with ColdFusion 9 has an error in it. It appears the error is fixed and if you have an agreement with the provider, you can download an update. However, I don't have an agreement so I downloaded fresh Oracle JDBC Drivers to fix the problem. Here's what I did:
  • Download the drivers here: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
  • I used the ojdbc6.jar one.
  • Copy the ojdbc6.jar file to /JRun4/lib (or, if you wanna be fancy, put it somewhere else and update the class path in the jvm.config pertaining to the instance you want to update)
  • Restart ColdFusion
  • Enter the following in the JDBC URL field: jdbc:oracle:thin:username/password@IP.Address.Of.Database.Server:PortOfDatabaseServer:OracleSID
  • Enter the following in the Driver Class field: oracle.jdbc.driver.OracleDriver
  • Add the user name and password in the appropriate boxes
  • Save the datasource. It should verify if you did everything correctly.

If you got an error, remember these things:

  • Usernames, passwords and seemingly the Oracle SID are case sensitive
  • The JDBC Url Field is particular and must be exactly right.
  • The default port for Oracle is 1521

ColdSpring 2.0 Alpha 1 Released! Your Help Needed!

Mark Mandel posted information about the ColdSpring 2.0 Alpha release and I wanted to make sure it got out to the general public. There is a documentation contest running and your help is requested in trying out the release and helping to identify issues. Make sure you have joined the ColdSpring Users Group as this is the best way to give and get information about ColdSpring.

Mark's Post is below for your reference

ColdSpring 2.0 Alpha 1 is now available for you to download and test!

Major features included in this release:

  • Enhanced underlying architecture for greater extensibility
  • XML Schema For ColdSpring configuration files
  • New BeanDefinition architecture
  • BeanFactoryInterceptors for intercepting BeanFactory lifecyle events
  • BeanProcessInterceptors for intercepting Bean lifecyle events
  • XML Custom Namespaces for defining your own XML dialect for creating and configurating beans
  • Aspect Oriented Programming (AOP) Custom XML Namespaces
  • Greatly extended AOP functionality with AOP expressions
  • ColdFusion 9 ORM Integration classes
  • Utility Custom XML Namespace for creation of data structures
  • Enhanced error reporting
  • Multiple Bean Scope support – beans can be prototype (transient), singleton, as well as request or session scope bound

More details can be found in the release notes, and my blog post: https://sourceforge.net/apps/trac/coldspring/wiki/NewInColdSpring2.0 http://www.compoundtheory.com/?action=displayPost&ID=537

We are also running a competition to help flesh out the missing pieces of the documentation, with an opportunity to win a copy of ColdFusion Builder!

Details can be found here: http://www.compoundtheory.com/?action=displayPost&ID=538

Happy testing!

Thanks to all have been involved in this release!

Long Live the Conference!

Last year, one of the major tech conferences, CFUnited, closed it's doors for good. This left a hole in the learning and networking opportunities for ColdFusion developers. I gained much from going to CFUnited over the years. It helped me personally and also professionally. The opportunities to learn from the best minds in the business and develop my skills have been some of my fonder memories of my career.

I would like to invite you to take part of a Technology Conference my group is organizing on Sept. 17-18. The price is minimal, only $60 for 40 sessions and 2 hands on classes! This is our third conference and we guarantee you will have a good time.

Space is very limited so register as soon as you can!

The conference will cover a wide variety of web development and design topics including Web and Mobile technologies. See the schedule here: NCDevCon 2011 schedule

Registration for the event will be $60 which includes:

  • Entry to the weekend event and all presentations
  • Lunch (both days)
  • Coffee, drinks and snacks (both days)
  • Conference shirt

Also available are 2 hands on sessions. We will walk you through building your first web application and also building your first mobile application. These hands on courses are included in your admission fee.

Registration:

Our EventBrite Registration Link

Can't go? You can still help!

We have a nice NCDevCon flyer for you to forward to your co-workers or hang in your break room. We'd appreciate it!

Job Opportunity Near Boston for Mid-Level CF Developer

I'm posting this job opportunity for a friend. This opportunity is for a mid-level ColdFusion developer who is entrepreneurially minded and wants to be a key member of a growing and exciting team. Slackers need not apply! If you are interested, Contact Me with your resume text and contact info and I'll pass the information on to the right person.

Job Description

We need a mid-level programmer to aid in the development on our Coldfusion platform. The system was developed in 2005 as a Content Management, Ecommerce, and Ticketing system. The Company has been growing very quickly over the past 2 years, with explosive growth in 2010. In order for the Company to continue to grow they must increase their efficiency and build more automated processes into the platform.

This programmer will report to the team lead and will be responsible for delivering well-written, quality software as a team member both on time and within scope.

Responsibilities

  • Function both independently as well as within a team, participating in on-going prioritization, management, development, testing and delivery of internal and external-facing web applications
  • Consult with management to identify requirements and priorities for web product development, as well as opportunities to improve Paid's performance of this function. Administer, tune and troubleshoot any of the applications in our web applications portfolio
  • Estimate, justify, and communicate budget requirements for projects
  • Aid in post-project documentation
  • Keep abreast of industry trends and developments. Research new technologies and provide recommendations

MINIMUM QUALIFICATIONS

  • 3+ years experience with ecommerce platforms & content management systems
  • Experience dealing with large-scale order processing and manifesting systems a plus
  • Direct experience in high-volume, large-scale, web-based applications
  • 3+ years building web applications in a code managed, multi-tier development environment with process release management in place
  • 1+ years experience with SQL Server specifically, including experience with: Relational Database design, along with creation of stored procedures and user-defined functions
  • 3+ years experience with ColdFusion specifically, including experience with: Coldfusion specific development - CFCs, custom tags
  • Understanding of ColdFusion Server development environment (mappings, application architecture, variable scoping, client/session management, error handling, transactions, etc.)
  • Proficiency with Subversion
  • Ability to handle multiple competing priorities in a fast-paced environment
  • Position available in our new Westborough, MA offices. While the role will require interaction with the actual day-to-day processes and individuals performing those tasks, we are flexible and allow for day(s) of telecommuting per week.

Direct candidates only at this time. (No agencies please)

Filter Directory Contents By Multiple File Extensions

Query of Queries really helped me out this morning. The Model-Glue team is working on a ColdFusion Builder extension and we need to get a list of files to inspect. There could be many types of files in a project that aren't relevant to our purposes and I wanted to filter only the ones I need.

My Directory query contained lots of SVN specific files, which make for a good example of what we want to filter, before doing our inspection work.

Original Directory Query

What we need in this case is to filter anything that isn't a CFM, CFC or XML file. The CFDirectory tag will allow only a single filter, so what do we do?

In ColdFusion, I would use listlast( filename, ".") to look at the file extension but that would mean I'd have to unpack the query and either make a new one, or pack it in another datastructure. Waste of code, I tell ya. I ended up using Query of Queries and a LIKE statement to filter.

New Directory Query

The Code I Used for the Query of Queries

view plain print about
1<cfquery name="CleanedDirectoryQuery" dbtype="query">
2    SELECT *
3    FROM arguments.sourceDirectoryQuery
4    WHERE lower(NAME) LIKE '%.cfm'
5        OR lower(NAME) LIKE '%.cfc'
6        OR lower(NAME) LIKE '%.xml'
7</cfquery>

The secret sauce is the lower() function on NAME, and the LIKE conditional with a wildcard % operator. I found this through the Query of Queries documentation and I also learned about a few other wildcard operators as well.

List of Wildcard Operators Supported In Query of Query LIKE conditional

  • The underscore (_) represents any single character.
  • The percent sign (%) represents zero or more characters.
  • Square brackets ([ ]) represents any character in the range.
  • Square brackets with a caret [^] represent any character not in the range.
  • All other characters represent themselves.

Simple and maintainable. Just how I like it. Thanks #ColdFusion!

Special Guest Josh Adams Presents ColdFusion Builder in RTP March 30th

Special Guest, and TACFUG favorite, Josh Adams from Adobe will visit March 30th to present a special session on ColdFusion Builder. Food and drink will be provided and all are welcome.

Directions and RSVP are at the TACFUG Home Page

Make sure to tell your friends and co-workers about this special event!

I present Making Bad Code Good 2010 to The CFMeetup at Noon Today

If you can join the Online ColdFusion Meetup today (March 18th) at noon EST, we'll talk about code, code quality and show you some techniques to help you make bad code good.

This presentation picks up where my 2009 Making Bad Code Good presentation leaves off. Same great concept with all new code samples and techniques.

If you work on a legacy application, or on code built by lots of developers over the years, you likely laugh your way through this presentation. I promise to be thought provoking and challenge the way you write code. In this session, we'll look at lots of code samples and walk through making incremental changes to speed development, reduce errors and make life easier for everyone involved.

Ideas and concepts in this presentation will help you improve your existing applications and write more maintainable code.