Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5750

UIMA-AS: fix ClassCastException when delegate specifier is CustomResourceSpecifier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.10.2AS
    • 2.10.3AS
    • Async Scaleout
    • 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

      Attachments

        Activity

          People

            cwiklik Jaroslaw Cwiklik
            cwiklik Jaroslaw Cwiklik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: