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

Thread: Namespace problems: "no declaration can be found for element 'job'"

  1. #11
    Join Date
    May 2009
    Posts
    7

    Default

    Quote Originally Posted by Dave Syer View Post
    If you are connected to the internet Eclipse will follow the http link to the schema definition, as long as you type it correctly.
    It has to be correctly spelled because I'm able to follow this link in Eclipse by clicking ctrl+link. But obviously my Eclipse doesn't follow this link.

    Anyway, here is my beans-definition:
    Code:
    <beans:beans xmlns="http://www.springframework.org/schema/batch"
    	xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="
    		http://www.springframework.org/schema/batch
    		http://www.springframework.org/schema/batch/spring-batch-2.0.xsd 
    		http://www.springframework.org/schema/beans
    		http://www.springframework.org/schema/beans/spring-beans-2.0.xsd ">
    Quote Originally Posted by Dave Syer View Post
    or use the latest Spring IDE (comes with STS from http://www.springsource.com/products/sts) which has the catalog entry defined already
    Thanks for this hint. Since I do have the spring extension installed already, I uninstalled it and installed the newest version again. Still the same problem: It seems to point to an old schema and marks all new elements red.

    Quote Originally Posted by Dave Syer View Post
    STS also knows the schema location so it can install it in your XML file with one mouse click.
    How do I do this?

    And how do I create extra catalog entries?

    Thanks for your effort!

  2. #12
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    There is a version mismatch - there were some last minute changes to the Batch schema just before our release, and Spring IDE was released at about the same time. I looked and it seems the latest Spring IDE in STS doesn't have the Spring Batch 2.0.0.RELEASE jars. You can just replace the Batch jars in eclipse/plugins folder, but this should only affect the changes we made between RC3 and RELEASE, which are pretty minimal, so that wouldn't explain your schema validation failures.

    You can create catalog entries in Eclipse using the XML editor preferences. Open up the preferences and type "catalog" in the filter. There's a post on this forum somewhere from Dan (DHGarrette) explaining the gorey details. But it shouldn't be necessary now.

    The schema installation feature in Spring IDE should be automatically enabled for any Spring XMl file that you register with the Spring Beans Explorer. Just right click on the source text and choose "Configure Namespaces...".

  3. #13
    Join Date
    Dec 2009
    Posts
    1

    Default Namespace handlers cannot be located in classpath with INDEX.LIST is used in jar

    I ran into the same issue and found it had to do with generating an INDEX.LIST file in the jar. When generating the jar with the maven jar plugin, don't use the <index/> option. You can read the following for more information.

    http://jira.springframework.org/browse/SPR-5705

  4. #14
    Join Date
    Feb 2010
    Posts
    1

    Default Namespace problems: "no declaration can be found for

    I think I am very late in replying. I hope it helps those who reach this forum looking for an answer.

    Please make sure you have this on top of your config file.


    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/batch
    http://www.springframework.org/schema/batch/spring-batch-2.1.xsd"


    Regards,
    Rajesh K Ilango

  5. #15

    Default

    I think this issue also happens if there is a problem in your internet connection. I was in the middle of some unit testing and I had not changed any of my sping batch configuration files. Then suddenly this error starting happening. I could not understand it, and then I realized that there was in temporary hiccup in my office internet. I tried again after 15 minutes and it worked fine.

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
  •