Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Newbie Question: Using Groovy on file sample

  1. #11
    Join Date
    May 2011
    Posts
    10

    Default change to 2.0.xsd same error

    I changed to the 2.0 xsd,


    <beans:beans xmlns="http://www.springframework.org/schema/integration"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:file="http://www.springframework.org/schema/integration/file"
    xmlns:groovy="http://www.springframework.org/schema/integration/groovy"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/integration
    http://www.springframework.org/schem...ration-2.0.xsd
    http://www.springframework.org/schema/integration/file
    http://www.springframework.org/schem...ation-file.xsd
    http://www.springframework.org/schem...gration/groovy
    http://www.springframework.org/schema/integration/groovy/spring-integration-groovy.xsd">


    Same Error:



    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 52 in XML document from class path resource [org/springframework/integration/samples/filecopy/loadConfig.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'integration:innerPollerType' to a(n) 'type definition' component.

  2. #12
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    Can you also verify that the 2.0.4.BUILD-SNAPSHOT version is the *only* one on your classpath?

  3. #13
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Hmm

    Let me try your sample. I'll let you know.

  4. #14
    Join Date
    May 2011
    Posts
    10

    Smile Got something working

    Here is what I had to do to get things going:

    1) Download spring-integration-2.0.xsd to local drive
    2) Change xsd innerPollerType references to BasePollerType
    3) Change loadConfig.xml schemaLocation reference to use local copy
    4) remove poller reference and use global poller

    <poller id="poller" default="true" >
    <interval-trigger interval="100"/>
    </poller>

    5) modify pom.xml to include spring-integration-groovy 2.0.4.BUILD-SNAPSHOT Dependency

    Step 2 and 4 seems to be the primary issues.

    I am attaching the changed xsd and the eclipse project so that you can see and a sample data file
    Attached Files Attached Files

  5. #15
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    You should never have to do any of that. The XSD is loaded from the classpath (not the publicly available URL). Did you check to be sure that you don't have multiple versions of Spring Integration on your classpath?

  6. #16
    Join Date
    May 2011
    Posts
    10

    Default hummm

    I see what you are saying about it being in the jar, . . . looking through eclipse, i don't see it on the classpath. See attached image
    Attached Images Attached Images

  7. #17
    Join Date
    May 2011
    Posts
    10

    Default think I got something

    It appears there might have been an issue with the schemaLocation, . . . I reworked it a little and now have this and it appears to be working as expected

    <beans:beans xmlns="http://www.springframework.org/schema/integration"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:file="http://www.springframework.org/schema/integration/file"
    xmlns:groovy="http://www.springframework.org/schema/integration/groovy"
    xmlns:lang="http://www.springframework.org/schema/lang"
    xsi:schemaLocation="http://www.springframework.org/schema/integration
    http://www.springframework.org/schem...ntegration.xsd
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/integration/file
    http://www.springframework.org/schem...ation-file.xsd
    http://www.springframework.org/schem...gration/groovy
    http://www.springframework.org/schem...ion-groovy.xsd
    http://www.springframework.org/schema/lang
    http://www.springframework.org/schem...g-lang-3.0.xsd
    ">

    It appears that the order of the schemaLocations is important, . . . does that sound correct you?

  8. #18
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    The order of those should not matter.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •