Announcement Announcement Module
Collapse
No announcement yet.
Run in Eclipse, cannot find XSD. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run in Eclipse, cannot find XSD.

    Attempting to use the Spring 2.0 new features. At command line app runs, but a run in Eclipse end in exception finding the xschema file. Is there any extra step needed to configure Eclipse 3.2rc5?

    2006-09-01 00:27:16,828 20060901-00:27:16. main DEBUG CollectionFactory - Creating [java.util.LinkedHashSet]
    2006-09-01 00:27:16,843 20060901-00:27:16. main INFO XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/C:/work/TestExternalQuery/properties/applicationContext.xml]
    2006-09-01 00:27:17,015 20060901-00:27:17. main DEBUG DefaultDocumentLoader - Using JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl]
    2006-09-01 00:27:17,265 20060901-00:27:17. main DEBUG ResourceEntityResolver - Attempting to resolve XML Schema [http://www.springframework.org/schem...ing-beans.xsd] using [org.springframework.beans.factory.xml.PluggableSch emaResolver]
    2006-09-01 00:27:17,359 20060901-00:27:17. main ERROR Application - Failed to load Spring contexts. Line 61 in XML document from URL [file:/C:/work/TestExternalQuery/properties/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The prefix "tx" for element "tx:advice" is not bound.
    org.springframework.beans.factory.BeanDefinitionSt oreException: Line 61 in XML document from URL [file:/C:/work/TestExternalQuery/properties/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The prefix "tx" for element "tx:advice" is not bound.
    Caused by:
    org.xml.sax.SAXParseException: The prefix "tx" for element "tx:advice" is not bound.
    at org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)

  • #2
    Perhaps incorrect namespace declaration

    I wonder if your XML file has a valid declaration for namespaces. I use Eclipse 3.2 and didn't need any special configuration.

    Here is the beginning of my XML file.

    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:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans 
    	                    http://www.springframework.org/schema/beans/spring-beans.xsd 
    	                    http://www.springframework.org/schema/tx 
    	                    http://www.springframework.org/schema/tx/spring-tx.xsd 
    	                    http://www.springframework.org/schema/aop 
    	                    http://www.springframework.org/schema/aop/spring-aop.xsd">
    Try the above snippet. If that doesn't work, perhaps you may need to upgrade to the latest Eclipse 3.2.

    -Ramnivas

    Comment


    • #3
      The XML declaration was incorrect. I initially copied the one that appears in the Spring Reference online. I even tried tweaking it to no avail.

      Thanks.

      Comment


      • #4
        Please file a JIRA issue so that the incorrect code snippet in the reference guide can be fixed.

        Comment

        Working...
        X