AnsweredAssumed Answered

classloader issues calling rule service from another ruleservice through a java layer

Question asked by Lars Hartviksen on Feb 24, 2016
Latest reply on Feb 23, 2018 by karenyue@fairisaac.com

During a blaze rune service there is a call to another rule service.

 

Everything works fine when we run the tests through maven, but inside eclipse, all BrUnit tests who call the "someMethod()" fail.

 

SomeClass is in the classpath used when importing java classes into the BOM, and when we print out URLs in the NdExtensibleClassLoader. However, when one function on the class "SomeClass" is run inside a rule project then we get an error message:

 

Failed to load bean class: SomeClass; nested exception is java.io.FileNotFoundException: class path resource [SomeClass.class] cannot be opened because it does not exist while evaluating "SomeClass.someMethod()" in function function1. It finds the class and method at compile time and

 

The spring configuration has been attempted as a xml configuration and a different class SomeClassConfig.class with the same result.

 

We attempted to call the rule service "directly" using NdStatelessServer, referring to a service_ser.server. Inside this file is a reference to the adb file inside a jar. We got an error like "unable to load c:\ruleservice.jar$theservice.adb - cannot find AnotherClass.class because it does not exist." That AnotherClass is definitely on the classpath. I even tried cramming the "missing" class into my jre's rt.jar.

 

How can we debug the blaze plugin to figure out why it cannot find any xmls, classes etc?

Outcomes