Skip to main content
Known Participant
December 11, 2013
Answered

CFCOMPILE compatability

  • December 11, 2013
  • 1 reply
  • 1174 views

Hi,

There are some topics on this on the forum, but I am still not sure what to do.

We have the application and several clients with different CF server versions. I tried to compile some files on CF7 with -deploy option, but CF9-10 gives error "javax/servlet/jsp/JspContext". Does somebody know the workaround?

Thanks,

Anton

This topic has been closed for replies.
Correct answer Carl Von Stetten

Anton,


That's what I suspected.  Since each version of ColdFusion typically runs on a different major release of Java (1.4 vs. 1.6, etc.), compiled code from one release of ColdFusion will likely not work on another version.  Even if the same Java version is being used (1.6) between CF9 and CF10, there are no guarantees that the compiled code is compatible between the ColdFusion versions, especially going backward from CF10 to CF9.  I think you'll need to compile separately for each version of ColdFusion.

-Carl V.

1 reply

Carl Von Stetten
Legend
December 12, 2013

Anton,

Do you get that error when you run the "cfcompile -deploy ..." command on CF9/10, or when you try to deploy the compiled files from CF7 onto CF9/10?

-Carl V.

Known Participant
December 12, 2013

Carl,

I get this message in the CF error log then I try to access complied file on site. Site screen is just empty.

I have tried to compile files on CF7, Java Ver 1.4.2_09 and run it on CF9, Java Ver 1.6.0_17. Both are 32 bit.

Also I tried to compile file on CF10, Java Ver 1.6.0_34, 64 bit and run on both servers above. I suppose, bitness should match.

Of course, CF7 compiled files work fine on the same CF7 server.

May be I should mention that only reason we want to compile files is to prevent clients to see the code. Encoding doesn't work for us, as it is too easy too decode.

Anton

Carl Von Stetten
Carl Von StettenCorrect answer
Legend
December 12, 2013

Anton,


That's what I suspected.  Since each version of ColdFusion typically runs on a different major release of Java (1.4 vs. 1.6, etc.), compiled code from one release of ColdFusion will likely not work on another version.  Even if the same Java version is being used (1.6) between CF9 and CF10, there are no guarantees that the compiled code is compatible between the ColdFusion versions, especially going backward from CF10 to CF9.  I think you'll need to compile separately for each version of ColdFusion.

-Carl V.