Results 1 to 5 of 5

Thread: Configuration problem: Unable to locate NamespaceHandler for namespace

  1. #1
    Join Date
    Aug 2011
    Posts
    5

    Default Configuration problem: Unable to locate NamespaceHandler for namespace

    When i try to load my Spring config file, getting below exception,

    Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/context]

    This is my Spring Config file,

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns="http://www.springframework.org/schema/beans"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:int="http://www.springframework.org/schema/integration"
    	xmlns:int-file="http://www.springframework.org/schema/integration/file"
    	xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
    	xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
    		http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file-2.0.xsd
    		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    		http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd
    		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    	<context:property-placeholder location="file:C:/sftp.properties" />
    	<context:component-scan base-package="network.channel.config" />
    	<int-sftp:inbound-channel-adapter id="ftpInbound"
    		channel="ftpChannel" session-factory="sftpSessionFactory"
    		filename-regex=".*\.txt$" auto-create-local-directory="true"
    		delete-remote-files="false" remote-directory="." local-directory="file:output">
    		<int:poller fixed-rate="1000" />
    	</int-sftp:inbound-channel-adapter>
    	<int:channel id="ftpChannel">
    		<int:queue />
    	</int:channel>
    	
    </beans>
    Let me know if there is any mistakes in my config file.
    I got stuck with this error, Please give your thoughts to resolve this.

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

    Default

    Check your classpath. spring-context.jar is probably missing

  3. #3
    Join Date
    Aug 2011
    Posts
    5

    Default

    Jar "spring-context-3.0.5.RELEASE" is in my Classpath only.
    Really looks odd, Couldn't find the root cause to resolve the error

  4. #4
    Join Date
    Mar 2012
    Posts
    1

    Default

    Quote Originally Posted by palsura View Post
    Jar "spring-context-3.0.5.RELEASE" is in my Classpath only.
    Really looks odd, Couldn't find the root cause to resolve the error

    Were you able to resolve this issue, facing the same issue in the application?

    Any help would be appreciated!!

  5. #5
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    This is invariably a classpath problem.

    Add System.out.printlin(System.getProperty("java.class .path")) to the start of your code to see your actual classpath.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

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