You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by "Fabian Christ (JIRA)" <ji...@apache.org> on 2012/12/12 20:54:21 UTC

[jira] [Updated] (STANBOL-775) SolrServerPublishingComponent needs to intercept the ContextClassLoader when instantiating the SolrDispatchFilter

     [ https://issues.apache.org/jira/browse/STANBOL-775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Christ updated STANBOL-775:
----------------------------------

    Component/s: Commons
    
> SolrServerPublishingComponent needs to intercept the ContextClassLoader when instantiating the SolrDispatchFilter
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: STANBOL-775
>                 URL: https://issues.apache.org/jira/browse/STANBOL-775
>             Project: Stanbol
>          Issue Type: Sub-task
>          Components: Commons
>            Reporter: Rupert Westenthaler
>            Priority: Minor
>
> The "org.apache.solr.servlet.SolrDispatchFilter" initialises within the constructor the Solr Adminhandler via the context Classloader. Because of that any Apache Solr version used by the host system is leaking into Apache Stanbol running within the embedded OSGI environment.
> This causes Exceptions like 
> org.apache.solr.common.SolrException: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
> 	at org.apache.solr.servlet.SolrDispatchFilter.<init>(SolrDispatchFilter.java:79) ~[solr-core-3.6.1.jar:3.6.1 1362471 - thetaphi - 2012-07-17 12:46:54]
> 	at org.apache.stanbol.commons.solr.web.dispatch.DelegatingSolrDispatchFilter.<init>(DelegatingSolrDispatchFilter.java:80) ~[na:na]
> 	at org.apache.stanbol.commons.solr.web.impl.SolrServerPublishingComponent$SolrFilter.<init>(SolrServerPublishingComponent.java:346) ~[na:na]
> 	at org.apache.stanbol.commons.solr.web.impl.SolrServerPublishingComponent.updateFilter(SolrServerPublishingComponent.java:303) ~[na:na]
> 	at org.apache.stanbol.commons.solr.web.impl.SolrServerPublishingComponent$1.addOrUpdate(SolrServerPublishingComponent.java:192) ~[na:na]
> 	at org.apache.stanbol.commons.solr.web.impl.SolrServerPublishingComponent$1.addingService(SolrServerPublishingComponent.java:219) ~[na:na]
> 	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896) ~[stanbol-embedded-0.11.0-LMF-SNAPSHOT.jar:0.11.0-LMF-SNAPSHOT]
> To solve this the best options is that the SolrServerPublishingComponent replaces the context Classloader with the Bundle Classloader when instantiating the SolrFilter (line 304)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira