[GeoNetwork-devel] PROBLEM EDITING METADATA IN MYSQL/POSTGRES

I'm Daniele and i've configured
Geonetwok 2.4.3 to work with MySQL
on Windows Server 2003.

Editing metadata I get this error
when I delete single metadata section
using the small 'x' button near the section.
(i.e. language section in ISO19139 schema;
in the message error [Element ID] content
changes according to deleted section):

The requested operation could not be performed.
IllegalStateException : Element not found at ref = [element ID]

Messagge error is displayed in Mozilla Firefox
but not in IE or Google Chrome
(though delete operation doesn't work anyway).
Problem does not occur using McKoi
instead of MySQL (but is the same using PostGres)

Does anyone know how to fix this?

Daniele
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/PROBLEM-EDITING-METADATA-IN-MYSQL-POSTGRES-tp5368324p5368324.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

I tried again and now
I get the error also with McKoi.
This is the log messagge I obtained in geonetwork.log file
by setting debug option to 'DEBUG' in log4j.cfg file:

2010-08-04 11:55:25,250 INFO [jeeves.request] -

2010-08-04 11:55:25,250 INFO [jeeves.request] - HTML Request (from
172.18.13.35) : /geonetwork/srv/en//metadata.elem.delete
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Method : GET
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Content type : null
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Session id is
52D5F70379FE9216703F796DE82EF73D
2010-08-04 11:55:25,250 INFO [jeeves.service] - Dispatching :
metadata.elem.delete
2010-08-04 11:55:25,250 DEBUG [jeeves.service] - -> parameters are :
<request>
  <parent>85</parent>
  <ref>128</ref>
  <id>97</id>
</request>
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.select] - Query : SELECT schemaId
FROM Metadata WHERE id = 97
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.select] - Found 1 records in
0.015 secs
2010-08-04 11:55:25,265 DEBUG [geonetwork.datamanager] - Retrieving metadata
from session 1
2010-08-04 11:55:25,265 DEBUG [geonetwork.datamanager] - Storing metadata in
session 1
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,265 INFO [jeeves.service] - -> dispatching to output
for : metadata.elem.delete
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
Groups WHERE id > 1
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Found 1 records in
0.016 secs
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
GroupsDes
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Found 32 records in 0.0
secs
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
Regions
2010-08-04 11:55:25,296 DEBUG [jeeves.dbms.select] - Found 289 records in
0.015 secs
2010-08-04 11:55:25,296 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
RegionsDes
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Found 2310 records in
0.047 secs
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Query : SELECT uuid as
siteId, name FROM Sources
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Found 1 records in 0.0
secs
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
IsoLanguages
2010-08-04 11:55:25,359 DEBUG [jeeves.dbms.select] - Found 484 records in
0.016 secs
2010-08-04 11:55:25,359 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
IsoLanguagesDes
2010-08-04 11:55:25,453 DEBUG [jeeves.dbms.select] - Found 3388 records in
0.094 secs
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Query : SELECT id,
schemaId, root, title FROM Metadata WHERE isTemplate='s' ORDER BY root,
title
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Args :
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Found 2 records in 0.0
secs
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,468 INFO [jeeves.service] - -> transforming with
stylesheet : C:\Tomcat5_5\webapps\geonetwork\/xsl/metadata-edit-embedded.xsl
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> end transformation
for : metadata.elem.delete
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> output ended for :
metadata.elem.delete
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> dispatch ended for :
metadata.elem.delete
2010-08-04 11:55:25,640 INFO [jeeves.request] -

2010-08-04 11:55:25,640 INFO [jeeves.request] - HTML Request (from
172.18.13.35) : /geonetwork/srv/en//metadata.elem.delete
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Method : GET
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Content type : null
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Session id is
52D5F70379FE9216703F796DE82EF73D
2010-08-04 11:55:25,640 INFO [jeeves.service] - Dispatching :
metadata.elem.delete
2010-08-04 11:55:25,640 DEBUG [jeeves.service] - -> parameters are :
<request>
  <parent>85</parent>
  <ref>128</ref>
  <id>97</id>
