FYI ... after applying Notes / Domino 9.0.1 FP3 the LS2J 'GetMethod' fails with a 'java.lang.internalError'.
Example:
Dim jSession As JavaSession
Dim jClass As JavaClass
Dim jObject As JavaObject
Dim jMethod As JavaMethod
Dim returnValue As Variant
Set jSession = NewJavaSession()
Set jClass = jSession.GetClass("acme.com.utils.MyClass")
Set jObject = jClass.CreateObject
Set jMethod = jClass.GetMethod("myFunction","(Ljava/lang/String;Ljava/lang/string;)Z") <-- error occurs here
returnValue = jMethod.Invoke(jObject, "xxx", "yyy")
Workaround - iterate through the methods of the java class object to find the method you want.
Example:
Dim jSession As JavaSession
Dim jClass As JavaClass
Dim jObject As JavaObject
Dim jMethods As JavaMethodCollection
Dim jMethod As JavaMethod
Dim returnValue As Variant
Set jSession = NewJavaSession()
Set jClass = jSession.GetClass("acme.com.utils.MyClass")
Set jObject = jClass.CreateObject
Set jMethods = jClass.GetClassMethods()
Forall method In jMethods
If method.MethodName = "myFunction" Then
Set jMethod = method;
Exit Forall
End Forall
returnValue = jMethod.Invoke(jObject, "xxx", "yyy")
Note: this error only occurs when FP3 is installed and does not occur in other versions / patches of Notes / Domino.
Hope it helps.
Alex Elliott
http://www.agecom.com.au