Announcement Announcement Module
Collapse
No announcement yet.
bean def xml file import element error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • bean def xml file import element error

    OK. I feel silly for even posting this but I am getting an error when I use the import element in my xml bean def file.

    example

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <description>this is the description</description>
    <import resource="mycontext.xml"/>
    <bean id="junk" class="com.Junk"></bean>
    </beans>

    the error is

    nested exception is org.xml.sax.SAXParseException: Element type "import" must be declared.


    import is in the DTD... so anyone have any idea what I'm doing wrong?

    Thanks

  • #2
    Do you use a recent enough version of Spring ?
    import was only added in 1.1.1 or 1.1.2. Even if the url points to the updated dtd, spring uses an internal resolver and will use the built in dtd file to check the xml syntax.

    Comment


    • #3
      Thanks. That was it. My Spring library in my dev area was 1.1. Thanks again!

      Comment

      Working...
      X