IBM Support

LS2J "Java constructor failed to execute" error occurs after installing Notes 9.0.1 Fix Pack 3

Technote (troubleshooting)


Problem

After installing Fix Pack 3 for Notes 9.0.1, attempts to instantiate Java objects from LotusScript via LS2J fail with the following error:


    "LS2J Error: Java constructor failed to execute"

The following sample code, which works fine with previous versions of Notes, throws a "Java constructor failed to execute" error in Notes 9.0.1 Fix Pack 3.

      Option Declare

      Uselsx "*javacon"

      Sub Initialize()
      Dim jSession As New JavaSession, jClass As Javaclass, jFile As JavaObject
      Dim myError As JavaError

      On Error Goto ErrorHandling

      Set jClass = jSession.Getclass("java/io/File")
      Set jFile = jClass.Createobject("(Ljava/lang/String;)V","c:\test.txt")


      SingleExit:
      Exit Sub


      ErrorHandling:

      Set myError = jSession.getLastJavaError
      Print Error
      Print myError.ErrorMsg
      Print myError.StackTrace
      Resume SingleExit

      End Sub

    (Note: The file does not have to exist.)

The following error displays:

      LS2J Error: Java constructor failed to execute
      java.lang.InternalError
      java.lang.InternalError at java.lang.Class.getStackClass(Native Method) at java.lang.Class.forName(Class.java:201)

Cause

This issue resulted from security changes in java.classforName in SR16FP2 related to the Oracle Security-in-Depth Fix 8015256. NOTE: This issue occurs only if (1) a SecurityManager is in place, and (2) the method Class.forName() is called from the outer JNI frame.


Resolving the problem

The issue is tracked as SPR# RGAU9T8P4Y and is fixed in the JVM patch for SR16FP3. For download information and additional details on this patch, refer to technote 1698222. The fix for this issue will also be incorporated into Notes 9.0.1 Fix Pack 4, which currently is due for release in Q2 2015 (click here to monitor status).

Cross reference information
Segment Product Component Platform Version Edition
Messaging Applications IBM Notes

Document information

More support for: IBM Domino Designer
LotusScript

Software version: 9.0.1

Operating system(s): Windows

Software edition: All Editions

Reference #: 1696682

Modified date: 12 March 2015


Translate this page: