Highlighted
Absent Member.
Absent Member.
617 views

JAVA LR Script failing only when pushed to generators

We are having a problem getting a LR JAVA script to execute only in the controller when pushed to a generator.

We are running on LR 11 / Win Server 2003
Java 1.5

I'm attaching the full script here.

We have a shared drive on the network where we host all our files. For this script the .jar files and the JDK are hosted on the shared drive. The classpath settings point there for all the .jar files and I specifically point to the correct JDK in the Runtime Settings.

The script executes correctly when I run it standalone in vugen on my workstation. It also runs standalone in vugen on the generator machine itself and it runs fine from the controller if I set the generator to 'localhost'.

Once I set the controller to use a separate generator machine the script fails. Here's the error I get:

Error: System.err: log4j:WARN Caught Exception while in Loader.getResource. This may be innocuous. Error
Error: System.err: java.lang.NullPointerException Error
System.err: at sun.misc.URLClassPath$3.run(URLClassPath.java:316) Error
System.err: at java.security.AccessController.doPrivileged(Native Method) Error
System.err: at sun.misc.URLClassPath.getLoader(URLClassPath.java:313) Error
System.err: at sun.misc.URLClassPath.getLoader(URLClassPath.java:290) Error
System.err: at sun.misc.URLClassPath.findResource(URLClassPath.java:141) Error
System.err: at java.net.URLClassLoader$2.run(URLClassLoader.java:362) Error
System.err: at java.security.AccessController.doPrivileged(Native Method) Error
System.err: at java.net.URLClassLoader.findResource(URLClassLoader.java:359) Error
System.err: at java.lang.ClassLoader.getResource(ClassLoader.java:977) Error
System.err: at org.apache.log4j.helpers.Loader.getResource(Loader.java:96) Error
System.err: at org.apache.log4j.LogManager.(LogManager.java:103) Error
System.err: at com.swacorp.aaf.mule.client.MuleServiceLocator.(MuleServiceLocator.java:31) Error
System.err: at com.swacorp.aaf.mule.client.ServiceLocatorFactory.getLocator(ServiceLocatorFactory.java:31) Error
System.err: at Actions.getService(Actions.java:178) Error
System.err: at Actions.init(Actions.java:60) Error
System.out: 09:34:42,965 INFO [Thread-0] org.mule.MuleManager - Creating new MuleManager instance
Notify:
Error: System.out: In init(): Exception - null


Despite this error I can see that the script has found the .jars in the classpath, found the JDK and successfully compiles. Almost as soon as it starts to execute this error is written to the user log and the script is forced to stop.

This problem seems to have cropped up only after upgrading to LR 11. We were on 9.5 and have many JAVA Vuser script configured in the very same way. What has changed? How can I fix this? I'm kinda stuck here. Thanks!
0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: JAVA LR Script failing only when pushed to generators

I can see the error at below line.
ServiceLocator serviceLocator = ServiceLocatorFactory.getLocator("SODACachingServiceClientConfig.xml");

Where is this xml file located? Please check it.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: JAVA LR Script failing only when pushed to generators

That XML file is located inside the script directory along with another custom .properties file.

I've confirmed it's still there. If it wasn't the script wouldn't run correctly on my own workstation, which it does.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.