You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by 罗磊 <lu...@gmail.com> on 2010/07/20 13:44:48 UTC

org.slf4j cannot be resolved

I tried java code in thrift/tutorial. But I got this error :

Exception in thread "main" java.lang.Error: Unresolved compilation
problems:
The import org.slf4j cannot be resolved
 The import org.slf4j cannot be resolved
Logger cannot be resolved to a type
 LoggerFactory cannot be resolved
Logger cannot be resolved to a type
Logger cannot be resolved to a type

at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:22)
at JavaServer.main(JavaServer.java:105)


I had slf4j-api-1.6.0.jar and slf4j-simple-1.6.0.jar in project.


Can anyone help me? Thanks a lot

Re: org.slf4j cannot be resolved

Posted by 罗磊 <lu...@gmail.com>.
I'm sure I have add these two jar files.

Without these two jar files, I can't compile tutorial code in Eclipse. While
these jars in project , I got runtime error!

On Tue, Jul 20, 2010 at 8:01 PM, Nikhil Jindal <ni...@google.com>wrote:

> When I was doing a similiar thing, I was getting exactly the same errors.
> I resolved them by including the 2 slf4j*.jar files you have mentioned.
> Please verify that these jar files are properly included in your project.
> You should not get these errors if they are.
>
> Cheers
> Nikhil Jindal
>
> On Tue, Jul 20, 2010 at 5:14 PM, 罗磊 <lu...@gmail.com> wrote:
>
> > I tried java code in thrift/tutorial. But I got this error :
> >
> > Exception in thread "main" java.lang.Error: Unresolved compilation
> > problems:
> > The import org.slf4j cannot be resolved
> >  The import org.slf4j cannot be resolved
> > Logger cannot be resolved to a type
> >  LoggerFactory cannot be resolved
> > Logger cannot be resolved to a type
> > Logger cannot be resolved to a type
> >
> > at
> org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:22)
> > at JavaServer.main(JavaServer.java:105)
> >
> >
> > I had slf4j-api-1.6.0.jar and slf4j-simple-1.6.0.jar in project.
> >
> >
> > Can anyone help me? Thanks a lot
> >
>

Re: org.slf4j cannot be resolved

Posted by Nikhil Jindal <ni...@google.com>.
When I was doing a similiar thing, I was getting exactly the same errors.
I resolved them by including the 2 slf4j*.jar files you have mentioned.
Please verify that these jar files are properly included in your project.
You should not get these errors if they are.

Cheers
Nikhil Jindal

On Tue, Jul 20, 2010 at 5:14 PM, 罗磊 <lu...@gmail.com> wrote:

> I tried java code in thrift/tutorial. But I got this error :
>
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problems:
> The import org.slf4j cannot be resolved
>  The import org.slf4j cannot be resolved
> Logger cannot be resolved to a type
>  LoggerFactory cannot be resolved
> Logger cannot be resolved to a type
> Logger cannot be resolved to a type
>
> at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:22)
> at JavaServer.main(JavaServer.java:105)
>
>
> I had slf4j-api-1.6.0.jar and slf4j-simple-1.6.0.jar in project.
>
>
> Can anyone help me? Thanks a lot
>