Hi Walter, I just tried this out. Yes, it does not work that way. Right now, the driver and datasources are not loaded using the multicore lib aware SolrResourceLoader. Loading entity processors and transformers from the multi core lib should be fine.
Can you please open a JIRA issue for this? However, we may only be able to fix this after 1.3 because a code freeze has been decided upon, to release 1.3 asap. On Mon, Aug 25, 2008 at 8:41 PM, Walter Ferrara <[EMAIL PROTECTED]>wrote: > Launching a multicore solr with dataimporthandler using a mysql driver, > (driver="com.mysql.jdbc.Driver") works fine if the mysql connector jar > (mysql-connector-java-5.0.7-bin.jar) is in the classpath, either jdk > classpath or inside the solr.war lib dir. > While putting the mysql-connector-java-5.0.7-bin.jar in core0/lib > directory, or in the multicore shared lib dir (specified in sharedLib > attribute in solr.xml) result in exception, even if the jar is correctly > loaded by the classloader: > > 25-ago-2008 16.36.05 org.apache.solr.core.SolrResourceLoader > createClassLoader > INFO: Adding > > 'file:/E:/Temp/apache-solr-2008-08-25_08-06-39/example/solr/lib/mysql-connector-java-5.0.7-bin.jar' > to Solr classloader > [..] > GRAVE: Exception while loading DataImporter > org.apache.solr.handler.dataimport.DataImportHandlerException: Failed to > initialize DataSource: null Processing Document # > at > > org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:306) > at > > org.apache.solr.handler.dataimport.DataImporter.addDataSource(DataImporter.java:273) > at > > org.apache.solr.handler.dataimport.DataImporter.initEntity(DataImporter.java:228) > at > > org.apache.solr.handler.dataimport.DataImporter.<init>(DataImporter.java:98) > at > > org.apache.solr.handler.dataimport.DataImportHandler.inform(DataImportHandler.java:106) > at > org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:311) > at org.apache.solr.core.SolrCore.<init>(SolrCore.java:475) > at org.apache.solr.core.CoreContainer.create(CoreContainer.java:323) > at org.apache.solr.core.CoreContainer.load(CoreContainer.java:216) > at > > org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:104) > at > org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69) > at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > > org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) > at > > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) > at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) > at > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > at > > org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) > at org.mortbay.jetty.Server.doStart(Server.java:210) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) > at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.mortbay.start.Main.invokeMain(Main.java:183) > at org.mortbay.start.Main.start(Main.java:497) > at org.mortbay.start.Main.main(Main.java:115) > Caused by: > org.apache.solr.handler.dataimport.DataImportHandlerException: driver > could not be loaded Processing Document # > at > > org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:110) > at > > org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:63) > at > > org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:303) > ... 34 more > > Shouldn't it works when the jar is (only) in the core lib dir? > tested on windows machine, with java 1.6 and today hudson nightly build > of solr. > > Walter > > > -- Regards, Shalin Shekhar Mangar.