Hi, thanx for pointing this out to me.
1152 [coreLoadExecutor-3-thread-1] INFO org.apache.solr.core.SolrConfig – Adding specified lib dirs to ClassLoader org.apache.solr.core.SolrResourceLoader – Adding 'file:/home/christian/zfmk/solr/solr-4.3.0/example/lib/mysql-connector-java-5.1.25-bin.jar' to classloader
The mysql-connector-java DOES get loaded, but is not available to org.apache.solr.core.SolrResourceLoader.findClass Has something changed for the syntax creating a dataimport handler? solrconfig.xml: --------------- <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> data-config.xml: ---------------- <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/koehler_zfmk" user="my_user" password="secret"/> <document name="content"> <entity name="rawidentificationid" query="SELECT * FROM foobar;" > </entity> </document> </dataConfig> I use this configuration successfully with 3.6 Regards Chris Am 23.05.2013 14:39, schrieb Jack Krupansky:
Check the Solr log on startup - it will explicitly state which lib directories/files will be used. Make sure they agree with where the DIH jars reside. Keep in mind that the directory structure of Solr changed - use the lib from 4.3 solrconfig. Try to use DIH in the standard Solr 4.3 example first. Then mimic that in your customization. -- Jack Krupansky -----Original Message----- From: Christian Köhler Sent: Thursday, May 23, 2013 8:25 AM To: solr-user@lucene.apache.org Subject: Solr 4.3 fails to load MySQL driver Hi, in my attempt to migrate for m 3.6.x to 4.3.0 I stumbled upon an issue loading the MySQL driver from the [instance]/lib dir: Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.dataimport.DataImportHandler at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:266) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448) ... 18 more To narrow it down, I use the plain example configuration with the following changes: - Add a dataimport requestHandler to example/conf/solrconfig.xml (copied from a working solr 3.6.x) - Created example/conf/data-config.xml with <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" ... and SQL statement (both copied from a working solr 3.6.x) - placed the current driver "mysql-connector-java-5.1.25-bin.jar" in example/lib As to my knowledge the lib dir is included automatically to the path. To make sure I tried to: - add <lib dir="./lib" /> to explicit to solrconf.xml - add absolute path to solrarconf.xml - changed solr.xml to use <solr persistent="true" sharedLib="lib> All to no avail. System Info: - OpenJDK Runtime Environmentm 1.7.0_19 - Solr 4.3.0 - mysql-connector-java-5.1.25-bin.jar The same configuration run fine with a solr 3.6.x on the very same machine. Any help is appreciated! Cheers Chris
-- Christian Köhler ganzgraph gmbh Bornheimer Straße 37 53111 Bonn koeh...@ganzgraph.de http://www.ganzgraph.de/ Tel.: +49-(0)228-227 99 400 Fax : +49-(0)228-227 99 409 Geschäftsführer: Christian Köhler, Thorsten Orth Unternehmenssitz: Bonn Handelsregister-Nummer: HRB 19066 beim Amtsgericht: Bonn UstId-Nr: DE 280482111