WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Running a java agent with JVM for code instrumentation

  • 1.  Running a java agent with JVM for code instrumentation

    Posted Tue August 18, 2020 04:43 PM

    I have Websphere 8.5 on Solaris.

    ================================

    I have an agent name myAgent.jar which has to be loaded while stating the JVM during the process of starting the application.

    As per my research, we have to update the

    g<jvmEntries .... genericJvmArguments="-javaagent:/opt/IBM/WebSphere/AppServer/AppDefender_Agent/lib-19.2.0/myAgent.jar -Xshareclasses:none"

    ..........

    </jvmEntries>

    When I start my server, it doesn't start . In fact, I am not getting any error or exception also.

    I am wondering what mistake I am making . May be some error in the server.xml file. I need to troubleshoot and for that I need the error .

    I have checked the ownership and permission, which is same as application owner.

    For security setting purpose, I checked and gave permission as well.

    1- Please check the if security policy set on the server or profile level. If that is the case then we have to give the permission in both server and profile level. You can check in

    /opt/IBM/WebSphere/AppServer/profiles/Appsrv01/properties/server.policy

    grant codeBase ‘file:/opt/IBM/WebSphere/AppServer/AppDefender_Agent/lib-19.2.0/myAgent.jar’

    {

    permission java.security.AllPermission;

    };

    Still no clue. Please advise.



    #Support
    #SupportMigration
    #WebSphereApplicationServer(WAS)


  • 2.  RE: Running a java agent with JVM for code instrumentation

    Posted Mon August 24, 2020 07:28 AM

    Here is the error I see:

    D: heapdetect: error notifying monitor: 52

    Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0

    ************ Start Display Current Environment ************

    Log file started at: [8/19/20 15:50:32:739 IST]

    ************* End Display Current Environment *************

    XD: heapdetect: error notifying monitor: 52

    Unrecognized option: -Xshareclasses:none

    Error: Could not create the Java Virtual Machine.

    Error: A fatal exception has occurred. Program will exit



    #Support
    #SupportMigration
    #WebSphereApplicationServer(WAS)