Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8012 (closed)

Opened 12 years ago

Closed 12 years ago

XML parsing: fail gracefully if DTDs cannot be resolved

Reported by: mlinkert Owned by: mlinkert
Priority: minor Milestone: OMERO-4.4
Component: Bio-Formats Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

There are two ways to handle this, both of which I think involve overriding the resolveEntity method in DefaultHandler?. First option is to just ignore the DTDs entirely:

 public org.xml.sax.InputSource resolveEntity(String publicId, String systemId)
                throws org.xml.sax.SAXException, java.io.IOException {
            System.out.println("Ignoring: " + publicId + ", " + systemId);
            return new org.xml.sax.InputSource(new java.io.StringReader(""));
        }

second option is to timeout if the DTD cannot be resolved within some set amount of time (1 minute? 5 minutes?).

Change History (1)

comment:1 Changed 12 years ago by mlinkert

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.64910 sec.)

We're Hiring!