1

I'm working on upgrading an app from MX7 to 9 and testing it on my Mac's Dev server. I have a page with a large cfswitch--20 or so different cases, but none more than about 10-12 lines long. In CF9 only, whenever one of these cases does a cfinclude (which is almost all of them), I get an error along the lines of:

org.apache.bcel.generic.ClassGenException: Invalid branch target position offset for jsr[168](3):-1: -1: astore[58](2) 27 at
cfindex2ecfm581352809._factor4(/Users/dlaughland/Workspace/abcapp/surveymanager /surveys/survey/index.cfm:34) at
cfindex2ecfm581352809._factor28(/Users/dlaughland/Workspace/abcapp/surveymanager/surveys/survey/index.cfm:33) at
cfindex2ecfm581352809.runPage(/Users/dlaughland/Workspace/abcapp/surveymanager/surveys/survey/index.cfm:1) at
cfApplication2ecfc1705547767$funcONREQUEST.runFunction(/Users/dlaughland/Worksp ace/abcapp/Application.cfc:215)

I have googled extensively, and the best explanation I can find is a JDK error that was supposedly fixed in MX7! What is causing this? How do I fix it? This isn't the only page with a large cfswitch so I really don't want to re-write everything into cfif structures.

jabberwik
  • 403
  • 4
  • 9
  • file a bug: http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=83504 – Henry Jul 06 '10 at 23:11
  • I suppose I will, but I was sort of hoping for a solution that doesn't involve a 6-month wait and no guarantee. ;) – jabberwik Jul 06 '10 at 23:56
  • Try taking the code from one of those includes and put it in the CFCASE statement instead. You may get a better error message one whatever is wrong there or you'll know that there's some issue with how you're using CFINCLUDE and can possibly explore other techniques. – ale Jul 07 '10 at 13:04

2 Answers2

0

You can file a bug, but here are some steps that might help you work around the issue.

  1. Try updating your JRE version, you can get the latest and greatest here. You can then ask CF to use that JRE via your CF Admin > Server Settings > Java and JVM. Further instructions here.
  2. Try using a servlet container, for example use Tomcat instead of the bundled JRun. Here are some instructions.

Can I ask if you are going to use this in production on a Mac? If not, try running your code on a OS that will mirror your live site. The bug (if it is a bug) may not be in that version of CF.

Hope something there helps.

Ciaran Archer
  • 12,316
  • 9
  • 38
  • 55
  • I had considered that it's a Mac platform bug. I'm working on spinning up a virtual server that's a bit closer to our production servers. If that doesn't work, I'll try your Tomcat idea. Thanks for the feedback! P.S. On Mac, Java updates only come from Apple in the normal Software Updates. The latest version is 1.6.0_20b02. – jabberwik Jul 07 '10 at 15:41
  • I installed CF9 on our Linux environment and it gave me the same error. So it's not a platform bug. Tomcat is not an option since we don't have an Enterprise license. I do like it for my dev environment though. – jabberwik Jul 13 '10 at 17:41
0

If you upgraded from CF7 to CF9 with the code already on the server, try deleting all of the classes from WEB-INF/cfclasses and restarting CF.

  • Thanks for the feedback, but it's not an upgrade in this case. I did a clean install of CF9 to test the code out. – jabberwik Jul 13 '10 at 15:18