Uploaded image for project: 'InsightEdge Platform'
  1. GS-13659

Processing Unit fails to deploy when a namespace is provided for Spring beans

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12.3.1, 14.0.1, 12.3.1-patch3
    • Labels:
      None
    • Platform:
      All
    • SalesForce Case ID:
      12082
    • Acceptance Test:
      new verification test added: ProcessingUnitWithSpringNamespaceDeployTest
    • Sprint:
    • Edition:
      Open Source

      Description

      Per customer:

      I'm having a problem with both of the Giga12 versions that I'm testing with (12.1.1, 12.3.1)

      A pu.xml(stripped down for demonstration purposes) like this works:
      <beans xmlns="http://www.springframework.org/schema/beans"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd>
      </beans>

      But a pu.xml like this fails to deploy:
      <spring:beans xmlns:spring="http://www.springframework.org/schema/beans"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd>
      </spring:beans>
      ...with this exception:

      Exception : java.lang.IllegalStateException : context xml should contain beans element at org.openspaces.pu.container.servicegrid.deploy.Deploy.extractSlaFromPu(Deploy.java:615) org.openspaces.pu.container.servicegrid.deploy.Deploy.buildOperationalString(Deploy.java:481) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) com.gigaspaces.admin.ui.grid.deploy.DeployControl.deployPU(DeployControl.java:451)

      It looks like in Giga 12, code was added to the 'Deploy' class which assumes that "http://www.springframework.org/schema/beans" is set to the default namespace rather than a prefixed one (in XML, the prefix should never be assumed; the code should only care about the namespace URI).

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: