Config Loading Improvement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Config Loading Improvement

Alexander Saar-2
Hello,
I recently started integrating Solr as Cocoon Block into our
application. While doing this I noticed that there is a problem with
loading the Solr configuration in Config.getVal().

It throws an UnsupportedOperationException when Node.getTextContent() is
called when I run it in our Cocoon development environment, which is
based on Jetty Maven Plugin.

I think this is due older parser version which does not implement
getTextContent for the Node type.

So far I created a patch that should work for actual and older
implementations of the DOM API.

While searching the JIRA, I did not find any issues that refers to this
problem (while there is a comment in the code about it). So my question
is: is anybody else working on this problem or is this not really a
problem and I did something wrong?

If this seems to be a good improvement, I can supply a patch to the JIRA.

Regards,
Alex


--
Alexander Saar
Mindquarry - achieving more together (http://www.mindquarry.com)

E-Mail: [hidden email] | Mindquarry GmbH
Work:   +49 331 97992 223             | August-Bebel-Str. 88
Mobile: +49 177 59 85 437             | 14482 Potsdam, Germany

Weblog:         http://alexsaar.blogspot.com/
OpenBC Profile: http://www.openbc.com/hp/Alexander_Saar/
Reply | Threaded
Open this post in threaded view
|

Re: Config Loading Improvement

Yonik Seeley-2
On 12/7/06, Alexander Saar <[hidden email]> wrote:
> I recently started integrating Solr as Cocoon Block into our
> application. While doing this I noticed that there is a problem with
> loading the Solr configuration in Config.getVal().
>
> It throws an UnsupportedOperationException when Node.getTextContent() is
> called when I run it in our Cocoon development environment, which is
> based on Jetty Maven Plugin.

I've seen this problem with older Resin containers.
Solr's web.xml has commented out directives for Resin to use the Sun
implementation from Java5 instead.

> I think this is due older parser version which does not implement
> getTextContent for the Node type.
>
> So far I created a patch that should work for actual and older
> implementations of the DOM API.
>
> While searching the JIRA, I did not find any issues that refers to this
> problem (while there is a comment in the code about it). So my question
> is: is anybody else working on this problem or is this not really a
> problem and I did something wrong?
>
> If this seems to be a good improvement, I can supply a patch to the JIRA.

Sure, increasing the compatibility seems reasonable.

-Yonik