[GeoNetwork-devel] [GeoNetwork opensource Developer website] #775: Uploaded Plugin Profile does not work

#775: Uploaded Plugin Profile does not work
-----------------------------+----------------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Keywords: plugin profiles |
-----------------------------+----------------------------------------------
I have a Plugin Profile that works fine if I manually put it in
web/geonetwork/xml/schemas before starting GeoNetwork.

But it doesn't work when you upload it:

  * I made a zip file of it and uploaded that; it got unzipped in
web/geonetwork/schemaPlugins

  * the profile was listed in the admin page, where I could successfully
load the templates from my profile

  * going to New Metadata, the names of the templates of this profile are
not displayed (Ext GUI);

  * selecting one and trying to create a metadata from it fails, because it
tries to load XSLTs from its base ISO19139 schema from the
web/geonetwork/schemaPlugins directory (where they aren't) instead of from
the web/geonetwork/xml/schemas directory:
{{{
Error at xsl:include on line 7 column 57 of update-fixed-info.xsl:
   XTSE0165: java.io.FileNotFoundException:
   /web/geonetwork/schemaPlugins/iso19139/convert/functions.xsl (The system
cannot find the path specified)
}}}

  * schemaplugin-uri-catalog.xml *was* updated with lines like
{{{
   <uri name="blanks/metadata-schema07.xsl"
uri="../xml/schemas/iso19139.myprofile/present/metadata-
iso19139.myprofile.xsl" />
   <uri name="blanks/metadata-schema07-edit.xsl"
uri="../xml/schemas/iso19139.myprofile/present/metadata-iso19139
.myprofile-edit.xsl" />
}}}

  * finally I tried manually moving the profile directory from
web/geonetwork/schemaPlugins to web/geonetwork/xml/schemas, and restart.
Now the home page doesn't show up anymore because it is looking for my
profile in web/geonetwork/schemaPlugins:
{{{
Error at xsl:include on line 12 column 52 of metadata-utils.xsl:
   XTSE0165: java.io.FileNotFoundException:

   /web/geonetwork/schemaPlugins/iso19139.myprofile/present/metadata-
iso19139.myprofile.xsl (The system cannot find the path specified)
}}}

So to summarize, it seems there is some confusion when a Plugin Profile is
uploaded as to whether it is or should be in web/geonetwork/xml/schemas or
in web/geonetwork/schemaPlugins.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#775: Uploaded Plugin Profile does not work
------------------------------------+---------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Keywords: plugin profiles schema |
------------------------------------+---------------------------------------
Changes (by sha):

  * keywords: plugin profiles => plugin profiles schema

Comment:

'''Tried''' : I tried the same, but with the example files I downloaded
with the schemaPlugin. I tried the schema iso19139.mcp-1.4 and
iso19139.anzlic. The result for both of the example schemes are the same
as described by heikki.

Before uploading a schema, GeoNetwork "works". After uploading a schema,
GeoNetwork doesn't do anything any more, except showing the error on every
page, not only the admin page.

'''Noticed''' : I also took a look on the location of the uploaded schema.
In my case (I run the geonetwork.war under tomcat), this seems to be:

{{{
/usr/share/tomcat6/webapps/geonetwork/usr/share/tomcat6/webapps/geonetwork
/WEB-INF/data/config/schema_plugins/iso19139.mcp-1.4
}}}

Which is awkward (the part of the usr/share/tomcat6/webapp/geonetwork path
is double!).

'''Undo''' : To get geonetwork working again, I have to delete the whole
geonetwork dir under tomcat and redeploy the war (thus throwing away all
data caused by the upload of the schema).

'''Exception''' : Here I put the exception from the geonetwork.log. It
seems it isn't looking at the place where the schema has been put (see the
awkward path above) and, there seems to be a slash missing in the path, I
see "schema_pluginsiso19139.mcp-1.4" in the path in the logging.

