8 Replies Latest reply: Apr 4, 2012 4:17 PM by DrClap RSS

    Problems with http://java.sun.com/dtd/properties.dtd

    928525
      I have been trying to compile software for several days and I am having problems with:

      http://java.sun.com/dtd/propterties.dtd the error: java.io.IOException: Server returned HTTP response code: 504 for URL: http://java.sun.com/dtd/properties.dtd

      It started suddenly on 3/26/2012. It appears that when I try to navigate to the website using the browser, I get timeout or website unavailable errors. If I am persistant, I will get a connection, but only after a dozen or so attempts.
      I've tried it from several different networks and I get the same result.
        • 1. Re: Problems with http://java.sun.com/dtd/properties.dtd
          gimbal2
          Yes you are not the only one that is having trouble with java.sun.com being unstable.

          The best you can do is make sure you don't reference java.sun.com; keep trying until you can get a copy of whatever resource you need and make sure you can reference it from within your own network. Even if you have to make a new copy for each application you create, that is still a whole lot better than having to rely on an URL managed by an external company with which you probably have no service contract at all.
          • 2. Re: Problems with http://java.sun.com/dtd/properties.dtd
            928525
            Yes, i would agree, but the method I am using is very standard:

            <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"><properties>

            Changing this, for example, I have found that the secured site is responsive: https://java.sun.com/dtd/properties.dtd and will compile, the software will not start:

            2012-04-02 16:30:29,440 [Thread-3] [FRONTEND] INFO Configuration - ***** Instance initialization begins.
            2012-04-02 16:30:29,442 [Thread-3] [FRONTEND] INFO Configuration - Using configuration resource: [frontend.properties.xml]
            2012-04-02 16:30:29,444 [Thread-3] [FRONTEND] ERROR Configuration - java.util.InvalidPropertiesFormatException: org.xml.sax.SAXException: Invalid system identifier: https://java.sun.com/dtd/properties.dtd

            Any advice on how to handle this problem successfully?

            Thanks.
            • 3. Re: Problems with http://java.sun.com/dtd/properties.dtd
              gimbal2
              I already did but let me rephrase it: copy properties.dtd somewhere so you can reference it on your personal network in stead of java.sun.com.

              Or wait until Oracle finally fixes the instability problem and be safe until the next time it happens.
              • 4. Re: Problems with http://java.sun.com/dtd/properties.dtd
                928525
                Is there any hope that Oracle will fix this? Last I heard, they are not a start-up.
                • 5. Re: Problems with http://java.sun.com/dtd/properties.dtd
                  928525
                  Look at the javadocs:

                  http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Properties.html

                  I don't believe that the solution is to host the file on the network.

                  Oracle says how to use it. Oracle should work to get this fix ASAP. Does anybody with knowledge of Oracle know what is the time window for fixing this?
                  • 6. Re: Problems with http://java.sun.com/dtd/properties.dtd
                    928590
                    I have been experiencing a similar problem, which can be reproduced as in the following process:
                    1) Start with a valid, empty properties file (which requires per specification the "http://java.sun.com/dtd/properties.dtd" URI).
                    2) Use an XSLT stylesheet to add properties to the properties file, depending on a selected customization.
                    3) Use the resulting transformed properties file in a web container (Tomcat).

                    If I use the "http://java.sun.com/dtd/properties.dtd" URI per the specification, then step 2 fails when the java.sun.com server is flaky.
                    If I use a local URI against the specification, then step 3 fails because the result is no longer a valid properties file.

                    This seems to be a catch-22.

                    My latest thinking is that maybe I can modify the process as follows:
                    1a) Start with a invalid, empty properties file (using a local URI).
                    2) Use an XSLT stylesheet to add properties to the properties file, depending on a selected customization.
                    2a) Change the URI in the resulting properties file to the standard "http://java.sun.com/dtd/properties.dtd" per the specification.
                    3) Use the resulting transformed properties file in a web container (Tomcat).

                    Unfortunately, Java (and ant, which I use for the build process) does not appear to have an API for changing that URI. Any suggestions on how best to accomplish this? Or does anyone have another possible work-around?
                    • 7. Re: Problems with http://java.sun.com/dtd/properties.dtd
                      928590
                      I should also note that the first process described is one that I have used successfully and almost daily for over five years, and it only failed very rarely when java.sun.com could not be reached due to network issues. But it has been failing consistently since last week with java.sun.com being unreliable.
                      • 8. Re: Problems with http://java.sun.com/dtd/properties.dtd
                        DrClap
                        Well, in my opinion the XML software built into Java ought to be caching those commonly-used DTDs (not only this one but the XHTML DTDs and so on) instead of getting them from the web every single time. And not only that, the cached versions of the DTDs ought to be built into JRE distributions to support that process from the very beginning.