Policy Automation for B2C Service

Get Involved. Join the Conversation.

Topic

    Kurt Helfrich
    OPA-E00476 Java 7 or later is required to run the embedded...Answered
    Topic posted July 31, 2017 by Kurt HelfrichGold Trophy: 10,000+ Points 
    353 Views, 18 Comments
    Title:
    OPA-E00476 Java 7 or later is required to run the embedded web server.
    Content:

    I had to update to OPA May 2017 recently, and today, I got a Java update notice.  I was behind, and Java updates are (usually...) harmless, so I updated to Java 8 Update 144.  I can see in Control Panel > Programs and Features that it's installed.  Now I get an error when I try to launch the debugger.

    Oracle Policy Modeling
    The debugger is not available: Java 7 or later is required to run the embedded web server.  Java 0 () was found.  (OPA-E00476)

    Help!

    Version:
    OPA May 2017

    Best Comment

    Kurt Helfrich

    It appears that our company IT has shot me in the foot yet again.  We are rolling out BeyondTrust's PowerBroker (or maybe PowerBorker?!?) software to control our access to our PCs, and I'm in the guinea pig group.  Once I stopped the 2 PowerBroker services (surprised that I could), I was able to debug.  Thanks, IT...

    Comment

    • Brad Tuckett

      Check the OPM diagnostics to see which Java path is being used.  Also check the environment variables JAVA_HOME and JRE_HOME.

    • Davin Fifield

      Although it doesn't specifically mention this error code, this topic gives you a hint that the JAVA_HOME variable needs to be set to the location of your Java runtime. Although this is usually taken care of automatically, sometimes installing a new JVM version can leave it pointing to an old version of the JVM runtime that is now uninstalled.

    • Kurt Helfrich

      The OPM Diagnostics (thanks for that tip, Brad) show the path to the correct 64-bit JRE location.  I have installed the 32-bit and 64-bit JRE and the JDK as well, all of the same version.

      I uninstalled and reinstalled Java and OPM (found 5 old versions still in there, got rid of them, too) just to make sure it picked up the latest settings, and that didn't help.

      OPM Diagnostics after the reinstall show the same (correct) path, but I get the same error.

      The full diagnostics showed that the JAVA_HOME variable wasn't set, so I set that from the Control Panel in the Environment Variables.

      OPM Diagnostics now show the same path in the summary results, but the full diagnostics now show that JAVA_HOME is set to the right path.  I'm getting the same error.  Here is the top part of the Full Diagnostics, which shows the path and JAVA_HOME values are the same.  I have 64-bit Win 7 - does it need to point to the 32-bit Java?  How do I override the value of JavaPath if so?

      ================================================================================
      Oracle Policy Modeling v12.2.7.797
      ================================================================================
      Environment.Is64BitOperatingSystem=True
      Environment.Is64BitProcess=True
      Environment.OSVersion=Microsoft Windows NT 6.1.7601 Service Pack 1
      Environment.Version=4.0.30319.42000
      Environment.WorkingSet=209936384

      JavaPath=C:\Program Files\Java\jre1.8.0_144

      ENVIRONMENT VARIABLES
      ---------------------
      JAVA_HOME=C:\Program Files\Java\jre1.8.0_144
      JRE_HOME=<NOT SET>
      NUMBER_OF_PROCESSORS=8
      PROCESSOR_ARCHITECTURE=AMD64
      PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
      PROCESSOR_LEVEL=6
      PROCESSOR_REVISION=3c03

    • Kurt Helfrich

      Changing JAVA_HOME to C:\Program Files (x86)\Java\jre1.8.0_144 didn't help, either.

      For the record, I never change the default locations of anything.  We are a software company, in part, and I learned that lesson years ago when I was one of the tech support engineers on the phones.  BAD idea.  Sure, it SHOULD work, but ...  Of course, as a tech support person, I saw that as job security at the time. wink

    • Davin Fifield

      What happens if you set JRE_HOME to the same value as JAVA_HOME?

    • Kurt Helfrich

      No change with either the 64-bit or 32-bit path in both variables.

      Is anyone else successfully using Java 8 Update 144? 

      Perhaps Update 144 changed the way it identifies itself.  I didn't see anything in the release notes that jumped out at me as a backwards compatibility killer.  Maybe I should uninstall and install the previous Java 8 Update 131 that worked.  I'll wait and see if anyone answers about Update 144.

    • Brad Tuckett

      Yes I tested OPM May 2017 with Java 8u144 - didn't see your issue.  Would be interested to know if Java 8u131 works!

      For sanity, can you confirm that typing "java -version" on the command line returns:

      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
      
    • Davin Fifield

      Clutching at straws here a bit - do you also have any JDK versions installed?

    • Davin Fifield

      Here's another approach that has worked for a similar problem experienced internally:

      In most end user installs on Windows, neither the JAVA_HOME nor JRE_HOME environment variables are set. Instead, the JRE installer adds something like this folder to the PATH environment variable:
      C:\ProgramData\Oracle\Java\javapath

      There is a java.exe shortcut in that folder that points to the default Java runtime.

      If you aren't doing Java development, you could try deleting your JRE_HOME environment variable, and it might just work.

    • Kurt Helfrich

      I do have JDK installed, but I do not do Java development.  I might try to uninstall it.  The path that is showing that OPM Diagnostics is for JRE, though, so I doubt it would matter.

      Regarding "another approach", I see the same "C:\ProgramData\Oracle\Java\javapath" value in my PATH.

      I tried removing the JAVA_HOME and JRE_HOME variables - no joy.

    • Davin Fifield

      What does java -version return? This is actually what OPM uses to determine whether a compatible Java version is installed.

    • Kurt Helfrich

      java - version results:

      java version "1.8.0_144"
      Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
      Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

      Does this tell you anything?

    • Davin Fifield

      Only that something very odd is happening, as the error message you are seeing would only occur if the java -version command returned something very different from this.

      Somehow the Java process being launched by OPM on your machine is not returning what it is expected when it is asked to tell OPM what version it is. This is why you get the odd message that says "Java 0 () was found". For the version of Java you have, it should say "Java 1.8 (1.8.0_144) was found". And if something were going wrong with running the java -version command, you would be seeing an entirely different error message. So, somehow, the process is launching, but not returning via stderr the results you are seeing when you are running java -version from the command line.

      That's the nuts and bolts of it. But right now it's not obvious what you can try next (or why upgrading to the latest Java update in the first place would have triggered this).

      Clutching at one other straw: did you accept the option to "reinstate Java security warnings" when you installed the latest Java version?

       

       

    • Kurt Helfrich

      I didn't see the option to reinstate warnings when I installed Java.

      I did try uninstalling all Java and OPM, then using CCleaner to find any leftover registry entries, like cleaning car parts down to the bare metal.  Reinstalling didn't help.

      I did get the debugger to start one time while I was trying to profile the disk and registry usage with Microsoft/SysInternal's ProcMon.  The computer was running really slowly as a result, so I'm wondering if there could be a timing issue.  That seems ludicrous today, but stranger things have happened.

      At this point in time, I just need this to work, and I can't afford any more time to experiment - is this something tech support can help with or am I on my own?

    • Brad Tuckett

      Yes this is worth raising an incident with customer support - let them know about this thread so they don't ask the same questions!