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, 罗磊 <[email protected]> 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
>

Reply via email to