OD7.1 Log4j2 Bridge - VPAppLogClient_7.1.0.jar issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • perez995
    Member
    • Mar 2022
    • 3

    OD7.1 Log4j2 Bridge - VPAppLogClient_7.1.0.jar issue

    Orchestration Designer 7.1
    Application: TestApp has ddlog4j.properties file set with different appenders.
    Deployed the app to test/model with no issues. log for TestApp is TestApp.log and logging correctly.


    Noticed when starting Tomcat and launching the application on developer workstation, make test call (Experience Portal points to my workstation) the TestApp.log starts but never logs anything more than one line.
    This was not the experience before. Something triggered this and not sure what it is. Worried could happen in production. Need to investigate further.

    In this scenario, it will use VPAppLogClient.log4j.properties as the main logging properties files and ignores ddlog4j.properties in the Application data directory.

    If I start Tomcat local, go to Experience Portal and verify the application, THEN make a test call, the TestApp.log begins to log correctly as does the vpAppLogClient.log

    I could do one of two things:
    Use VPAppLogClient.log4j.properties and set all logging properties from ddlog4j.properties into VPAppLogClient.log4j.properties
    or
    Update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file.
    In this scenario, I have to rename or delete the file VPAppLogClient.log4j.properties so it does not load.
    At this time, I prefer the second option as we typically have more control on updating the application and deploying that vs the VPAppLogClient.log4j.properties file we never have touched.

    I tried moving the jar order in the app, but did not fix.


    Achieving all this by using Log4j2 bridge method, keeping all existing code the same while adding the JVM parameter: -Dlog4j1.compatibility=true
    and using the following jars:

    log4j-1.2-api-2.23.1.jar
    log4j-api-2.23.1.jar
    log4j-core-2.23.1.jar

    VPAppLogClient.log4j.properties details:
    log4j.appender.VPAppClientLog=org.apache.log4j.Rol lingFileAppender
    log4j.appender.VPAppClientLog.File=${LOG4J_DIR}/vpAppLogClient.log

    Also note:
    Original value in VPAppLogClient.log4j.properties had the appender named: VPAppLogClient

    This had to be updated to VPAppClientLog (notice Client and Log are flipped. Any other name could be used except: VPAppLogClient)
    By leaving the name as is, I would see this error in log file:

    Caught exception try to determine the vpApLogClient log4j file path:
    ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
    at com.avaya.vp.applog.client.VPAppLogClientBase.getS aveReportPath(VPAppLogClientBase.java:800) [VPAppLogClient_7.1.0.jar:


    research showed this error could be when using .file= instead of uppercase .File= , but this was not the case in this situation. I simply renamed it originally to Test.Log and that fixed that issue.
    I then retried the name and could duplicate the error, so used a name that was very similar to fix this.


    Lastly, We do have two enviroments, One is OD7.1 which we are migrating from to OD8.1
    we are using the same bridge jar files and using the original files that came with that version:

    VPAppLogClient.log4j2.properties
    VPAppLogClient_8.1.1.jar
    VPAppLogClientWS_8.1.1.jar

    this environment has no issues and working correctly.



    Both running on Windows Server.
    OD7.1 running with Tomcat version 7.0.x
    Test / Model Servers running 7.5 (which could be why the experience is different and working properly?)

    OD8.1 running with Tomcat version 9.0.58


    Before I update ddlog4j.properties and set the VPAppLogClient.log4j.properties information into this file, is there any other alternative I should review?
    Are there any risks I break any logging in Experience Portal under
    Audit Log Viewer/Trace Viewer/Log Viewer
    or any of the Reports

    I do not see any issues there, but want to confirm


    Thanks in advance.
    Last edited by perez995; 07-01-2024, 06:12 PM.
  • tuan1
    Hot Shot
    .
    • Jul 2016
    • 19

    #2
    AAOD 7.x is using the log4 1.x API, which is not compatible with log4 2.x . Customers can not manually upgrade to log4 2.x for OD to work properly even Avaya gives them permission to do so.
    Currently, any communication of use of log4j 1.x or 2.x is tightly controlled and has to come through a process where it is vetted by Avaya legal, etc. We cannot give you a statement on this until this information has been released through the correct channels.
    Can you please help to check and monitor latest update on the following URL?


    What I suggest here is just trying to upgrade/use AAOD 8.x and AAEP 8.x latest version) with your scenario, then enable trace log on simulation environment

    Comment

    • perez995
      Member
      • Mar 2022
      • 3

      #3
      Originally posted by tuan1 View Post
      AAOD 7.x is using the log4 1.x API, which is not compatible with log4 2.x . Customers can not manually upgrade to log4 2.x for OD to work properly even Avaya gives them permission to do so.
      Currently, any communication of use of log4j 1.x or 2.x is tightly controlled and has to come through a process where it is vetted by Avaya legal, etc. We cannot give you a statement on this until this information has been released through the correct channels.
      Can you please help to check and monitor latest update on the following URL?


      What I suggest here is just trying to upgrade/use AAOD 8.x and AAEP 8.x latest version) with your scenario, then enable trace log on simulation environment

      Hi Tuan,

      Thanks for the response. Understand what you are stating, and our effort is to move that direction. The migration for most of our apps have been completed but we are stuck with one that has not been able to get migrated due to other issues with OD8.1. This is why we are stuck on OD7.1. I do understand that we couldn't upgrade to log4j2 as it would require some code changes and because of dependencies of code we do not own, would cause an issue. This is the reason we were using the bridge option that lets us not redo any code.

      The changes we have made look to be running correctly and although it is implemented a little different with what looks to be same results, why we wanted to confirm.


      by chance, is there any more details/ documentation on the jars that are part of the Application logging Client. Are these being used to send data to the reports found in Experience Portal under the Reports (Standard/Custom/Detail) section?
      Does this also provide info written into System Maintenance section such as: Audit Log Viewer/Trace Viewer/Log Viewer/Alarm Manager?


      In regards to these, I see we have deployed these in our environment.

      OD7.1.1
      VPAppLogClientWS_7.1.0.jar
      VPAppLogClient_7.1.0.jar
      VPWebServiceClient-07.10.05.04.jar
      VPAppLogClient.log4j.properties

      OD8.1 .1
      VPAppLogClientWS_8.1.1.jar
      VPAppLogClient_8.1.1.jar
      VPWebServiceClient-07.22.04.01.jar
      VPAppLogClient.log4j2.properties


      Wondering why in the OD8.1.1 original zip download, VPWebServiceClient. is still a 07 version and not 08 like the others.
      in the AOD_DEV_Guide, other than stating to verify the version number, there are no details regarding VPWebServiceClient






      Last edited by perez995; 07-02-2024, 02:32 PM.

      Comment

      • tuan1
        Hot Shot
        .
        • Jul 2016
        • 19

        #4
        I am getting confused here, so what is the environment that you are facing the issue?

        Comment

        Loading