Jerry Cwiklik created UIMA-5750:
-----------------------------------

             Summary: UIMA-AS: fix ClassCastException when delegate specifier 
is CustomResourceSpecifier
                 Key: UIMA-5750
                 URL: https://issues.apache.org/jira/browse/UIMA-5750
             Project: UIMA
          Issue Type: Bug
          Components: Async Scaleout
    Affects Versions: 2.10.2AS
            Reporter: Jerry Cwiklik
            Assignee: Jerry Cwiklik
             Fix For: 2.10.3AS


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 is an aggregate is async.

Besides fixing the bug add a new JUnit test to cover this scenario



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to