Skip to main content
November 27, 2006
Question

CFClasses

  • November 27, 2006
  • 1 reply
  • 602 views
I get this error message. I have no idea what this means. This app was running just fine. Then wham.

Here is the error message:

Errors reported by Java compiler: Found 1 semantic error compiling "D:/CFusionMX/wwwroot/WEB-INF/cfclasses/cfApplication2ecfm855244706.java": 1. public final class cfApplication2ecfm855244706 extends coldfusion.runtime.CFPage{ <-------------------------> *** Error: Cannot write class file "cfApplication2ecfm855244706.class" because that name conflicts with the name of the class file "cfapplication2ecfm855244706.class" in directory "cfclasses". This is illegal because file names are case-insensitive in this system.

Should I turn off "Save Class Files" in the admin? And what is this doing anyhow.

I see cfapplication2ecfm855244706.class in the cfclasses folder along with cfApplication2ecfm855244706.java (notice the capital A in application, but different file type) - is that the issue. Again, no clue what these do or why they are generated. So any guidance here would be greatly appreciated.


Thanks,

Lee

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 27, 2006
    > I see cfapplication2ecfm855244706.class in the cfclasses folder along with
    > cfApplication2ecfm855244706.java (notice the capital A in application, but
    > different file type) - is that the issue. Again, no clue what these do or why
    > they are generated. So any guidance here would be greatly appreciated.

    CF files are compiled to Java classes when you call them. As an
    intermediary step, the CFM is converted to .java (*), which is then
    compiled to a .class. Looks to me like you have recently renamed
    application.cfm (wrong) to Application.cfm (right). Java treats file names
    as case senstive; Windows does not. This discrepancy can cause issues...
    like the one you're seeing.

    The quickest way around it is to delete the offending .class file: it will
    be recreated (with correct casing) next time the file is compiled.

    There is little or no benefit of having the "save class files" setting on.
    It increases performance at server restart, but on the whole slows
    processing down slightly, as that directory gets very full, and CF has to
    file-scan it whenever a template is loaded to check to see if the stored
    class file is up to date. CF itself runs everything it can in RAM, so the
    files are only useful the first time they're loaded. I guess if you had
    your cached templates setting lower than how many templates you actually
    have (not advised), then you could get some benefit; but the preferred way
    is to cache the whole lot. Cache in RAM, that is; not the class files
    themselves.

    But short term: just delete that class file, and you can investigate all
    the other stuff at your leisure, later on.

    HTH.

    --
    Adam

    (*) I didn't think this actually happens in CFMX7 (or possible after 6.1?).
    Macromedia claimed the compilation was straight from CFM to in-memory
    bytecode...