Skip to main content
Inspiring
October 27, 2017
Answered

ColdFusion 2016 update 4 - Could not find or load main class –jar

  • October 27, 2017
  • 1 reply
  • 1424 views

I've had no luck trying to install update 4 on ColdFusion 2016 using the administrator. It seems to have problems stopping and restarting CF (message: server taking too long to restart). While the system information indicates the correct version (2016.0.03.302561) the updates page still indicates that update 4 has not been installed and the install log shows the following:

Installation: Unsuccessful.

2009 Successes

0 Warnings

3 NonFatalErrors

3 FatalErrors

Action Notes:

Moving files failed:: Failed to back up the previous hotfix files. Retry installation after ensuring that the server is not running or files are not locked by the server.

Failed to delete directory: Ensure that the server is not running or files are not locked by the server.

Based on Charlie Arehart's suggestion here: http://www.carehart.org/blog/client/index.cfm/2016/9/6/solve_common_problems_with_CF_updates_in_10_and_above

I thought I'd try a manual installation. But I keep getting the error 'Could not find or load main class -jar':

Stop the ColdFusion Application Server service, then run following as Administrator:

PS C:\Windows\system32> CD C:\ColdFusion2016\cfusion\hf-updates

PS C:\ColdFusion2016\cfusion\hf-updates> C:\ColdFusion2016\jre\bin\.\java –jar hotfix-004-302561.jar

C:\ColdFusion2016\jre\bin\.\java : Error: Could not find or load main class –jar

Windows 2012 R2.

Any suggestions?

Thanks

Bob

    This topic has been closed for replies.
    Correct answer Charlie Arehart

    Bob, it looks to me like somehow you are using an em-dash for the -jar (note the difference in –jar, where the dash is a little longer), since it's complaining not that it can't find the hotfix jar itself, but can't find a class itself named "–jar".

    This is a common problem when copy/pasting things from the web, where some html editor (used by someone typing something for display on the web) changes a such a dash to an em-dash. But I have confirmed I don't have one on my blog post. Perhaps you found it somewhere else. 

    Anyway, on your command line, just hand-type a dash before before the jar argument, and you should be good to go.

    (PS I'm curious if you had tried to report this concern as a comment on my post. I don't see one.)

    1 reply

    Charlie Arehart
    Charlie ArehartCorrect answer
    Community Expert
    October 27, 2017

    Bob, it looks to me like somehow you are using an em-dash for the -jar (note the difference in –jar, where the dash is a little longer), since it's complaining not that it can't find the hotfix jar itself, but can't find a class itself named "–jar".

    This is a common problem when copy/pasting things from the web, where some html editor (used by someone typing something for display on the web) changes a such a dash to an em-dash. But I have confirmed I don't have one on my blog post. Perhaps you found it somewhere else. 

    Anyway, on your command line, just hand-type a dash before before the jar argument, and you should be good to go.

    (PS I'm curious if you had tried to report this concern as a comment on my post. I don't see one.)

    /Charlie (troubleshooter, carehart. org)
    bobk1Author
    Inspiring
    October 28, 2017

    Charlie,

    Yes it was an em-dash copied from another site. And now I realize that the error message was actually pointing that out (I'm not java savvy). Correcting that allowed it to update, and after a bit of conflict between the launcher application process (running) and the CF service (stopped) I was able to get things running smoothly.

    No, I didn't think to add a comment to your post.

    Thanks for your help -- much appreciated (couldn't see a place to click  'correct' but it was the answer)

    Bob

    Charlie Arehart
    Community Expert
    October 28, 2017

    Hi, Bob, thanks for the update and glad to have helped. As for marking an answer as correct, that is something you should be able to do (and is appreciated, on behalf of all readers). There should be a "correct" button appearing below each post, that you would click. If you don't see it, try doing a search for it in your browser.

    But if you still don't find it, I think I could mark it as such (being a forum admin), though it really does look better if the original poster does that (especially given that it's an answer I offered). Still, with our discussion here to clarify it I will be happy to do it if you don't find how to. Thanks for offering.

    /Charlie (troubleshooter, carehart. org)