Opened 12 years ago

Closed 11 years ago

#233 closed defect (wontfix)

Some wrong definitions are silently ignored

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: major Milestone: 9.0
Component: secore Version: 8.3
Keywords: secore silent Cc: m.rusu@…
Complexity: Very Hard

Description

Sometimes, GML definitions are added to SECORE and they are silently discarded.

Example:
http://localhost:8080/def/crs/EPSG/0/browse.jsp
then literally add:

whatever

And SECORE returns to the web page, but actually nothing was added.

Change History (7)

comment:1 by Dimitar Misev, 12 years ago

The relevant code is in browse.jsp

      String query = "declare namespace gml = \"http://www.opengis.net/gml\";" + Constants.NEW_LINE
          + "let $x := doc('gml')" + Constants.NEW_LINE
          + "return insert node <dictionaryEntry xmlns=\"http://www.opengis.net/gml\">"+newd+"</dictionaryEntry> into $x";
      String result = DbManager.getInstance().getDb().query(query);
      out.println("<br/><span style=\"font-size:x-large;\">The database has been updated</span><br/>");

It seems like there's no check if the newd is valid GML. Not sure if BaseX can do this validity check automatically.

comment:2 by Piero Campalani, 12 years ago

As I can see from the BaseX class where the INSERT is executed:

  public String query(String query) throws SecoreException {
    log.trace("Executing query: " + query);
    try {
      String ret = new XQuery(query).execute(context);
      log.trace("Query successfully executed.");
      return ret;
    } catch (Exception e) {
      throw new SecoreException(ExceptionCode.InternalComponentError, "Failed at querying the database", e);
    }

  }

this does not depend on SECORE code, but rather on the org.basex.core.cmd.XQuery class which does not throw any exception.

comment:3 by Piero Campalani, 12 years ago

The problem with my GML definition was in the XML namespace for GML, which I put as "http://www.opengis.net/gml/3.2", whereas SECORE requires "http://www.opengis.net/gml".

If there's something that could be done I leave this ticket unclosed. It is anyway a minor problem.

comment:4 by Peter Baumann, 12 years ago

Milestone: 9.0

comment:5 by Dimitar Misev, 11 years ago

Complexity: Very Hard

The default namespace in the latest EPSG database has been fixed to http://www.opengis.net/gml/3.2

I think we can close this ticket as I don't see a solution.

comment:6 by Dimitar Misev, 11 years ago

Owner: changed from mrusu to Piero Campalani
Status: newassigned

comment:7 by Piero Campalani, 11 years ago

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.