0

We are trying to run a Pojo ruleclient to execute rules defined in ODM, within a Tomcat Java instance. We are utilizing a stateless session of RES server to execute the rules. When running on Localhost, its running fine, the rules are getting executed. But when the same code is ported to Cloud based Tomcat server on Unix, we are getting the following exception.

Tomcat version : 7.0.62 ODM RES version : 8.5.1.1

Test_NGTesting_RuleApp.RulesetExecutionException:Test_NGTesting_RulesAn error occurred while the rule session was created:\nilog.rules.res.xu.persistence.IlrPersistenceException: It was not possible to retrieve ruleset information: /Test_NGTesting_RuleApp/1.0/Test_NGTesting_Rules/1.0.\nilog.rules.res.persistence.IlrDAOException: Cannot retrieve the ruleset archive for the ruleset "/Test_NGTesting_RuleApp/1.0/Test_NGTesting_Rules/1.0".\nilog.rules.archive.IlrRulesetArchive$RulesetArchiveException: Problem occurred during archive extraction of entry :\ninvalid code lengths set\n,exc.chain=7b2184c9,exc.stack=Test_NGTesting_RuleApp.RulesetExecutionException: Test_NGTesting_Rules

We have not made any changes to the generated code. The location at which "res_data" is mentioned in "ra.xml", ruleset.jar is present. Again the same code with ruleset.jar present in a local file system location on my pc works fine; in localhost. We are able to see that the session is also successfully getting created. But only when Session.execute() is called within the generated code, the exception is thrown.

Any pointers where to look are highly appreciated.

Thanks a lot in advance.

Ajay
  • 349
  • 1
  • 3
  • 11
  • The problem was resolved by placing the res_data folder containing the ruleset.jar outside the Application WAR file. Not sure why does it work that way though. – Ajay Dec 29 '15 at 04:22

1 Answers1

1

From the question, it not clear whether you are deploying on RES? 1) RES and XU Configuration on cloud and compare this with localhost - run test ruleset on RES Console. Run diagnostics 2) Check in the database 3) Enable trace on server - see if you some useful info.

Devesh
  • 2,024
  • 2
  • 16
  • 21
  • No, it is a Rule Client integrated with Services developed in Java Frameworks. We were able to resolve it, with the help of another existing implementation. Thanks for the answer though. – Ajay Dec 29 '15 at 04:21
  • Q) Did you check that the ruleapp was properly deployed on the http://_CLOUD_SERVER_:8080/res? A) We are using the ruleclient (embedded) approach for executing the rules. Since the ruleapp was properly tested before integrating with the services built using Google Guice, Apache Camel as ESB and Jersey API. – Ajay Dec 31 '15 at 20:12
  • Q) What do you mean by "When running on localhost"? A) Testing of the "embedded rules client" in the services project deployed on local tomcat instance. – Ajay Dec 31 '15 at 20:14
  • Please describe the prcedure you follow to deplyo and test the ruleapp in both cases? -We added, the ruleset.jar being generated, from the rule client outside the war, for our web project in order for the rules to be executed using Stateless session. – Ajay Dec 31 '15 at 20:15
  • As, when we put the ruleset inside the war build, it was working fine on localhost but when deployed to development server, it was not able to pickup the ruleset that was placed inside the war build. When we put the ruleset jar file in nexus repository and try to access it from there and put in the res_data folder while the maven build was performed(in local as well as in dev) it has the timestamp added to the jar file and when we try to rename it to ruleset.jar, – Ajay Dec 31 '15 at 20:16
  • we didn't get any success in executing the rules ,so, we added the ruleset jar file to development server through ftp for time being until the process gets automated for placing the ruleset jar file on the development server. The path for ruleset.jar was mentioned in ra.xml. We are following file persistence for that. So, we put the ruleset jar file outrside of the war build and it started working perfectly fine, even in development server environment. Please inform us, will there be any approach that we can follow in order to put the ruleset inside the war file and it will work?? – Ajay Dec 31 '15 at 20:16