IBM Support

Cannot translate class "test.myClass"

Troubleshooting


Problem

You get an RulesetParseException - "Cannot translate class" (XU.ERROR.10009/GBRXU0436E) error that refers to one of your XOM and BOM classes when you try to execute a ruleset in Rule Execution Server or to retrieve an HTDS WSDL file. Another possible error is "Unresolved resources or libraries".

Symptom

Rule execution or HTDS WSDL generation fails with the following error in the server logs, in V7.1 and earlier:

ilog.rules.res.session.IlrSessionException: An error occurred while the rule session was invoked.:


ilog.rules.res.xu.ruleset.impl.IlrCannotCreateRulesetException: ilog.rules.res.xu.messages, Message code: XU.ERROR.10009, parameters: /MyRuleApp/1.0/MyRuleset/1.0
ilog.rules.res.xu.ruleset.impl.IlrCannotCreateRulesetException: ilog.rules.res.xu.messages, Message code: XU.ERROR.10009, parameters: /MyRuleApp/1.0/MyRuleset/1.0
ilog.rules.res.xu.ruleset.impl.IlrRulesetParseException: ilog.rules.res.xu.messages, Message code: XU.ERROR.10014, parameters: /MyRuleApp/1.0/MyRuleset/1.0, Problem occurred during translation loading : test.MyClass : Cannot find execution class "test.MyClass" for translating business class "test.MyClass"
at ilog.rules.res.session.impl.IlrStatelessSessionBase.execute(IlrStatelessSessionBase.java:118)
at ilog.rules.res.session.impl.ejb3.IlrStatelessSessionEJB3.execute(IlrStatelessSessionEJB3.java:40)
...

Caused by: ilog.rules.res.xu.ruleset.impl.IlrRulesetParseException: ilog.rules.res.xu.messages, Message code: XU.ERROR.10014, parameters: /MyRuleApp/1.0/MyRuleset/1.0, Problem occurred during translation loading : test.MyClass : Cannot find execution class "test.MyClass" for translating business class "test.MyClass"
at ilog.rules.res.xu.util.IlrResourceExceptionHelper.createRulesetParseException(IlrResourceExceptionHelper.java:109)
at ilog.rules.res.xu.ruleset.impl.IlrRulesetParser.createRulesetParseException(IlrRulesetParser.java:148)
at ilog.rules.res.xu.ruleset.impl.IlrRulesetParser.parseArchive(IlrRulesetParser.java:131)
at ilog.rules.res.xu.ruleset.IlrDefaultRulesetFactory.createRCERuleset(IlrDefaultRulesetFactory.java:76)
at ilog.rules.res.xu.ruleset.impl.IlrExecutableRulesetFactory.createRCERuleset(IlrExecutableRulesetFactory.java:173)
at ilog.rules.res.xu.ruleset.impl.IlrExecutableRulesetFactory.createRuleset(IlrExecutableRulesetFactory.java:80)
... 3 more

or, in V.7.5 and later:


ilog.rules.res.session.IlrSessionCreationException: An error occurred while the rule session was created:
com.ibm.rules.res.xu.internal.XUException: XU client error.
com.ibm.rules.res.xu.internal.LocalizedResourceException: The interaction ruleEngine.loadUptodateRuleset has failed.
javax.resource.ResourceException: com.ibm.rules.res.xu.internal.XUException: GBRXU0436E: The ruleset parsing process failed.
com.ibm.rules.res.xu.internal.XUException: The ruleset parsing process failed.
com.ibm.rules.res.xu.engine.cre.internal.RulesetParseException: The parsing of the ruleset /MyRuleApp/1.0/MyRuleset/1.0 failed Problem occurred loading translation: Error when translating parameter "myParam": Cannot translate class "test.MyClass".

at ilog.rules.res.session.IlrPOJOSessionFactory.createStatefulSession(IlrPOJOSessionFactory.java:97)
    ...

Caused by: com.ibm.rules.res.xu.engine.cre.internal.RulesetParseException: The parsing of the ruleset /MyRuleApp/1.0/MyRuleset/1.0 failed Problem occurred loading translation: Error when translating parameter "myParam": Cannot translate class "test.MyClass".
at com.ibm.rules.res.xu.engine.cre.internal.RulesetParser.createRulesetParseException(RulesetParser.java:131)
at com.ibm.rules.res.xu.engine.cre.internal.RulesetParser.parseArchive(RulesetParser.java:83)
at ilog.rules.res.xu.ruleset.factory.internal.IlrXURulesetFactory.createCRERuleset(IlrXURulesetFactory.java:316)
at ilog.rules.res.xu.ruleset.factory.internal.IlrXURulesetFactory.createRuleset(IlrXURulesetFactory.java:116)
at com.ibm.rules.res.xu.ruleset.IlrRulesetParsingWork.run(IlrRulesetParsingWork.java:91)
... 7 more

with also this alternate error, when the missing class that is not a parameter type:


Caused by: com.ibm.rules.res.xu.engine.cre.internal.RulesetParseException: The parsing of the ruleset /MyRuleApp/1.0/MyRuleset/1.0 failed Problem occurred loading translation: Error when translating package "myRulePackage": Cannot translate class "test.MyClass".
at com.ibm.rules.res.xu.engine.cre.internal.RulesetParser.createRulesetParseException(RulesetParser.java:131)
at com.ibm.rules.res.xu.engine.cre.internal.RulesetParser.parseArchive(RulesetParser.java:83)
at ilog.rules.res.xu.ruleset.factory.internal.IlrXURulesetFactory.createCRERuleset(IlrXURulesetFactory.java:316)
at ilog.rules.res.xu.ruleset.factory.internal.IlrXURulesetFactory.createRuleset(IlrXURulesetFactory.java:116)
at com.ibm.rules.res.xu.ruleset.IlrRulesetParsingWork.run(IlrRulesetParsingWork.java:91)
... 7 more



Finally, starting in V7.5, another possible root cause can be:


Caused by: ilog.rules.res.persistence.IlrResourceNotFoundDAOException: Unresolved resources or libraries: [resuri://XOM.zip/1.0]
at ilog.rules.res.persistence.impl.IlrDAOLocalization.newIlrResourceNotFoundDAOException(IlrDAOLocalization.java:64)
at com.ibm.rules.res.persistence.internal.XOMClassLoaderFactory.getContent(XOMClassLoaderFactory.java:304)
at com.ibm.rules.res.persistence.internal.XOMClassLoaderFactory.getContent(XOMClassLoaderFactory.java:179)
at com.ibm.rules.res.persistence.internal.XOMClassLoaderFactory.getManagedXOMClassLoader(XOMClassLoaderFactory.java:157)
... 56 more

Cause

The eXecution Object Model (XOM) associated with the ruleset either was not fully deployed to the server, or was compiled with a JDK that is different from the JDK running the server that hosts Rule Execution Server.

In the case of an "Unresolved resources or libraries" error message, either the path to the managed XOM for the ruleset is incorrect or the resources or libraries were removed.

Diagnosing The Problem

Review the logs of the server that hosts Rule Execution Server and refer to the root cause in the stack trace.

Verify which JDK provider and version was used:

  • to compile the XOM in Rule Designer, Eclipse or any other build process,
  • to compile any ISV library that the XOM depends on
  • to run the server that hosts Rule Execution Server

If you use the managed XOM feature, ensure that the URI(s) of the XOM resources are valid for the RuleApp and ruleset versions in which the issue occurs.

If you chose to deploy your XOM in your client application(s), verify the packaging of those that show the error.

In both cases, verify that all XOM classes, ISV libraries and dependencies are made available, including the the class that might be mentioned in the error message.

Resolving The Problem

First, ensure that the XOM and its dependencies were compiled for a Java version that is compatible with the JVM running the server that hosts Rule Execution Server. For example, classes that are compiled to comply with a Java 7 target would not work on a Java 6 JVM.

Then, (re)deploy all XOM classes to Rule Execution Server:

  • Either by deploying them using the Managed XOM feature, available since V7.5 for certain clients (see below),
  • Or by repackaging them into the Rule Execution Server client (your rule session application, HTDS, or DVS SSP).

The Managed XOM feature is available for transparent decision services (HTDS or MTDS), Decision Validation Services (DVS) and rule session applications with no ruleset parameter of complex Java type. See Operational Decision Manager V8.5 > Decision Server Rules > Deploying business rules > Deploying Java XOMs.

To dynamically deploy the XOM libraries with the Managed XOM feature, right-click the corresponding rule project to use

  • "Rule Execution Server > Deploy XOM" and update the ruleset Managed URIs if needed, for rule execution, through HTDS for example.
  • "Decision Validation Services > Deploy XOM for Remote DVS Testing" and publish the updated deployment.xml to Decision Center, for DVS testing.

For rule execution, you can also check the option "Deploy XOM of the rule projects and archives contained in the RuleApp" if you deploy the ruleset in its RuleApp from Rule Designer.

If you use Plain Old Java Object (POJO) or EJB rule sessions with complex Java object parameters, you will still need to package those XOM classes along with the EJB classes in your application to build the parameter objects or enable their marshalling and unmarshalling. See technote RemoteException thrown when a ruleset that uses a managed Java XOM is executed in an EJB3 rule session.

If you choose to repackage the DVS SSP, see Operational Decision Manager V8.5 > Decision Server Rules > Testing and simulating rulesets > Enabling remote testing > Making the XOM accessible by repackaging the SSP or Operational Decision Manager V8.5 > Decision Server Rules > Testing and simulating rulesets > Customizing testing and simulation > Configuring the Scenario Service Provider > Repackaging the SSP file using the ssp-setup Ant task.

To repackage HTDS or your own application, you can add the XOM JAR files

  • starting in JDK 1.5, to a \lib folder at the root of the EAR file, or
  • in the WEB-INF/lib folder of the WAR files, or
  • in the EAR and use the Class-Path tag in the manifest file of your JAR or WAR files (see The Java Tutorials).

In the case of an "Unresolved resources or libraries" error, correct the path to the existing resources or redeploy the managed XOM, or both.

See Operational Decision Manager V8.5 > Decision Server Rules > Rule Execution Server console online help > Viewing and managing Java XOM resources or Operational Decision Manager V8.5 > Decision Server Rules > Rule Execution Server console online help > Viewing and managing Java XOM libraries.

[{"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5;8.0;8.5","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS6MTS","label":"WebSphere ILOG JRules"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modules:Execution Server (BRES \/ RES)","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1;7.0;6.7","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
23 July 2021

UID

swg21652271