You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Luke Forehand (JIRA)" <ji...@apache.org> on 2009/09/05 03:08:58 UTC
[jira] Updated: (SOLR-1408) Classes in ${solr.home}/lib are not
able to extend classes loaded by solr war - ClassCastException
[ https://issues.apache.org/jira/browse/SOLR-1408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Forehand updated SOLR-1408:
--------------------------------
Description:
When extending org.apache.solr.handler.dataimport.DataSource, I would like to package my extended class in ${solr.home}/lib to that I can keep the vanilla copy of my solr.war intact. The problem is I encounter a ClassCastException when Solr tries to create a newInstance of my extended class.
Although the parent classloader of ${solr.home}/lib classloader loads DataSource, I am still getting a ClassCastException when a class in ${solr.home}/lib extends DataSource.
The solr instance is being deployed to a jetty plus server that is running inside a unit test.
was:When extending org.apache.solr.handler.dataimport.DataSource, I would like to package my extended class in ${solr.home}/lib to that I can keep the vanilla copy of my solr.war intact. The problem is I encounter a ClassCastException when Solr tries to create a newInstance of my extended class, which I suspect has to do with the DataSource and my extended class being loaded from different classloaders.
Issue Type: Bug (was: Improvement)
Summary: Classes in ${solr.home}/lib are not able to extend classes loaded by solr war - ClassCastException (was: Allow classes from ${solr.home}/lib to be loaded by the same classloader as solr war to prevent ClassCastException)
> Classes in ${solr.home}/lib are not able to extend classes loaded by solr war - ClassCastException
> --------------------------------------------------------------------------------------------------
>
> Key: SOLR-1408
> URL: https://issues.apache.org/jira/browse/SOLR-1408
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 1.3
> Reporter: Luke Forehand
>
> When extending org.apache.solr.handler.dataimport.DataSource, I would like to package my extended class in ${solr.home}/lib to that I can keep the vanilla copy of my solr.war intact. The problem is I encounter a ClassCastException when Solr tries to create a newInstance of my extended class.
> Although the parent classloader of ${solr.home}/lib classloader loads DataSource, I am still getting a ClassCastException when a class in ${solr.home}/lib extends DataSource.
> The solr instance is being deployed to a jetty plus server that is running inside a unit test.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.