Troubleshooting
Problem
When you execute your business process, you see a NoSuchMethodException in the Java service. For example:
java.lang.NoSuchMethodException: MyCustomClass.method(java.lang.String, java.lang.String, long)
at java.lang.Class.throwNoSuchMethodException(Class.java:429)
at java.lang.Class.getMethod(Class.java:1106)
at teamworks.connector.JavaReflectionConnector$1.execute(JavaReflectionConnector.java:84)
at com.lombardisoftware.server.core.ManagedAssetClassLoaderUtil.executeWithManagedAssetClassLoader(ManagedAssetClassLoaderUtil.java:58)
at teamworks.connector.JavaReflectionConnector.execute(JavaReflectionConnector.java:56)
at com.lombardisoftware.component.javaconnector.worker.JavaConnectorWorker.invokeJavaMethod(JavaConnectorWorker.java:153)
This exception seems to be related to one of your service flows that uses the Java connector to call MyCustomClass.method.
You check the Java integration and class but it appears to contain the proper method definition.
Symptom
Cause
The classloader can load only one particular class for a particular scope. If there are multiple versions of the class, then it is partially random which version gets loaded. This behavior could lead to scenarios where you see the error only in some of your environments.
So for example if your application contains these two JAR files:
- ManagedAsset1.jar that contains MyCustomClass with a method definition of method(java.lang.String, java.lang.String, long)
- ManagedAsset2.jar that contains MyCustomClass with a method definition of method(java.lang.String, java.lang.String, long, java.lang.String)
If the class from ManagedAsset2.jar is loaded, then you would get the mentioned exception. Although if the class from ManagedAsset1.jar is loaded, then everything works.
Resolving The Problem
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
14 September 2022
UID
ibm16394638