You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Development Team <de...@gmail.com> on 2009/06/17 17:01:59 UTC

Missing SLF4J lib?

Hi everybody,
     With Solr 1.4, when I try to *run* an app that uses SolrJ, it fails
with this exception:

Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
org/slf4j/LoggerFactory
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)

     I searched around a bit, and have found people telling me I need to
include the SLF4J jars in my classpath. The most helpful of these comments
read:

> I think you need slf4j-api-1.5.5.jar and slf4j-jdk14-1.5.5.jar. Both
> can be found in solr's nightly downloads in the lib directory.

     Unfortunately that's not true, the "slf4j-jdk" JAR is not present in
the nightly's lib directory. In order to get my program to run I had to
download it from here and put it in my runtime classpath in order to get my
program to work:  http://www.slf4j.org/download.html
     Should I log a bug to have this library included in the nightly builds?

     Also, on a related note, we may want to warn users of SolrJ in the
documentation that they'll need these jars during runtime. Otherwise their
programs will fail and they'll wonder what's going on.

- Daryl.

Re: Missing SLF4J lib?

Posted by Development Team <de...@gmail.com>.
Well, I'm not using Maven... I have added the API lib as a dependency to my
Eclipse project, only because I'm using an SLF4J logger now in my code. I've
also added the API and the SLF4J-Log4J bridge (that I had to get from the
SLF4J site) to my deployment so that I could deploy my app to JBoss and have
my app use the JBoss Log4J logging.
I also edited the Solr-wiki so that it included information about how to use
JBoss logging with Solr (http://wiki.apache.org/solr/SolrJBoss), as well as
a section that describes how to set solr-home via the properties-service.xml
file.

- Daryl.

On Thu, Jun 18, 2009 at 3:37 AM, Aleksander M. Stensby <
aleksander.stensby@integrasco.no> wrote:

> If you are using maven you can simply add the following dependency to your
> pom.xml:
>                <dependency>
>                        <groupId>org.slf4j</groupId>
>                        <artifactId>slf4j-simple</artifactId>
>                        <version>1.5.6</version>
>                </dependency>
>
> In addition to any solr / lucene packages you may need for your task.
>
> Cheers,
>  Aleks
>
>
>
> On Wed, 17 Jun 2009 17:32:14 +0200, Development Team <de...@gmail.com>
> wrote:
>
>  Ahhh... yeah it is there, thanks.
>> Seems to me that it should be in dist's solrj-lib (since it's required at
>> runtime), but then again I'm not really in a position to comment on that
>> either.
>>
>> Question: Are all the jars in solrj-lib required to run SolrJ?
>>
>> - Daryl.
>>
>>
>> On Wed, Jun 17, 2009 at 11:13 AM, Mark Miller <ma...@gmail.com>
>> wrote:
>>
>>  True, its not in apache-solr-nightly/dist/solrj-lib, but it is in
>>> apache-solr-nightly/lib, so no reason to have to download it.
>>>
>>> I couldn't comment on whether or not it also belongs in solrj-lib.
>>>
>>> --
>>> - Mark
>>>
>>> http://www.lucidimagination.com
>>>
>>>
>>>
>>>
>>> Development Team wrote:
>>>
>>>  Hi everybody,
>>>>    With Solr 1.4, when I try to *run* an app that uses SolrJ, it fails
>>>> with this exception:
>>>>
>>>> Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
>>>> org/slf4j/LoggerFactory
>>>> at
>>>>
>>>>
>>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)
>>>>
>>>>    I searched around a bit, and have found people telling me I need to
>>>> include the SLF4J jars in my classpath. The most helpful of these
>>>> comments
>>>> read:
>>>>
>>>>
>>>>
>>>>  I think you need slf4j-api-1.5.5.jar and slf4j-jdk14-1.5.5.jar. Both
>>>>> can be found in solr's nightly downloads in the lib directory.
>>>>>
>>>>>
>>>>>
>>>>    Unfortunately that's not true, the "slf4j-jdk" JAR is not present in
>>>> the nightly's lib directory. In order to get my program to run I had to
>>>> download it from here and put it in my runtime classpath in order to get
>>>> my
>>>> program to work:  http://www.slf4j.org/download.html
>>>>    Should I log a bug to have this library included in the nightly
>>>> builds?
>>>>
>>>>    Also, on a related note, we may want to warn users of SolrJ in the
>>>> documentation that they'll need these jars during runtime. Otherwise
>>>> their
>>>> programs will fail and they'll wonder what's going on.
>>>>
>>>> - Daryl.
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>
>
> --
> Aleksander M. Stensby
> Lead software developer and system architect
> Integrasco A/S
> www.integrasco.no
> http://twitter.com/Integrasco
>
> Please consider the environment before printing all or any of this e-mail
>

Re: Missing SLF4J lib?

Posted by "Aleksander M. Stensby" <al...@integrasco.no>.
If you are using maven you can simply add the following dependency to your  
pom.xml:
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.5.6</version>
		</dependency>	

In addition to any solr / lucene packages you may need for your task.

Cheers,
  Aleks


On Wed, 17 Jun 2009 17:32:14 +0200, Development Team  
<de...@gmail.com> wrote:

> Ahhh... yeah it is there, thanks.
> Seems to me that it should be in dist's solrj-lib (since it's required at
> runtime), but then again I'm not really in a position to comment on that
> either.
>
> Question: Are all the jars in solrj-lib required to run SolrJ?
>
> - Daryl.
>
>
> On Wed, Jun 17, 2009 at 11:13 AM, Mark Miller <ma...@gmail.com>  
> wrote:
>
>> True, its not in apache-solr-nightly/dist/solrj-lib, but it is in
>> apache-solr-nightly/lib, so no reason to have to download it.
>>
>> I couldn't comment on whether or not it also belongs in solrj-lib.
>>
>> --
>> - Mark
>>
>> http://www.lucidimagination.com
>>
>>
>>
>>
>> Development Team wrote:
>>
>>> Hi everybody,
>>>     With Solr 1.4, when I try to *run* an app that uses SolrJ, it fails
>>> with this exception:
>>>
>>> Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
>>> org/slf4j/LoggerFactory
>>> at
>>>
>>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)
>>>
>>>     I searched around a bit, and have found people telling me I need to
>>> include the SLF4J jars in my classpath. The most helpful of these  
>>> comments
>>> read:
>>>
>>>
>>>
>>>> I think you need slf4j-api-1.5.5.jar and slf4j-jdk14-1.5.5.jar. Both
>>>> can be found in solr's nightly downloads in the lib directory.
>>>>
>>>>
>>>
>>>     Unfortunately that's not true, the "slf4j-jdk" JAR is not present  
>>> in
>>> the nightly's lib directory. In order to get my program to run I had to
>>> download it from here and put it in my runtime classpath in order to  
>>> get
>>> my
>>> program to work:  http://www.slf4j.org/download.html
>>>     Should I log a bug to have this library included in the nightly
>>> builds?
>>>
>>>     Also, on a related note, we may want to warn users of SolrJ in the
>>> documentation that they'll need these jars during runtime. Otherwise  
>>> their
>>> programs will fail and they'll wonder what's going on.
>>>
>>> - Daryl.
>>>
>>>
>>>
>>
>>
>>
>>



-- 
Aleksander M. Stensby
Lead software developer and system architect
Integrasco A/S
www.integrasco.no
http://twitter.com/Integrasco

Please consider the environment before printing all or any of this e-mail

Re: Missing SLF4J lib?

Posted by Development Team <de...@gmail.com>.
Ahhh... yeah it is there, thanks.
Seems to me that it should be in dist's solrj-lib (since it's required at
runtime), but then again I'm not really in a position to comment on that
either.

Question: Are all the jars in solrj-lib required to run SolrJ?

- Daryl.


On Wed, Jun 17, 2009 at 11:13 AM, Mark Miller <ma...@gmail.com> wrote:

> True, its not in apache-solr-nightly/dist/solrj-lib, but it is in
> apache-solr-nightly/lib, so no reason to have to download it.
>
> I couldn't comment on whether or not it also belongs in solrj-lib.
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
>
> Development Team wrote:
>
>> Hi everybody,
>>     With Solr 1.4, when I try to *run* an app that uses SolrJ, it fails
>> with this exception:
>>
>> Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
>> org/slf4j/LoggerFactory
>> at
>>
>> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)
>>
>>     I searched around a bit, and have found people telling me I need to
>> include the SLF4J jars in my classpath. The most helpful of these comments
>> read:
>>
>>
>>
>>> I think you need slf4j-api-1.5.5.jar and slf4j-jdk14-1.5.5.jar. Both
>>> can be found in solr's nightly downloads in the lib directory.
>>>
>>>
>>
>>     Unfortunately that's not true, the "slf4j-jdk" JAR is not present in
>> the nightly's lib directory. In order to get my program to run I had to
>> download it from here and put it in my runtime classpath in order to get
>> my
>> program to work:  http://www.slf4j.org/download.html
>>     Should I log a bug to have this library included in the nightly
>> builds?
>>
>>     Also, on a related note, we may want to warn users of SolrJ in the
>> documentation that they'll need these jars during runtime. Otherwise their
>> programs will fail and they'll wonder what's going on.
>>
>> - Daryl.
>>
>>
>>
>
>
>
>

Re: Missing SLF4J lib?

Posted by Mark Miller <ma...@gmail.com>.
True, its not in apache-solr-nightly/dist/solrj-lib, but it is in 
apache-solr-nightly/lib, so no reason to have to download it.

I couldn't comment on whether or not it also belongs in solrj-lib.

-- 
- Mark

http://www.lucidimagination.com



Development Team wrote:
> Hi everybody,
>      With Solr 1.4, when I try to *run* an app that uses SolrJ, it fails
> with this exception:
>
> Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
> org/slf4j/LoggerFactory
> at
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:77)
>
>      I searched around a bit, and have found people telling me I need to
> include the SLF4J jars in my classpath. The most helpful of these comments
> read:
>
>   
>> I think you need slf4j-api-1.5.5.jar and slf4j-jdk14-1.5.5.jar. Both
>> can be found in solr's nightly downloads in the lib directory.
>>     
>
>      Unfortunately that's not true, the "slf4j-jdk" JAR is not present in
> the nightly's lib directory. In order to get my program to run I had to
> download it from here and put it in my runtime classpath in order to get my
> program to work:  http://www.slf4j.org/download.html
>      Should I log a bug to have this library included in the nightly builds?
>
>      Also, on a related note, we may want to warn users of SolrJ in the
> documentation that they'll need these jars during runtime. Otherwise their
> programs will fail and they'll wonder what's going on.
>
> - Daryl.
>
>