</request>
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.select] - Query : SELECT schemaId
FROM Metadata WHERE id = 97
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.select] - Found 1 records in 0.0
secs
2010-08-04 11:55:25,640 DEBUG [geonetwork.datamanager] - Retrieving metadata
from session 1
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - Aborting
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,640 ERROR [jeeves.service] - Exception when executing
service
2010-08-04 11:55:25,640 ERROR [jeeves.service] - (C) Exc :
java.lang.IllegalStateException: Element not found at ref = 128
2010-08-04 11:55:25,640 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
  <message>Element not found at ref = 128</message>
  <class>IllegalStateException</class>
  <stack>
    <at class="org.fao.geonet.kernel.DataManager" file="???" line="-1"
method="deleteElementEmbedded" />
    <at class="org.fao.geonet.services.metadata.DeleteElement" file="???"
line="-1" method="exec" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="???" line="-1"
method="execService" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="???" line="-1"
method="execServices" />
    <at class="jeeves.server.dispatchers.ServiceManager" file="???"
line="-1" method="dispatch" />
    <at class="jeeves.server.JeevesEngine" file="???" line="-1"
method="dispatch" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="???"
line="-1" method="execute" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="???"
line="-1" method="doGet" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="627" method="service" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="729" method="service" />
  </stack>
  <request>
    <language>en</language>
    <service>metadata.elem.delete</service>
  </request>
</error>
2010-08-04 11:55:25,640 INFO [jeeves.service] - -> dispatching to error
for : metadata.elem.delete
2010-08-04 11:55:25,656 INFO [jeeves.service] - -> transforming with
stylesheet : C:\Tomcat5_5\webapps\geonetwork\/xsl/error.xsl
2010-08-04 11:55:25,671 INFO [jeeves.service] - -> end error
transformation for : metadata.elem.delete
2010-08-04 11:55:25,671 INFO [jeeves.service] - -> error ended for :
metadata.elem.delete

It seems as if the same delete request was sent to Jeeves two times...

Daniele
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/PROBLEM-EDITING-METADATA-IN-MYSQL-POSTGRES-tp5368324p5371987.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

Hi Daniele,

Likely that this is in the javascript interface rather than a function of the database. The ajax editor controls are protected from clicks that happen within half a second of one another (eg. double click by mistake on an editor control). But I have seen firebug in mozilla cause this double submit behaviour - did you have firebug activated when this happened?

Cheers,
Simon
________________________________________
From: daniele77 [daniele.dellosso@anonymised.com]
Sent: Wednesday, 4 August 2010 8:41 PM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] PROBLEM EDITING METADATA IN MYSQL/POSTGRES

I tried again and now
I get the error also with McKoi.
This is the log messagge I obtained in geonetwork.log file
by setting debug option to 'DEBUG' in log4j.cfg file:

2010-08-04 11:55:25,250 INFO [jeeves.request] -

2010-08-04 11:55:25,250 INFO [jeeves.request] - HTML Request (from
172.18.13.35) : /geonetwork/srv/en//metadata.elem.delete
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Method : GET
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Content type : null
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2010-08-04 11:55:25,250 DEBUG [jeeves.request] - Session id is
52D5F70379FE9216703F796DE82EF73D
2010-08-04 11:55:25,250 INFO [jeeves.service] - Dispatching :
metadata.elem.delete
2010-08-04 11:55:25,250 DEBUG [jeeves.service] - -> parameters are :
<request>
  <parent>85</parent>
  <ref>128</ref>
  <id>97</id>
</request>
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,250 DEBUG [jeeves.dbms.select] - Query : SELECT schemaId
FROM Metadata WHERE id = 97
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.select] - Found 1 records in
0.015 secs
2010-08-04 11:55:25,265 DEBUG [geonetwork.datamanager] - Retrieving metadata
from session 1
2010-08-04 11:55:25,265 DEBUG [geonetwork.datamanager] - Storing metadata in
session 1
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,265 INFO [jeeves.service] - -> dispatching to output
for : metadata.elem.delete
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,265 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
Groups WHERE id > 1
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Found 1 records in
0.016 secs
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
GroupsDes
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Found 32 records in 0.0
secs
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,281 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
Regions
2010-08-04 11:55:25,296 DEBUG [jeeves.dbms.select] - Found 289 records in
0.015 secs
2010-08-04 11:55:25,296 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
RegionsDes
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Found 2310 records in
0.047 secs
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Query : SELECT uuid as
siteId, name FROM Sources
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Found 1 records in 0.0
secs
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,343 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
IsoLanguages
2010-08-04 11:55:25,359 DEBUG [jeeves.dbms.select] - Found 484 records in
0.016 secs
2010-08-04 11:55:25,359 DEBUG [jeeves.dbms.select] - Query : SELECT * FROM
IsoLanguagesDes
2010-08-04 11:55:25,453 DEBUG [jeeves.dbms.select] - Found 3388 records in
0.094 secs
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Query : SELECT id,
schemaId, root, title FROM Metadata WHERE isTemplate='s' ORDER BY root,
title
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Args :
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.select] - Found 2 records in 0.0
secs
2010-08-04 11:55:25,468 DEBUG [jeeves.dbms.pool] - Committing and closing
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,468 INFO [jeeves.service] - -> transforming with
stylesheet : C:\Tomcat5_5\webapps\geonetwork\/xsl/metadata-edit-embedded.xsl
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> end transformation
for : metadata.elem.delete
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> output ended for :
metadata.elem.delete
2010-08-04 11:55:25,531 INFO [jeeves.service] - -> dispatch ended for :
metadata.elem.delete
2010-08-04 11:55:25,640 INFO [jeeves.request] -

2010-08-04 11:55:25,640 INFO [jeeves.request] - HTML Request (from
172.18.13.35) : /geonetwork/srv/en//metadata.elem.delete
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Method : GET
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Content type : null
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2010-08-04 11:55:25,640 DEBUG [jeeves.request] - Session id is
52D5F70379FE9216703F796DE82EF73D
2010-08-04 11:55:25,640 INFO [jeeves.service] - Dispatching :
metadata.elem.delete
2010-08-04 11:55:25,640 DEBUG [jeeves.service] - -> parameters are :
<request>
  <parent>85</parent>
  <ref>128</ref>
  <id>97</id>
</request>
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - DBMS Resource 0 is false
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - SUCCESS: DBMS Resource 0
is not locked
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.select] - Query : SELECT schemaId
FROM Metadata WHERE id = 97
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.select] - Found 1 records in 0.0
secs
2010-08-04 11:55:25,640 DEBUG [geonetwork.datamanager] - Retrieving metadata
from session 1
2010-08-04 11:55:25,640 DEBUG [jeeves.dbms.pool] - Aborting
jeeves.resources.dbms.Dbms@anonymised.com
2010-08-04 11:55:25,640 ERROR [jeeves.service] - Exception when executing
service
2010-08-04 11:55:25,640 ERROR [jeeves.service] - (C) Exc :
java.lang.IllegalStateException: Element not found at ref = 128
2010-08-04 11:55:25,640 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
  <message>Element not found at ref = 128</message>
  <class>IllegalStateException</class>
  <stack>
    <at class="org.fao.geonet.kernel.DataManager" file="???" line="-1"
method="deleteElementEmbedded" />
    <at class="org.fao.geonet.services.metadata.DeleteElement" file="???"
line="-1" method="exec" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="???" line="-1"
method="execService" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="???" line="-1"
method="execServices" />
    <at class="jeeves.server.dispatchers.ServiceManager" file="???"
line="-1" method="dispatch" />
    <at class="jeeves.server.JeevesEngine" file="???" line="-1"
method="dispatch" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="???"
line="-1" method="execute" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="???"
line="-1" method="doGet" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="627" method="service" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="729" method="service" />
  </stack>
  <request>
    <language>en</language>
    <service>metadata.elem.delete</service>
  </request>
</error>
2010-08-04 11:55:25,640 INFO [jeeves.service] - -> dispatching to error
for : metadata.elem.delete
2010-08-04 11:55:25,656 INFO [jeeves.service] - -> transforming with
stylesheet : C:\Tomcat5_5\webapps\geonetwork\/xsl/error.xsl
2010-08-04 11:55:25,671 INFO [jeeves.service] - -> end error
transformation for : metadata.elem.delete
2010-08-04 11:55:25,671 INFO [jeeves.service] - -> error ended for :
metadata.elem.delete

It seems as if the same delete request was sent to Jeeves two times...

Daniele
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/PROBLEM-EDITING-METADATA-IN-MYSQL-POSTGRES-tp5368324p5371987.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork