[ https://issues.apache.org/jira/browse/SOLR-1408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luke Forehand closed SOLR-1408. ------------------------------- Resolution: Invalid This is not a bug. The problem was that my extending classes were being compiled onto the testing classpath and they were also packaged into the jar within ${solr.home}/lib. They were being loaded by junit before being loaded by solr and that was causing the ClassCastException. When I removed the extending classes from the test classpath, everything worked. > 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.