I ran into an annoying one today. I have code that has been working for years, and recently moved lots of the core processing into a CFC. And everything kept working properly. I then started tinkering with Flash Remoting, and everything kept working properly. And then I tried invoking CFC methods via SOAP, that’s when I ran into all sorts of Axis errors.
The problem? The code was for adding a new profile, and so one of my parent directories was logically named “new”. That “new” become part of the package name, and “new” is a reserved word in Java. Renaming the directory solved the problem. What made this one painful was that “new” is fine for ColdFusion code, and even for CFCs accessed via Flash Remoting, it is only when Web Service access was introduced that this cropped up.
The moral of the story? Watch out for Java reserved words. http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html lists Java’s reserved keywords, it would be best to keep the list handy.
Leave a Reply