java.lang.VerifyError: JVMVRFY041

Document ID : KB000124396
Last Modified Date : 15/02/2019
Show Technical Document Details
Issue:
Liberty couldn't be started after updating the Liberty and IBM Java Runtime to:

IBM Liberty Version 18.0.0.3 -  IBM Java Version  8.0.5.26 (1.8.0_191) or  8.0.5.22 (1.8.0_181)

Exceptions similar to the ones below are reported in the console.log or messages.log:

CWWKE0005E: The runtime environment could not be launched.
CWWKE0018E: An exception occurred while launching the runtime environment: java.lang.VerifyError: JVMVRFY041 invokespecial of wrong initializer; class=com/ibm/ws/kernel/launch/internal/ServerCommandListener, method=init(ILjava/io/File;)V, pc=620
Exception Details:
  Location:
    com/ibm/ws/kernel/launch/internal/ServerCommandListener.init(ILjava/io/File;)V @620: JBinvokespecial
  Reason:
    Type 'com/wily/introscope/agent/probe/io/ManagedFileOutputStream' (current frame, stack[1]) is not assignable to 'java/io/FileOutputStream'

    
..........

CWWKE0018E: An exception occurred while launching the runtime environment: java.lang.VerifyError: JVMVRFY041 invokespecial of wrong initializer; class=com/ibm/ws/kernel/launch/internal/ServerCommandListener, method=asyncResponse(Ljava/lang/String;Ljava/nio/channels/SocketChannel;)V, pc=103
Exception Details:
  Location:
    com/ibm/ws/kernel/launch/internal/ServerCommandListener.asyncResponse(Ljava/lang/String;Ljava/nio/channels/SocketChannel;)V @103: JBinvokespecial
  Reason:
    Type 'com/wily/introscope/agent/probe/lang/ManagedThread' (current frame, stack[1]) is not assignable to 'java/lang/Thread'

.............

CWWKE0701E: [com.ibm.ws.transport.iiop.internal.ORBWrapperInternal(624)] The activate method has thrown an exception Bundle:com.ibm.ws.transport.iiop(id=158) java.lang.VerifyError: JVMVRFY041 invokespecial of wrong initializer; class=com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory, method=createServerSocket(IILjava/net/InetAddress;[Ljava/lang/String;)Ljava/net/ServerSocket;, pc=145
Exception Details:
  Location:
    com/ibm/ws/transport/iiop/security/config/ssl/yoko/SocketFactory.createServerSocket(IILjava/net/InetAddress;[Ljava/lang/String;)Ljava/net/ServerSocket; @145: JBinvokespecial
  Reason:
    Type 'com/wily/introscope/agent/probe/net/ManagedServerSocket' (current frame, stack[1]) is not assignable to 'java/net/ServerSocket'

 
Environment:
APM Agent 10.5.x
Cause:
Defect  # DE389854
Resolution:
This defect is fixed in 10.7 SP3

Workaround:

1. Stop the JVM/application server
2. Open the appropriate /core/config/toggles pbd file (it can toggles-full.pbd, toggles-full-NoRedef.pbd, toggles-typical.pbd or toggles-typical-NoRedef.pbd)
3. Disable the agent trace(s) according to the exception(s) in the log, there is a corresponding agent trace for each exception, from the above examples:

Type 'com/wily/introscope/agent/probe/io/ManagedFileOutputStream' -> FileSystemTracing
Type 'com/wily/introscope/agent/probe/lang/ManagedThread' -> ThreadTracing
Type 'com/wily/introscope/agent/probe/net/ManagedServerSocket' -> ManagedSocketTracing

based on this, you will need to disable the traces as below:

#TurnOn: FileSystemTracing
#TurnOn: ThreadTracing
#TurnOn: ManagedSocketTracing

4. Start the JVM/application server
 
Additional Information:
https://comm.support.ca.com/kb/unable-to-start-the-appserver-javalangverifyerror-jvmvrfy012-stack-shape-inconsistent/KB000006668

https://comm.support.ca.com/kb/javalangVerifyError-when-instrumenting-Confluence-Wiki/KB000045196