Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federated Rule not working as expected #122

Closed
sonawanesangram opened this issue Feb 19, 2019 · 1 comment
Closed

Federated Rule not working as expected #122

sonawanesangram opened this issue Feb 19, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sonawanesangram
Copy link
Contributor

Micro services

  • Spring boot Applications:
  • Admin Service

Rule Engine

  • OS Type: Windows/Linux/MacOS
  • Java version:
  • 1.8

Summary

When creating a new Federated rule, jar file is not uploaded to S3.
If we manually upload the file to S3 e.g pac-fed-rules.jar.jar, rule engine only looks at pac-managed-rules.jar and cannot find the required class to execute the rule.

Reproduce steps

Create a new Federated rule with custom jar file.
Invoke the rule and check batch logs.

Expected Results

Rule should be able to find the class from the uploaded custom jar file and execute successfully.

Actual Results

Rule execution fails with below error:
running at
/root
list of files here
. pac-managed-rules.jar rule-engine.jar
............................................
............................................
java.lang.ClassNotFoundException: cannot find class associated to rule
at com.tmobile.pacman.util.ReflectionUtils.findAssociateClass(ReflectionUtils.java:55)
at com.tmobile.pacman.executor.SingleThreadRuleRunner.runRules(SingleThreadRuleRunner.java:63)
at com.tmobile.pacman.executor.RuleExecutor.run(RuleExecutor.java:228)
at com.tmobile.pacman.executor.RuleExecutor.main(RuleExecutor.java:91)
2019-02-19 05:37:13 9f4d49f6-0f48-45f6-afd0-d81691a2f56f [main] ERROR c.t.pacman.executor.RuleExecutor - error occured while executing
java.lang.ClassNotFoundException: cannot find class associated to rule
at com.tmobile.pacman.util.ReflectionUtils.findAssociateClass(ReflectionUtils.java:55)
at com.tmobile.pacman.executor.SingleThreadRuleRunner.runRules(SingleThreadRuleRunner.java:63)
at com.tmobile.pacman.executor.RuleExecutor.run(RuleExecutor.java:228)
at com.tmobile.pacman.executor.RuleExecutor.main(RuleExecutor.java:91)
2019-02-19 05:37:13 9f4d49f6-0f48-45f6-afd0-d81691a2f56f [main] ERROR c.t.pacman.executor.RuleExecutor - exiting now..
java.lang.ClassNotFoundException: cannot find class associated to rule
at com.tmobile.pacman.util.ReflectionUtils.findAssociateClass(ReflectionUtils.java:55)
at com.tmobile.pacman.executor.SingleThreadRuleRunner.runRules(SingleThreadRuleRunner.java:63)
at com.tmobile.pacman.executor.RuleExecutor.run(RuleExecutor.java:228)
at com.tmobile.pacman.executor.RuleExecutor.main(RuleExecutor.java:91)

Same error is seen even if we upload the jar file manually in S3. Seems Rule engine only looks at pac-managed-rules.jar

@santhoshigorle santhoshigorle added the bug Something isn't working label Feb 19, 2019
@santhoshigorle santhoshigorle self-assigned this Feb 19, 2019
@santhoshigorle
Copy link
Collaborator

@sonawanesangram Issue is fixed as part of 1.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants