Back Forum Reply New

Run in Eclipse, cannot find XSD.

..beans.factory.BeanDefinitionSt  oreException: Line 61 in XML document from ucl [file:/C:/work/TestExternalQuery/properties/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The prefix quot;txquot; for element quot;tx:advicequot; is not bound.
Caused by:
org.xml.sax.SAXParseException: The prefix quot;txquot; for element quot;tx:advicequot; is not bound.
at org.apache.xerces.util.ErrorHandlerWrapper.createS  AXParseException(Unknown Source)
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:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;beans xmlns=quot;schema/beansquot;
xmlns:xsi=quot;2001/XMLSchema-instancequot;
xmlns:aop=quot;schema/aopquot;
xmlns:tx=quot;schema/txquot;
xsi:schemaLocation=quot;schema/beans         schema/beans/spring-beans.xsd         schema/tx         schema/tx/spring-tx.xsd         schema/aop         schema/aop/spring-aop.xsdquot;gt;
Try the above snippet. If that doesn't work, perhaps you may need to upgrade to the latest Eclipse 3.2.

-Ramnivas

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.

Please file a JIRA issue so that the incorrect code snippet in the reference guide can be fixed.
¥
Back Forum Reply New