Announcement Announcement Module
Collapse
No announcement yet.
Configuration problem: Unable to locate NamespaceHandler for namespace Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Check your classpath. spring-context.jar is probably missing

    Comment


    • #3
      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

      Comment


      • #4
        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!!

        Comment


        • #5
          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.

          Comment

          Working...
          X