On 9/6/2015 12:00 PM, Shawn Heisey wrote:
It looks like you have jars in the solrhome/lib directory, which is
good. You probably don't need the dataimporthandler jar for -extras if
you just want to load from a database.
It does appear that you also have <lib> directives in your
solrconfig.xml, which are loading after the dataimport jars load.
Loading jars from multiple locations complicates the classloader, and
has been known to cause a huge number of problems. I don't know if it
is why you are having a class cast exception, but it would be my first
guess. Since you are using the solrhome/lib directory, you should put
ALL jars that you need there, remove all jars from any instanceDir/lib
directory, and also remove all <lib> configuration elements from your
solrconfig.xml.
It looks like the jars that are loading are for Solr 5.3.0. Do you have
any jars from another Solr or Lucene version in a directory that might
somehow be on the classpath -- loaded into the system java directories
via operating system packages or something?
There *might* be a problem with jars loading twice. That appears to be
causing other problems, described in this issue:
https://issues.apache.org/jira/browse/SOLR-6188
If loading the dataimport jar twice IS causing this problem, then you
could probably fix it by removing the jars from the solrhome/lib
directory and loading them with <lib> elements in solrconfig.xml instead
-- this is the opposite of the advice I gave you earlier in this message.
I do not like to load jars that way, because each core ends up loading
the jars into its own classloader, so for me they would get loaded
multiple times ... but it might be a viable workaround, especially if
you are not going to have a large number of cores.
Thanks,
Shawn
This issue still persists. :-((
I have moved all the jars to <instanceDir>/lib. I have commented out
all <lib> references in solrconfig.xml. I have moved all jars to
<solrhome>/lib and removed them from <instanceDir>/lib. But nothing has
changed with any of these steps.
I only heard of Solr/Lucene about a week ago, and so I downloaded the
package since then. If I have multiple versions of things, then it
would have had to come packaged that way because I only
downloaded/installed it once.
In my solrconfig.xml, I reference a file for my particular database
details in a <requestHandler> tag. In it, I deliberately misspelled the
class name because I wanted to see if I got a different error. I did,
so I know that my issue isn't because it can't find the class. (I since
changed it back.) The contents of my db-data-config.xml file are
attached (below). Do you see anything obviously incorrect about my
config? Could this be where the source of the DataImportHandler error
originates?
Thanks!
Mark
<dataConfig>
<dataSource driver="org.postgresql.Driver"
url="jdbc:postgresql://dx1f/OHRFC" user="awips" />
<document>
<entity name="eventlogtext" query="SELECT * FROM eventlogtext"
deltaQuery="SELECT posttime FROM eventlogtext WHERE
lastmodtime > '${dataimporter.last_index_time}'">
<entity name="categorytypes" query="SELECT catname FROM
categorytypes WHERE catid='${eventlogtext.category}'">
</entity>
</entity>
</document>
</dataConfig>