Thanks Chris, that worked. Loaded my Spring Application context with plugin
class loader. Was trying to resolve this since a day, and you resolved it
in a minute :)

Thanks
-Hussain

On Mon, Jan 12, 2015 at 11:29 AM, Chris Hostetter <hossman_luc...@fucit.org>
wrote:

>
> :    I am stuck at a strange issue, I have my custom Query Component that
> has
> : to load spring application context for some additional runtime filtering
> of
> : records.
> :    I have included my jars as dependency in solrConfig.xml, SOLR is able
> to
> : load my plugin but spring appplication fails to load with error.
>
> when you instantiate your Spring context, you have to make it aware of the
> ClassLoader you get from the SolrResourceLoader so that Spring knows where
> to find the resources in your jar.
>
> first google result i found about specifying a classloader when
> instantiating spring...
>
>
> https://stackoverflow.com/questions/5660115/loading-spring-context-with-specific-classloader
>
>
> : This is how my solrConfig looks
> :   <lib path="${solr.solr.home}/mylib/myapp.jar" />
> :
> : Following is the stack trace, any pointer of what is causing the issue
> :
> : org.springframework.beans.factory.BeanDefinitionStoreException:
> IOException
> : parsing XML document from class path resource
> : [com/myapp/spring/myapp-spring-master.xml]; nested exception is
> : java.io.FileNotFoundException: class path resource
> : [com/myapp/spring/myapp-spring-master.xml] cannot be opened because it
> does
> : not exist
> :         at
> :
> com.myapp.spring.MyAppApplicationContextAware.loadApplicationContext(MyAppApplicationContextAware.java:69)
> :         at
> :
> com.myapp.spring.MyAppApplicationContextAware.getApplicationContext(MyAppApplicationContextAware.java:48)
> :         at
> :
> org.apache.solr.handler.component.CustomSecureQueryComponent.authenticateUser(CustomSecureQueryComponent.java:294)
> :         at
> :
> org.apache.solr.handler.component.CustomSecureQueryComponent.doPrefetch(CustomSecureQueryComponent.java:67)
> :
> :
> : Thanks
> : -Hussain
> :
>
> -Hoss
> http://www.lucidworks.com/
>

Reply via email to