Clarity

 View Only
Expand all | Collapse all

15.6.1 and Java 11

  • 1.  15.6.1 and Java 11

    Posted Aug 19, 2019 07:07 PM
    Not sure what i need to do here. I get this error when trying to just use "xog" 

    C:\xog1561\bin>xog
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/niku/xog/client/XOGClient has been compiled by a more recent version of th
    e Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0​
    Important! After you download and install the XOG client, download the Java Runtime
    Environment (JRE) and set the JAVA_HOME variable. Complete this step before you
    verify the XOG client version and the connectivity.

    Can someone direct me? I have always used the zip file and set everything up myself.

    Since java 11 doens't come with a jre and its included inside the jdk, do i just set up the JAVA_HOME using the jdk path?  

    Any help would be most welcomed. Thanks!

    Keri


  • 2.  RE: 15.6.1 and Java 11

    Broadcom Employee
    Posted Aug 19, 2019 07:23 PM
    Edited by Nika Hadzhikidi Aug 19, 2019 07:26 PM

    Hi Keri

     

    Yes, you are correct, the JRE should be included in the JDK anyway.

     

    The issue you're having is most likely due to an old JRE version in your PATH. Please check the results of the following command in cmd:

    java -version

    If you have anything else than Java 11 you will have to correct your PATH on this PC. You can do it via JAVA_HOME and then include in PATH or just directly update PATH

     

    Hope this helps -Nika




  • 3.  RE: 15.6.1 and Java 11

    Posted Aug 20, 2019 10:55 AM
    @Hi Nika, Hope you're doing well!

    Thank you, that actually got me past the initial java issue.  I now have the issue
    C:\xog1561\bin>xog -propertyfile dev.properties
    Using https
    Configuring context for  TLS
    -----------------------------------------------------------
    PPM XML Open Gateway ( version: 15.6.1.265 )
    -----------------------------------------------------------
    XOG Invoke Failed
    Login Failed
    Turn verbose on for more detail.
    C:\xog1561\bin>

    In my properties file I do have verbose=on however, the error is actually a login error for the xog user i created. I can login using the account. 

    <?xml version="1.0" encoding="UTF-8"?>
    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
    <Object type="unknown"/>
    <Statistics updatedRecords="0" insertedRecords="0" failureRecords="0" totalNumberOfRecords="0"/>
    <ErrorInformation>
    <Severity>FATAL</Severity>
    <Description>XOG Invoke Failed</Description>
    <Exception type="com.niku.xog.XOGException">Login Failed: URL: https://cppm1234-dev.ondemand.ca.com:443/niku/xog user: xogadmin@anywhere.com</Exception>
    </ErrorInformation>
    </XOGOutput>

    The user has all necessary rights and such. Not sure what i am doing wrong. If you can shed some light, please let me know. Thank you!!!

    Keri


    ​​


  • 4.  RE: 15.6.1 and Java 11

    Broadcom Employee
    Posted Aug 20, 2019 03:24 PM
    Hi Keri
    I see. Can you try using the -sslenabled and see if that works to go through? Let me know! Thank you -Nika


  • 5.  RE: 15.6.1 and Java 11

    Posted Aug 20, 2019 03:46 PM
    Edited by Keri Taylor Aug 20, 2019 03:49 PM
    Nikka, I had to change back my java since other programs are still using 1.8. So, what line do i need to change in order to reference the new openjdk-11 in my xog.bat file please? I have my jdk here: C:\Java\openjdk-11\bin
    is it somewhere in here? 
    if "%1" == "-javaHome" (
      set JAVA_HOME=%2
      shift
      shift
    )
    if "%JAVA_HOME%" == "" (
      echo.
      echo Warning: JAVA_HOME environment variable is not set.
      echo.
    ) else (
      set PATH=!JAVA_HOME!\bin;!PATH!
    )​
    Thanks

    oh and yes, i already have sslenabled = true

    # --- server host name you want to test against
    servername=cppmxxxx-dev.ondemand.ca.com
    
    #portnumber=80
    
    #default port number for ssl
    portnumber=443
    
    #set to true if running against a SSL enabled server
    sslenabled=true
    verbose=on
    
    #set to true if running against a SSL enabled server in FIPS 140-2 mode
    fipsenabled=false​


  • 6.  RE: 15.6.1 and Java 11

    Posted Aug 20, 2019 03:52 PM
    Edited by Nick Darlington Aug 20, 2019 03:56 PM
    -sslenabled true is already set per this output:

    Using https
    Configuring context for  TLS


    I would not suggest changing the .bat file.  You should instead be able to specify the -javaHome parameter as it suggests (or looks for) at the top of the file when you run the command.

    So instead of this:

    xog -propertyfile dev.properties

    You'd use something like this:

    xog -javaHome c:\where\java11\lives-propertyfile dev.properties

    Just make sure that the path for the -javaHome value does not contain any 'funny' characters such as spaces and brackets, and that it is the folder just below the \bin\java.exe location, don't set it TO the \bin folder itself.

    EDIT: Corrected the order of the items in the path; the .bat file is quite specific at looking in the %1 position for the -javaHome property; which would mean it is the first item it should encounter.  Putting the parameters in another order may not work.




  • 7.  RE: 15.6.1 and Java 11

    Posted Aug 20, 2019 06:42 PM
    Edited by Keri Taylor Aug 20, 2019 06:52 PM
    Nick and Nika, i did the suggestion and am getting this:
    C:\xog1561\bin>xog -javaHome C:\Java\openjdk11\bin -propertyfile dev.properties
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/niku/xog/client/XOGClient has been compiled by a more recent version of th
    e Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at com.werken.forehead.Forehead.setupEntry(Forehead.java:298)
            at com.werken.forehead.Forehead.config(Forehead.java:256)
            at com.werken.forehead.Forehead.config(Forehead.java:131)
            at com.werken.forehead.Forehead.main(Forehead.java:579)
    C:\xog1561\bin>​
    C:\xog1561\bin>xog -javaHome C:\Java\openjdk11\bin\javaw.exe -propertyfile dev.properties
    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/niku/xog/client/XOGClient has been compiled by a more recent version of th
    e Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at com.werken.forehead.Forehead.setupEntry(Forehead.java:298)
            at com.werken.forehead.Forehead.config(Forehead.java:256)
            at com.werken.forehead.Forehead.config(Forehead.java:131)
            at com.werken.forehead.Forehead.main(Forehead.java:579)
    C:\xog1561\bin>​


  • 8.  RE: 15.6.1 and Java 11

    Posted Aug 20, 2019 11:54 PM
    Not quite, I said NOT the bin folder, but stop at the location below that one.

    As a result, the path it built was 'invalid' from its point of view, and it still found Java 8 first instead.

    Try this please:

    xog -javaHome C:\Java\openjdk11 -propertyfile dev.properties




  • 9.  RE: 15.6.1 and Java 11

    Posted Aug 21, 2019 02:50 AM
    ​Please try to use a different username which should not have @ . I think @ in the username is causing the issue.​​


  • 10.  RE: 15.6.1 and Java 11

    Posted Aug 21, 2019 03:19 AM
    At least with 15.6.1 as is used here, that shouldn't be an issue.

    You're more likely to face issues if (for example) the password contains an @ character, but the username does allow for it - or else a lot of SaaS customer accounts would be incapable of using XOG.

    E.g. via interactive XOG and then with a properties file XOG, with users containing "@"

    D:\Rego\Apps\15.6.1\xog-unzipped>bin\xog
    -----------------------------------------------------------
    PPM XML Open Gateway ( version: 15.6.1.265 )
    -----------------------------------------------------------
    Usage: xog


     login [user/passwd@host:port] Create new active session.
     logout                        Close active session.
     call <file>                   Invoke given XOG request.
     verbose <on|off>              Turn on verbose error logging.
     output <console|path>         Output to console or file.
     exit                          Logout and exit the shell.
     ?                             Display this help information.


     Examples:
       call xml/cmn_users_read.xml
    > login admin/admin@localhost
    Login: admin@localhost:80
    Login Succeeded
    > logout
    Logout Succeeded
    > login xogadmin@anywhere.com/admin@localhost
    Login: xogadmin@anywhere.com@localhost:80
    Login Succeeded
    > logout
    Logout Succeeded
    > exit

    D:\Rego\Apps\15.6.1\xog-unzipped\bin>find /i "@" test.properties

    ---------- TEST.PROPERTIES
    username=xogadmin@anywhere.com

    D:\Rego\Apps\15.6.1\xog-unzipped\bin>xog -propertyfile test.properties
    -----------------------------------------------------------
    PPM XML Open Gateway ( version: 15.6.1.265 )
    -----------------------------------------------------------
    Login Succeeded
    Request Document: ..\xml\cmn_users_read.xml
    Writing output to out.xml
     XOG Processing completed !
    Logout Succeeded





  • 11.  RE: 15.6.1 and Java 11

    Posted Aug 21, 2019 03:47 AM
    Edited by Nick Darlington Aug 21, 2019 04:02 AM
    Also the @ problem I speak of, only really applies to the interactive XOG client due to how it can parse the login string; such as having an @ in the username without including the password segment, or having an @ in the password and including that in the parsed string.

    Non-interactive is fine with it regardless.

    D:\Rego\Apps\15.6.1\xog-unzipped\bin>find /i "@" test.properties

    ---------- TEST.PROPERTIES
    username=xogadmin@anywhere.com
    password=admin@test


    D:\Rego\Apps\15.6.1\xog-unzipped\bin>xog -propertyfile test.properties
    -----------------------------------------------------------
    PPM XML Open Gateway ( version: 15.6.1.265 )
    -----------------------------------------------------------
    Login Succeeded
    Request Document: ..\xml\cmn_users_read.xml
    Writing output to out.xml
     XOG Processing completed !
    Logout Succeeded


    Workarounds exist for the interactive xog by first performing a dummy login (that fails) just to set the hostname, and then logging in with just the username and entering the password when prompted.  Then even if both the username and password contain @ characters, the login can succeed too:

    D:\Rego\Apps\15.6.1\xog-unzipped\bin>xog
    -----------------------------------------------------------
    PPM XML Open Gateway ( version: 15.6.1.265 )
    -----------------------------------------------------------
    Usage: xog

     login [user/passwd@host:port] Create new active session.
     logout                        Close active session.
     call <file>                   Invoke given XOG request.
     verbose <on|off>              Turn on verbose error logging.
     output <console|path>         Output to console or file.
     exit                          Logout and exit the shell.
     ?                             Display this help information.

     Examples:
       call xml/cmn_users_read.xml
    > login a/b@husky
    Login: a@husky:80
    XOG Invoke Failed
    Login Failed
    Turn verbose on for more detail.
    > host
    URL: http://husky:80/niku/xog
    > login xogadmin@anywhere.com
    Password:
    Login: xogadmin@anywhere.com@husky:80
    Login Succeeded
    > logout
    Logout Succeeded



  • 12.  RE: 15.6.1 and Java 11

    Posted Aug 21, 2019 12:06 PM
    Edited by Keri Taylor Aug 21, 2019 12:13 PM
    Okay, got farther using
    xog -javaHome C:\Java\openjdk11 -propertyfile dev.properties​
    I still have the same issue of the login. 
    <?xml version="1.0" encoding="UTF-8"?><XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
    <Object type="unknown"/>
    <Statistics updatedRecords="0" insertedRecords="0" failureRecords="0" totalNumberOfRecords="0"/>
    <ErrorInformation>
    <Severity>FATAL</Severity>
    <Description>XOG Invoke Failed</Description>
    <Exception type="com.niku.xog.XOGException">Login Failed: URL: https://cppm1234-dev.ondemand.ca.com:443/niku/xog user: xogadmin@somewhere.com	
    </Exception>
    </ErrorInformation>
    </XOGOutput>
    we did infact have to update the bat file as we use proxy so our security team added in the settings for proxy. This has worked perfectly with 15.3. 
    -DproxySet=true -Dhttps.proxyHost=site -Dhttps.proxyPort=port​

    I added the same ^ into the bat file for 15.6.1 as well.  

    now my 15.3 xog isn't working. even after i put back the 1.8 java into the java_home and path, ugh.



  • 13.  RE: 15.6.1 and Java 11

    Posted Aug 21, 2019 12:23 PM
    Edited by Nick Darlington Aug 21, 2019 12:29 PM
    I'd probably suggest opening a ticket with Broadcom support at this point - when you get through the java config and end up with that login failed soap response, it suggests the problem now likely lays elsewhere further down the communication chain.

    My prior experience at solving those kinds of problems usually led to a couple of places:

    1. Permissions for the user (which you have already checked, just listing it here as the most common reason)

    2. For SaaS customers, a password management issue such as one or more of the following for the account, most of which relate to use of Single SignOn (aka SSO) and/or OnDemand Portal (aka ODP) configured environments:

      - Misconfiguration of Clarity's LDAP settings, such that the ODP can authenticate users (if using that or SSO), but "non-sso" clients such as XOG/OWB/MSP can't find the user in LDAP to authenticate them

      - Expired Clarity-side credentials (since XOG doesn't use the ODP, it's possible the ODP password is valid but the Clarity one XOG uses has expired).  The only way to rectify that outside of support is to have a way to login to the application that displays Clarity's own username/password login screen, as it will then prompt for the password to be updated before proceeding further.  Systems that don't have this screen can get a bit more 'stuck'.

      - Mismatched password rules security settings in Clarity (even if a password is valid and previously worked) such as adjusting the minimum password length, the types of special characters (upper, lower, numeric, symbol) needed, etc., can prevent a XOG authentication.  Changing the password for the xogadmin user in the 'Administration > Resources' menu in Clarity can remedy this, but I think Clarity still doesn't validate there if the password meets the rules which could block a user from actually logging in with it.

      - Also just a mismatched password between the LDAP/ODP, and a user in Clarity that is NOT marked for "External Authentication" (so uses a password internal to Clarity), and trying to use the LDAP/ODP one.  In these cases, if you want to try using the ODP/LDAP password, you can try to check the External Auth box for the user in Clarity, or else leave it unchecked but try resetting their password in Clarity and use that new one for connecting to XOG.

    At all times when changing a special "xog" user password in the Clarity administration tool for resources, take care not to accidentally check the "Force password change on next login" box, as XOG can't process those and you'll be stuck as if you had an expired password again.

    There may even be other reasons I've since forgotten about since my departure, but support can usually get you back on the right track again when they're able to see and work this kind of problem with you directly.


  • 14.  RE: 15.6.1 and Java 11
    Best Answer

    Posted Aug 21, 2019 03:11 PM
    Edited by Christopher Hackett Aug 22, 2019 03:41 PM
    Okay, i started all the way over and everything is now working perfectly!! Whew
    xog


    Thanks all for everyones help and suggestions. 

    K