Announcement Announcement Module
Collapse
No announcement yet.
Doctype Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doctype

    Hello,

    I'm not even sure if this is the right place to post this question in, but I am having a timeout problem when using
    Code:
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
    in the appname-servlet.xml file. I am new to Spring and I am using RAD 6 to go through the tutorial on the Spring website. When RAD 6 tries to build, it gives the following error message: Operation timed out: connect:could be due to invalid address.

    I downloaded the spring-framework-2.0.2-with-dependencies.zip file.

    Any help would be greatly appreciated.

    Thanks in advance.

    BTW, I do not have the Eclipse plug-in installed.
    Last edited by lugos; Feb 14th, 2007, 10:11 AM.

  • #2
    The first thing you should make sure of is that your proxy is configured in RAD.

    I use that dtd but not with the 2.0 suffix, I'm pretty sure that url is invalid as it points to nothing.

    Having said all that, you're better off in any case moving to a schema based validation mechanism. i.e. not a dtd but an xsd.

    Comment


    • #3
      mwiles,

      Thanks for the info. How would I go about moving to a schema based validation mechanism?

      Comment


      • #4
        Just leave out the doctype declaration and wrap your beans in this tag:

        Code:
        <beans default-lazy-init="true"
        	xmlns="http://www.springframework.org/schema/beans"
        	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        	xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
        
        ... beans ...
        
        </beans>
        The schema-based declaration is really sweet -- in the reference docs you'll find how to include other namespaces to support aop, utils, dynamic languages and other goodies

        http://static.springframework.org/sp...sd-config-body

        Charles

        Comment


        • #5
          Charles,

          Thanks for the info. Something must be wrong with RAD. Now it's giving me the following error message: cvc-elt.1: Cannot find the declaration of element 'beans'. It's complaining on this line:
          Code:
          xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
          The only jar file I need to import is spring.jar correct? Are there any other files I have to import?

          Comment


          • #6
            such deja vu when reading your posts...

            You're not using jdk 1.5 I take it or you would not have this error. You need to upgrade to a new version of your xml parser. I upgraded to xerces and the problem went away.

            Comment


            • #7
              I resolved the issue by referencing the spring-beans-2.0.dtd file locally. It seems to be working fine now.

              Comment


              • #8
                Lugos, Can you please tell me how you have referenced it locally... BTW where did you have that dtd and where did u put it. Please post the line in xml that you have used now...

                Many thanks in advance...

                Comment


                • #9
                  Originally posted by mwiles View Post
                  such deja vu when reading your posts...

                  You're not using jdk 1.5 I take it or you would not have this error. You need to upgrade to a new version of your xml parser. I upgraded to xerces and the problem went away.
                  Yes, we are still using jdk 1.4.

                  Originally posted by vinaypammi View Post
                  Lugos, Can you please tell me how you have referenced it locally... BTW where did you have that dtd and where did u put it. Please post the line in xml that you have used now...

                  Many thanks in advance...
                  Code:
                  <!DOCTYPE beans SYSTEM "spring-beans-2.0.dtd">
                  I placed the spring-beans-2.0.dtd file in the WEB-INF directory with the appname-servlet.xml. The spring-beans-2.0.dtd file was included in the zip file that I downloaded in the dist\resources directory.

                  Hope that helps.

                  Comment

                  Working...
                  X