{{{
2012-03-30 13:26:55,987 INFO [jeeves.service] - Dispatching : main.home
2012-03-30 13:26:55,987 DEBUG [jeeves.service] - -> no input parameters
2012-03-30 13:26:55,987 INFO [jeeves.service] - -> dispatching to
output for : main.home
2012-03-30 13:26:55,996 ERROR [jeeves.webapp.main.home] - Failed to load
guiservices for schema iso19139.mcp-1.
4: /usr/share/tomcat6/webapps/geonetwork/WEB-
INF/data/config/schema_pluginsiso19139.mcp-1.4/loc/eng/codelists.x
ml (No such file or directory)
2012-03-30 13:26:56,056 INFO [jeeves.service] - -> transforming with
stylesheet : /usr/share/tomcat6/weba
pps/geonetwork/xsl/main-page.xsl
2012-03-30 13:26:56,452 ERROR [jeeves.service] - -> exception during
transformation for : main.home
2012-03-30 13:26:56,452 ERROR [jeeves.service] - -> (C) stylesheet :
/usr/share/tomcat6/webapps/geonetwork/
xsl/main-page.xsl
2012-03-30 13:26:56,453 ERROR [jeeves.service] - -> (C) message :
Failed to compile stylesheet. 3 errors detected.
2012-03-30 13:26:56,453 ERROR [jeeves.service] - -> (C) exception :
TransformerConfigurationException
2012-03-30 13:26:56,453 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
   <message>Failed to compile stylesheet. 3 errors detected.</message>
   <class>TransformerConfigurationException</class>
   <stack>
     <at class="net.sf.saxon.PreparedStylesheet"
file="PreparedStylesheet.java" line="176" method="prepare" />
     <at class="net.sf.saxon.TransformerFactoryImpl"
file="TransformerFactoryImpl.java" line="139" method="newTemplates" />
     <at class="de.fzi.dbs.xml.transform.CachingTransformerFactory"
file="CachingTransformerFactory.java" line="127" method="newTransformer"
/>
     <at class="de.fzi.dbs.xml.transform.CachingTransformerFactory"
file="CachingTransformerFactory.java" line="82" method="newTransformer" />
     <at class="jeeves.utils.Xml" file="Xml.java" line="467"
method="transform" />
     <at class="jeeves.utils.Xml" file="Xml.java" line="393"
method="transform" />
     <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="721" method="dispatchOutput" />
     <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="417" method="dispatch" />
     <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="723" method="dispatch" />
     <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="198" method="execute" />
     <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="102" method="doGet" />
     <skip>...</skip>
   </stack>
   <request>
     <language>eng</language>
     <service>main.home</service>
   </request>
   <response />
</error>
2012-03-30 13:26:56,453 INFO [jeeves.service] - -> dispatching to
error for : main.home
2012-03-30 13:26:56,461 ERROR [jeeves.webapp.main.home] - Failed to load
guiservices for schema iso19139.mcp-1.4:
/usr/share/tomcat6/webapps/geonetwork/WEB-
INF/data/config/schema_pluginsiso19139.mcp-1.4/loc/eng/codelists.xml (No
such file or directory)
2012-03-30 13:26:56,463 INFO [jeeves.service] - -> transforming with
stylesheet : /usr/share/tomcat6/webapps/geonetwork/xsl/error.xsl
2012-03-30 13:26:56,494 INFO [jeeves.service] - -> end error
transformation for : main.home
2012-03-30 13:26:56,494 INFO [jeeves.service] - -> error ended for :
main.home
}}}

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#775: Uploaded Plugin Profile does not work
------------------------------------+---------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Keywords: plugin profiles schema |
------------------------------------+---------------------------------------

Comment(by sha):

I referred to heikii for the error, but I meant taniapf on http://osgeo-
org.1560.n6.nabble.com/personalized-schema-plugin-error-td4667319.html
(sorry for the mixup).

Thus: I used schemaPlugin to create the iso19139.mcp-1.4.zip and
iso19139.anzlic.zip and upload it via the administration page to
GeoNetwork. After that, the TransformerConfigurationException appears.

> '''Tried''' : I tried the same, but with the example files I downloaded
with the schemaPlugin. I tried the schema iso19139.mcp-1.4 and
iso19139.anzlic. The result for both of the example schemes are the same
as described by heikki.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#775: Uploaded Plugin Profile does not work
------------------------------------+---------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Keywords: plugin profiles schema |
------------------------------------+---------------------------------------

Comment(by simonp):

Actually this is a different bug to Heikki's original but it is fixed in
svn rev 8955 - the bug you have found is restricted to cases where the
schema is uploaded as a zip file - it was triggered during changes for
geonetwork data dir.

(Also note that iso19139.mcp-1.4 depends on iso19139.mcp - you need to
upload both schemas for these to work).

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775#comment:3&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#775: Uploaded Plugin Profile does not work
------------------------------------+---------------------------------------
Reporter: heikki | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Keywords: plugin profiles schema |
------------------------------------+---------------------------------------

Comment(by sha):

Confirm. The problem I had is indeed fixed with the new revision. I had
revision 8948 or so, one or two days before the 8955.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775#comment:4&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#775: Uploaded Plugin Profile does not work
----------------------+-----------------------------------------------------
  Reporter: heikki | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: blocker | Milestone: v2.7.0
Component: General | Version:
Resolution: fixed | Keywords: plugin profiles schema
----------------------+-----------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

Comment:

Re-jig the schemamanager design to remove the distinction between plugin
and built in schemas - all schemas can be plugged in now and they all live
in the same place - the data directory(specifically
data/config/schema_plugins).

See svn rev 8986

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/775#comment:5&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.