RE: how to deploy customization in solr that requires dependency
Thanks to everyone, now I have a clearer understanding of where to put my jar dependencies. Gian Maria. -Original Message- From: Shawn Heisey [mailto:s...@elyograg.org] Sent: Monday, March 18, 2013 11:57 PM To: solr-user@lucene.apache.org Subject: Re: how to deploy customization in solr that requires dependency On 3/18/2013 11:47 AM, Gian Maria Ricci wrote: > I want to deploy a custom filter developed in java to Solr4, my > problem is that it requires to access Sql Server, so it depends from > sqljdbc4.jar, but I got a java.lang.ClassNotFoundException: > com.microsoft.sqlserver.jdbc.SQLServerDriver Solr has a property "solr.solr.home" (which defaults to solr in the current working directory) ... this is the directory where solr.xml lives. By default, Solr is supposed to look for a lib directory in this location, from which jar files can be loaded by all cores. I make this explicit in my config with a 'sharedLib="lib"' attribute on the solr tag in solr.xml, but it's my understanding that this config is not strictly required. I put all jar files required by Solr here. My solr.solr.home is set to /index/solr4: ncindex@bigindy5 ~ $ ls /index/solr4/lib icu4j-49.1.jar lucene-analyzers-icu-4.3-SNAPSHOT.jar mysql-connector-java-5.1.22-bin.jar solr-dataimporthandler-4.3-SNAPSHOT.jar solr-dataimporthandler-extras-4.3-SNAPSHOT.jar Thanks, Shawn
Re: how to deploy customization in solr that requires dependency
On 3/18/2013 11:47 AM, Gian Maria Ricci wrote: I want to deploy a custom filter developed in java to Solr4, my problem is that it requires to access Sql Server, so it depends from sqljdbc4.jar, but I got a java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver Solr has a property "solr.solr.home" (which defaults to solr in the current working directory) ... this is the directory where solr.xml lives. By default, Solr is supposed to look for a lib directory in this location, from which jar files can be loaded by all cores. I make this explicit in my config with a 'sharedLib="lib"' attribute on the solr tag in solr.xml, but it's my understanding that this config is not strictly required. I put all jar files required by Solr here. My solr.solr.home is set to /index/solr4: ncindex@bigindy5 ~ $ ls /index/solr4/lib icu4j-49.1.jar lucene-analyzers-icu-4.3-SNAPSHOT.jar mysql-connector-java-5.1.22-bin.jar solr-dataimporthandler-4.3-SNAPSHOT.jar solr-dataimporthandler-extras-4.3-SNAPSHOT.jar Thanks, Shawn
Re: how to deploy customization in solr that requires dependency
Hi, See here, might help: http://wiki.apache.org/solr/SolrPlugins#How_to_Load_Plugins We don't use multicore functionality of SOLR, so we decided to bundle SOLR dependencies into the war file of the solr web app. Regards, Dmitry On Mon, Mar 18, 2013 at 7:47 PM, Gian Maria Ricci wrote: > Hi to everyone, > > > > I want to deploy a custom filter developed in java to Solr4, my problem is > that it requires to access Sql Server, so it depends from sqljdbc4.jar, but > I got a java.lang.ClassNotFoundException: > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > I've copied the sqljdbc.jar file in the c:\tomcat\lib directory but it does > not work. So I've modified solrconfig.xml to load sqljdbc4.jar and now it > works, but I think that is a bettere solution to configure in some base > Tomcat directory instead in solrcfg.xml file of all cores. My question is, > where I can configure Tomcat to make sqljdbc4.jar available to every > customization filter in solar without referencing it directly in > solrcfg.xml? > > > > I'm a .NET developer, so I'm not really familiar with TomCat and Java, and > surely I'm missing some configuration to modify. > > > > Thanks to everyone. > > > > Gian Maria > > > >