Results 1 to 3 of 3

Thread: bean def xml file import element error

  1. #1
    Join Date
    Aug 2004
    Location
    Vermont
    Posts
    27

    Default 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
    David Noel

  2. #2
    Join Date
    Aug 2004
    Location
    Toulouse, France
    Posts
    148

    Default

    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.
    Olivier

  3. #3
    Join Date
    Aug 2004
    Location
    Vermont
    Posts
    27

    Default

    Thanks. That was it. My Spring library in my dev area was 1.1. Thanks again!
    David Noel

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. Context initialization failed
    By kanonmicke in forum Container
    Replies: 7
    Last Post: Sep 29th, 2005, 12:35 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •