Results 1 to 8 of 8

Thread: util: map error

  1. #1
    Join Date
    Feb 2012
    Posts
    101

    Default util: map error

    Hi,

    I'm getting this error though I have included the until namespace.Please let me how what is the problem here..


    03:52:09,015 ERROR [org.springframework.scheduling.support.TaskUtils$L oggingErrorHandler] (myScheduler-9) Unexpected error occurred in scheduled task.: org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 61 in XML document from file [/scratch/sramesh/spm8.0/jboss/ftp-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 61; columnNumber: 14; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:map'.

    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:util="http://www.springframework.org/schema/util"
    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...n-file-1.0.xsd


    <bean id="errorException"
    class="org.springframework.integration.router.Erro rMessageExceptionTypeRouter">
    <property name="channelIdentifierMap">
    <util:map>
    <entry key="java.io.IOException" value="retrySftpCahnnel" />
    <entry key="java.net.SocketException" value="retrySftpChannel" />
    <entry key="com.jcraft.jsch.JSchException" value="retrySftpChannel" />
    </util:map>
    </property>
    <property name="defaultOutputChannel" ref="processChannel" />
    </bean>

    Thanks

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

    Default

    You missing a namespace declaration for 'util' namespace
    Code:
    xmlns:util="http://www.springframework.org/schema/util"
    . . .
    xsi:schemaLocation=". . . http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"

  3. #3
    Join Date
    Feb 2012
    Posts
    101

    Default

    Thank you

    Actually I had the namespace but it was just spring-util.xsd.

    I need some help with another one too..

    I have this xml file

    <file:inbound-channel-adapter id="inboundAdapter"
    directory="/tmp/PMHistory/">
    <intoller id="poller" fixed-delay="864000"
    max-messages-per-poll="-1">

    </intoller>
    </file:inbound-channel-adapter>

    <!-- using sendFile method to send the zipped files to sendChannel of sftp
    outbound adapter files -->

    <int:channel id="sendChannel" />
    <int:service-activator input-channel="inboundAdapter"
    ref="myMessageHandler" method="sendFile" />

    <bean id="myMessageHandler" class="......PMExporter">
    </bean>
    I have the bean as a service.

    Now I have the ftp-config. xml defined above been invoked like this..Actually I want it to run as a cron job
    @Scheduled(cron="* * * * * *")
    public void run() {
    ctx = new FileSystemXmlApplicationContext("ftp-config.xml");
    }

    is this approach correct?

    Thanks

  4. #4
    Join Date
    Feb 2012
    Posts
    101

    Default

    I still see the same error after correction

    is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 61; columnNumber: 14; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:map'.
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.

    xmlns:file="http://www.springframework.org/schema/integration/file"
    xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/util
    http://www.springframework.org/schem...g-util-3.0.xsd
    http://www.springframework.org/schema/integration
    http://www.springframework

    is there anything wrong?

    Thanks

  5. #5
    Join Date
    Feb 2012
    Posts
    101

    Default

    The until map error got fixed.

    Thank You

  6. #6
    Join Date
    Feb 2012
    Posts
    101

    Default

    util map error got fixed

  7. #7
    Join Date
    Nov 2012
    Posts
    2

    Unhappy util: map error -

    Quote Originally Posted by newbie_24 View Post
    util map error got fixed
    Hi,

    I have included the namespace and schema information correctly. please have a look at it and let me know if i am doing something incorrect. The error message i am getting is

    nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:map'.


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schem...g-util-3.0.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

    <util:map id="sqlDatabaseMaps" map-class="java.util.HashMap">
    <entry key="sqlMapClientUS">
    <ref bean="sqlMapClientUS" />
    </entry>
    <entry key="sqlMapClientUK">
    <ref bean="sqlMapClientUK" />
    </entry>
    </util:map>

  8. #8
    Join Date
    Nov 2012
    Posts
    2

    Default

    newbie_24,

    Can you please let me know how your error got solved. I have included everything but still getting the same error. Please see below code.

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:soap="http://cxf.apache.org/bindings/soap"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schem...g-util-3.0.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

    <util:map id="sqlDatabaseMaps" map-class="java.util.HashMap">
    <entry key="sqlMapClientUS">
    <ref bean="sqlMapClientUS" />
    </entry>
    <entry key="sqlMapClientUK">
    <ref bean="sqlMapClientUK" />
    </entry>
    </util:map>

    ....

Posting Permissions

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