Skip to main content
Participant
July 8, 2019
Answered

ColdFusion 2016 from jre 8 to JDK-11 fails

  • July 8, 2019
  • 2 replies
  • 1601 views

After these steps to upgrade Java, CF services won't restart.

Current version of CF is 2016,0,11,314546  

Downloaded JDK 11.0.3 from Adobe download site, resides at C:\Program Files\Java\jdk-11.0.3  (without source code)

Stopped CF

Updated jvm.config

     #java.home=C:\\Program Files\\Java\\jre1.8.0_211

     java.home=C:\\Program Files\\Java\\jdk-11.0.3

Restart of CF fails.

Revert to JRE 1.8 and restart CF successfully.

No logs. Event log points to third party error and Service Specific Error Code 2.

What am I missing?

    This topic has been closed for replies.
    Correct answer carl type3

    Hi,

    What if you run CMD prompt as admin then change directory to CF2016\cfusion\bin and start CF via cfstart.bat. That might output if there is a Java syntax error.

    Could be Java 11 does not comprehend the Java 8 debug or GC logging settings.

    Regards, Carl.

    2 replies

    BKBK
    Community Expert
    Community Expert
    July 9, 2019

    What is the value of your java.args setting?

    Are there any error messages in the logs?

    Participant
    July 9, 2019

    There is only an entry in the event log that says could not start CF server... non-Microsoft service, refer to service-specific error code 2.

    No other log entries in CF found.

    Here is the jvm.config:

    #
    # VM configuration
    #
    # Where to find JVM, if {java.home}/jre exists then that JVM is used
    # if not then it must be the path to the JRE itself

    #java.home=C:\\Program Files\\Java\\jre1.8.0_201
    #java.home=C:\\Program Files\\Java\\jre1.8.0_211
    java.home=C:\\Program Files\\Java\\jdk-11.0.3

    #
    # If no java.home is specified a VM is located by looking in these places in this
    # order:
    #
    #  1) ../runtime/jre
    #  2) registry (windows only)
    #  3) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    #  4) java.exe in path
    #

    # Arguments to VM
    #Incase of Java 9 or higher add the following arguments to java.args
    #--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED  --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED -Djava.locale.providers=COMPAT,SPI

    java.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -server -Xms2048m -Xmx3072m --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED  --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHeapAtGC -verbose:gc -XX:+UseG1GC -Xbatch -Djava.locale.providers=COMPAT,SPI -Dcoldfusion.home={application.home} -Djava.awt.headless=true -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -javaagent:C:/FusionReactor/instance/DEV.cfusion.cf2016/fusionreactor.jar=name=DEV.cfusion.cf2016,address=8088 -agentpath:C:/FusionReactor/instance/DEV.cfusion.cf2016/frjvmti_x64.dll

    # Comma separated list of shared library path
    java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

    # Comma separated list of shared library path for non-windows
    java.nixlibrary.path={application.home}/lib

    java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

    Checked also on jetty/logs and found nothing there. Are there any other logs I should be looking for?

    BKBK
    Community Expert
    Community Expert
    July 9, 2019

    Some suggestions:

    • leave out -verbose:gc
    • delete unnecessary comments

    I have compared your version with a working version. See my private message. I shall send you the result when I get your e-mail address.

    Legend
    July 8, 2019

    Hi,

    For Java 11 You need to add these to JVM arguments:

    --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED  --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED

    -Djava.locale.providers=COMPAT,SPI

    EG:

    # Arguments to VM

    java.args=-server  -Xms2048m -Xmx2048m --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED -XX:MaxMetaspaceSize=640m  -Xbatch -Djava.locale.providers=COMPAT,SPI - etc

    HTH, Carl.

    Participant
    July 9, 2019

    After adding the arguments still not working. Made sure the arguments do not have any extra blanks or carriage returns.