Announcement Announcement Module
Collapse
No announcement yet.
validation failed when using use-temporary-file-name in outbound-channel-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • validation failed when using use-temporary-file-name in outbound-channel-adapter

    Hi forum,

    When using an outbound-channel-adapter component with use-temporary-file-name attribute set to false we're getting a schema validation error.
    Spring integration used: 2.1.

    Here's the configuration used:
    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    		xmlns:beans="http://www.springframework.org/schema/beans"
    		xmlns:integration="http://www.springframework.org/schema/integration"
    		xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
    		xmlns:context="http://www.springframework.org/schema/context"
    		xsi:schemaLocation="http://www.springframework.org/schema/beans
    							http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    							http://www.springframework.org/schema/integration
    							http://www.springframework.org/schema/integration/spring-integration-2.1.xsd												
    							http://www.springframework.org/schema/context
    							http://www.springframework.org/schema/context/spring-context.xsd
    							http://www.springframework.org/schema/integration/sftp
    							http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.1.xsd">
    	<int-sftp:outbound-channel-adapter session-factory="jeronimoSftpSessionFactory"
    									   use-temporary-file-name="false" 
    									   channel="jeronimoSFTPUploadChannel"
    									   remote-filename-generator-expression="headers['fileName']"
    									   remote-directory-expression="headers['remoteDirecory']"/>
    </beans>
    The following error is received:
    Code:
    Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/jakkaBeans-jeronimo-notification-flow.xml]
    Offending resource: URL [file:/opt/jakka/services/hosts/oas/version-14/14.41/install/jakka-host-oas-14.41.sar/jakkaBeans-common.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 105 in XML document from URL [file:/opt/jakka/services/hosts/oas/version-14/14.41/install/jakka-host-oas-14.41.sar/jakkaBeans-jeronimo-notification-flow.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'use-temporary-file-name' is not allowed to appear in element 'int-sftp:outbound-channel-adapter'.
            at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
            at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
            at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:192)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186)
            ... 47 more
    Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 105 in XML document from URL [file:/opt/jakka/services/hosts/oas/version-14/14.41/install/jakka-host-oas-14.41.sar/jakkaBeans-jeronimo-notification-flow.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'use-temporary-file-name' is not allowed to appear in element 'int-sftp:outbound-channel-adapter'.
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
            at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186)
            ... 57 more
    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'use-temporary-file-name' is not allowed to appear in element 'int-sftp:outbound-channel-adapter'.
            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.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
            at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(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.emptyElement(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)
            at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
            ... 62 more
    
    **Command executed to start VM**
    Is this a known issue? Havent found anything regarding this issue in the forum.

    Thanks

  • #2
    for me too - what was the resolution?

    Comment


    • #3
      Use 2.1.1 or above; current release is 2.1.4.

      https://jira.springsource.org/browse/INT-2489

      Comment


      • #4
        works!thanks

        Comment

        Working...
        X