Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6061

The publish attribute on jaxws:endpoint doesn't support placeholder in spring configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.12
    • 3.0.3, 2.7.14
    • JAX-WS Runtime
    • None
    • Unknown

    Description

      Given this jaxws:endpoint configuration in spring:

          <osgix:cm-properties id="my-server-props" persistent-id="org.myservice">
              <prop key="startMonitoringService">false</prop>
              <prop key="monitoringServiceUrl">/MonitoringServiceSOAP</prop>
              ......
          </osgix:cm-properties>
          <context:property-placeholder properties-ref="my-server-props" />
          <jaxws:endpoint id="monitoringservice" publish="${startMonitoringService}" 
              implementor="#MonitoringServiceWrapper"
              address="${monitoringServiceUrl}">
           ......
          </jaxws:endpoint>
      

      then the SAXParseException will be thrown when deploy this jaxws service.

      11:10:20,112 | ERROR | ExtenderThread-9 | BundleApplicationContextListener   50 | 94 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=my-server, config=osgibundle:/META-INF/spring/*.xml))
      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 56 in XML document from URL [bundleentry://266.fwk1315137858/META-INF/spring/server-osgi.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${startMonitoringService}' is not a valid value for 'boolean'.
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[89:org.springframework.context:3.2.4.RELEASE]
      	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[89:org.springframework.context:3.2.4.RELEASE]
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)[94:org.springframework.osgi.extender:1.2.1]
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[94:org.springframework.osgi.extender:1.2.1]
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[93:org.springframework.osgi.core:1.2.1]
      	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[94:org.springframework.osgi.extender:1.2.1]
      	at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
      Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${startMonitoringService}' is not a valid value for 'boolean'.
      	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[:]
      	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)[:]
      	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)[:]
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)[:]
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
      	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
      	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
      	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[87:org.springframework.beans:3.2.4.RELEASE]
      	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)[87:org.springframework.beans:3.2.4.RELEASE]
      	... 18 more
      

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            xldai Xilai Dai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: