Opened 5 years ago

Closed 4 years ago

#233 closed defect (wontfix)

Some wrong definitions are silently ignored

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


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

then literally add:


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

Change History (7)

comment:1 Changed 5 years ago by dmisev

The relevant code is in browse.jsp

      String query = "declare namespace gml = \"\";" + Constants.NEW_LINE
          + "let $x := doc('gml')" + Constants.NEW_LINE
          + "return insert node <dictionaryEntry xmlns=\"\">"+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 Changed 5 years ago by pcampalani

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 Changed 5 years ago by pcampalani

The problem with my GML definition was in the XML namespace for GML, which I put as "", whereas SECORE requires "".

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

comment:4 Changed 5 years ago by pbaumann

  • Milestone set to 9.0

comment:5 Changed 4 years ago by dmisev

  • Complexity set to Very Hard

The default namespace in the latest EPSG database has been fixed to

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

comment:6 Changed 4 years ago by dmisev

  • Owner changed from mrusu to pcampalani
  • Status changed from new to assigned

comment:7 Changed 4 years ago by pcampalani

  • Resolution set to wontfix
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.