[GeoNetwork-users] GN2.4 disable xsl caching bug?

Hi,

we are in the process of customizing a geonetwork site (2.4RC2 with java
1.6.0_13), so I've tried to deactivate the xsl caching so we dont have to
stop/start the server to each xsl modification.
To do so, I've only edited the javax.xml.transform.TransformerFactory file
in the META-INF/services directory and changed the value to
org.apache.xalan.processor.TransformerFactoryImpl.
But then I have a NullPointerException with the following log, have I missed
something?
Regards
Yves

INFO jeeves.service - -> transforming with stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
WARNING: transformerfactory doesnt like saxon attributes!
ID système inconnu; Ligne #22; Colonne #71; Impossible de trouver la
fonction : tokenize
ID système inconnu; Ligne #22; Colonne #71; jeton de fonction introuvable.
(Emplacement inconnu de l'erreur)java.lang.NullPointerException
396763 [8897128@anonymised.com] ERROR jeeves.service - -> exception during
transformation for : main.home
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) message : null
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) exception :
NullPointerException
396764 [8897128@anonymised.com] DEBUG jeeves.service - Raised exception while
executing service
<error id="error">

  <message />

  <class>NullPointerException</class>

  <stack>

    <at class="jeeves.utils.Xml" file="Xml.java" line="243"
method="transform" />

    <at class="jeeves.utils.Xml" file="Xml.java" line="204"
method="transform" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="678" method="dispatchOutput" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="383" method="dispatch" />

    <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="621" method="dispatch" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="174" method="execute" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="89" method="doGet" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="707" method="service" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="820" method="service" />

    <at class="org.mortbay.jetty.servlet.ServletHolder"
file="ServletHolder.java" line="502" method="handle" />

  </stack>

  <request>

    <language>en</language>

    <service>main.home</service>

  </request>

  <response />

</error>
--
View this message in context: http://n2.nabble.com/GN2.4-disable-xsl-caching-bug--tp3322121p3322121.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Ok found it,

as GN2.4 uses now saxon, the actual factory to use is
net.sf.saxon.TransformerFactoryImpl . File README in that directory should
be updated to reflect that

Yves G wrote:

Hi,

we are in the process of customizing a geonetwork site (2.4RC2 with java
1.6.0_13), so I've tried to deactivate the xsl caching so we dont have to
stop/start the server to each xsl modification.
To do so, I've only edited the javax.xml.transform.TransformerFactory file
in the META-INF/services directory and changed the value to
org.apache.xalan.processor.TransformerFactoryImpl.
But then I have a NullPointerException with the following log, have I
missed something?
Regards
Yves

INFO jeeves.service - -> transforming with stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
WARNING: transformerfactory doesnt like saxon attributes!
ID système inconnu; Ligne #22; Colonne #71; Impossible de trouver la
fonction : tokenize
ID système inconnu; Ligne #22; Colonne #71; jeton de fonction introuvable.
(Emplacement inconnu de l'erreur)java.lang.NullPointerException
396763 [8897128@anonymised.com] ERROR jeeves.service - -> exception during
transformation for : main.home
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) message :
null
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) exception :
NullPointerException
396764 [8897128@anonymised.com] DEBUG jeeves.service - Raised exception while
executing service
<error id="error">

  <message />

  <class>NullPointerException</class>

  <stack>

    <at class="jeeves.utils.Xml" file="Xml.java" line="243"
method="transform" />

    <at class="jeeves.utils.Xml" file="Xml.java" line="204"
method="transform" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="678" method="dispatchOutput" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="383" method="dispatch" />

    <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="621" method="dispatch" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="174" method="execute" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="89" method="doGet" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="707" method="service" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="820" method="service" />

    <at class="org.mortbay.jetty.servlet.ServletHolder"
file="ServletHolder.java" line="502" method="handle" />

  </stack>

  <request>

    <language>en</language>

    <service>main.home</service>

  </request>

  <response />

</error>

--
View this message in context: http://n2.nabble.com/GN2.4-disable-xsl-caching-bug--tp3322121p3322325.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Yves G wrote:

Ok found it,

as GN2.4 uses now saxon, the actual factory to use is
net.sf.saxon.TransformerFactoryImpl . File README in that directory should
be updated to reflect that

Hallo,

That works for the 'HEAD' xsl files but when I include files (e.g. in
metadata-utils.xsl) I have to restart the server on any change!!

Knows someone a solution for that?

Cheers
Hans

This is the README text for disabling the caching:
By default XSL caching is active.

The javax.xml.transform.TransformerFactory file is used to define
the XSL processor to use.
* de.fzi.dbs.xml.transform.CachingTransformerFactory for XSL caching
(recommended value for production use).
* org.apache.xalan.processor.TransformerFactoryImpl for no XSL caching
(recommended for dev). When caching is on, only the main XSL stylesheet
last update date is checked and not all included XSL. If you update
an included stylesheet, cache is still used. (!!!! HERE, cache is still used
!!!!)

--
View this message in context: http://n2.nabble.com/GN2-4-disable-xsl-caching-bug-tp3322121p3566714.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi,

I think you forgot to include exslt-namespace in a xsl file. I think
'tokenize' is a function of now used saxon.

Cheers
Hans

/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
WARNING: transformerfactory doesnt like saxon attributes!
ID système inconnu; Ligne #22; Colonne #71; Impossible de trouver la
fonction : tokenize
ID système inconnu; Ligne #22; Colonne #71; jeton de fonction introuvable.

Yves G wrote:

Hi,

we are in the process of customizing a geonetwork site (2.4RC2 with java
1.6.0_13), so I've tried to deactivate the xsl caching so we dont have to
stop/start the server to each xsl modification.
To do so, I've only edited the javax.xml.transform.TransformerFactory file
in the META-INF/services directory and changed the value to
org.apache.xalan.processor.TransformerFactoryImpl.
But then I have a NullPointerException with the following log, have I
missed something?
Regards
Yves

INFO jeeves.service - -> transforming with stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
WARNING: transformerfactory doesnt like saxon attributes!
ID système inconnu; Ligne #22; Colonne #71; Impossible de trouver la
fonction : tokenize
ID système inconnu; Ligne #22; Colonne #71; jeton de fonction introuvable.
(Emplacement inconnu de l'erreur)java.lang.NullPointerException
396763 [8897128@anonymised.com] ERROR jeeves.service - -> exception during
transformation for : main.home
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) stylesheet :
/home/yves/Logiciels/geonetwork2.4/web/geonetwork/xsl/main-page.xsl
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) message :
null
396764 [8897128@anonymised.com] ERROR jeeves.service - -> (C) exception :
NullPointerException
396764 [8897128@anonymised.com] DEBUG jeeves.service - Raised exception while
executing service
<error id="error">

  <message />

  <class>NullPointerException</class>

  <stack>

    <at class="jeeves.utils.Xml" file="Xml.java" line="243"
method="transform" />

    <at class="jeeves.utils.Xml" file="Xml.java" line="204"
method="transform" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="678" method="dispatchOutput" />

    <at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="383" method="dispatch" />

    <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="621" method="dispatch" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="174" method="execute" />

    <at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="89" method="doGet" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="707" method="service" />

    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java"
line="820" method="service" />

    <at class="org.mortbay.jetty.servlet.ServletHolder"
file="ServletHolder.java" line="502" method="handle" />

  </stack>

  <request>

    <language>en</language>

    <service>main.home</service>

  </request>

  <response />

</error>

--
View this message in context: http://n2.nabble.com/GN2-4-disable-xsl-caching-bug-tp3322121p3596873.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.