Highlighted

CF 2018 updater 7 breaks code

Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

Hi,

 

we're in the process of porting our application to ColdFusion 2018. The staging server was on CF 2018 updater 4 and the site worked well. We eventully updated to updater 7 and the site stopped working with exception: Branch Target Offset Too Large for Short

The code was not modified, the JAVA version stayed the same - 11.0.4. Only the latest ColdFusion updater was installed.

We returned to updater 4 as this was working.

We got this exception with a different code in CF 11 in the past, which worked in CF 2016. We can maybe shorten the code (break it down, whatever). It's a surprise to see this exception out of a sudden, as it used to disappear using a newer updater.

 

Has anyone of you experienced the same exception, recently? Which updater (5, 6, 7) introduced this behaviour?

TOPICS
Advanced techniques, Server administration

Views

391

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CF 2018 updater 7 breaks code

Participant ,
Dec 13, 2019

Copy link to clipboard

Copied

Hi,

 

we're in the process of porting our application to ColdFusion 2018. The staging server was on CF 2018 updater 4 and the site worked well. We eventully updated to updater 7 and the site stopped working with exception: Branch Target Offset Too Large for Short

The code was not modified, the JAVA version stayed the same - 11.0.4. Only the latest ColdFusion updater was installed.

We returned to updater 4 as this was working.

We got this exception with a different code in CF 11 in the past, which worked in CF 2016. We can maybe shorten the code (break it down, whatever). It's a surprise to see this exception out of a sudden, as it used to disappear using a newer updater.

 

Has anyone of you experienced the same exception, recently? Which updater (5, 6, 7) introduced this behaviour?

TOPICS
Advanced techniques, Server administration

Views

392

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 13, 2019 0
Adobe Community Professional ,
Dec 14, 2019

Copy link to clipboard

Copied

I haven't run into this problem, but my first guess would be to clear the cache of compiled scripts.

 

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 14, 2019 0
Adobe Community Professional ,
Dec 15, 2019

Copy link to clipboard

Copied

  1. I'm not aware of any change in updates 5-7 that should cause this (I have not heard anyone else report this error, about these updates or indeed in several years).
  2. Since you say the problem seems to have happened since applying the update, your first step should be to make sure there were no errors in the update. See the update error log, as I discuss in the post https://coldfusion.adobe.com/2019/03/problems-applying-cf-update-check-first/. If there's an error, I tell how to solve it.
  3. If that doesn't resolve things, then I'll add to what Dave offers: besides clearing the template cache (done via a button in the CF admin "caching" page), you should also for good measure stop CF and then delete the cfclasses folder in CF's cfusion/wwwroot/WEB-INF folder (NOT the classes folder, also in the same directory). The button only removes the compiled templates as held in memory, while deleting the files removes what's been saved on disk (and would be loaded into memory if the page was requested and was not already in memory).

 

Let us know how that goes.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 15, 2019 0
Adobe Community Professional ,
Dec 15, 2019

Copy link to clipboard

Copied

It is unlikely that the root of the problem is Update 7 of ColdFusion 2018. As you yourself say, the isuue arose in CF 11.

 

It might help to look at what Adam Presley's says in his blog. He found the cause to be a chain of if-else or switch-case statemen....

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 15, 2019 0
Bardnet LATEST
Participant ,
Dec 16, 2019

Copy link to clipboard

Copied

Thanks everyone for your replies.

Earlier today, I took the code and started up CommandBox. I planned to step through the versions, until the code broke. I started with 2018.4 and everything worked as I know it. I switched to 2018.5 and already got the error.

A chain of switch statements is indeed the reason for the exception and I can likely refactor the code and make it work.

Still, the code works in some CF versions.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 16, 2019 0