I am trying to integrate apache Sonr(apache-solr-4.0.0) with Tomcat and getting below error.
15:12:40 SEVERE DataImporter Delta Import Failed
java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: com.mysql.jdbc.Driver Processing Document # 1
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:273)
... 11 more
Caused by: org.apache.solr.common.SolrException: Error loading class ' com.mysql.jdbc.Driver'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:436)
at org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:889)
... 12 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
I tried below option’s of adding mysql-connector-java-5.1.22-bin.jar, but none worked
- added as part of war (solr.war/WEB-INF/lib )
- added as part of web server (Tomcat/lib)
- Created a new directory lib under example/solr and placed the mysql connector jar (mysql-connector-java-5.1.22-bin.jar) and refered the lib path from solr.xml.
Any help highly appreciable. Thanks
There is a trailing space in the name of the class:
Remove the trailing spaces.
HIH