Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.10.2AS
-
None
Description
When an async aggregate's delegate descriptor is a Jms Service Descriptor the deployment fails with:
Caused by: java.lang.ClassCastException: org.apache.uima.resource.impl.CustomResourceSpecifier_impl incompatible with org.apache.uima.resource.ResourceCreationSpecifier
at org.apache.uima.aae.controller.BaseAnalysisEngineController.setupName(BaseAnalysisEngineController.java:968)
at org.apache.uima.aae.controller.BaseAnalysisEngineController.getComponentName(BaseAnalysisEngineController.java:1012)
at org.apache.uima.aae.controller.BaseAnalysisEngineController.registerServiceWithJMX(BaseAnalysisEngineController.java:860)
at org.apache.uima.aae.controller.BaseAnalysisEngineController.initializeVMTransport(BaseAnalysisEngineController.java:635)
at org.apache.uima.aae.controller.BaseAnalysisEngineController.initializeVMTransport(BaseAnalysisEngineController.java:625)
at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.initializeTopLevelController(SpringContainerDeployer.java:268)
at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.initializeContainer(SpringContainerDeployer.java:299)
at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.deploy(SpringContainerDeployer.java:434)
The code in BaseAnalysisEngineController.setupName() is blindly casting delegate's resource specifier to ResourceCreationSpecifier. If the delegate descriptor happens to be a Jms Service Descriptor the cast fails since the specifier is of type CustomResourceSpecifier.
This bug is triggered if an aggregate is async.
Besides fixing the bug add a new JUnit test to cover this scenario