开发者

Apache Mina tutorial

I am tearing my hair out trying to figure out how to run the simplest Apache Mina tutorial.

I am runni开发者_运维知识库ng the tutorial on Netbeans 6.9 on Ubuntu and it keeps saying the following error even I have added the necessary jar files to the compile-time libraries folders in Netbeans.

Exception in thread "main" java.lang.ExceptionInInitializerError at minatimeserver.MinaTimeServer.main(MinaTimeServer.java:29) Caused by: java.lang.RuntimeException: Uncompilable source code - package org.slf4j does not exist at org.apache.mina.core.service.AbstractIoService.(AbstractIoService.java:51) ... 1 more

I have downloaded slf4j-log4j12-1.6.1.jar and slf4j-api-1.6.1.jar and placed them in the compile-time libraries folder too but the error still remains. I have also tried with slf4j-1.5.11

Any person who has solved this problem? Please help me or I'm going bald in no time!

Thanks in advance! Yakult121


slf4j-log4j12-1.6.1.jar and slf4j-api-1.6.1.jar are runtime libraries.
Add them to your class path not to your compile-time libraries else it will try to compile your jar files.

Also See
What's the difference of compile time libraries and run time libraries in java?


Apache mina uses slf4j-api-1.6.1.jar, adding slf4j-api-1.6.1.jar to class path will resolve the issue.


Well, I also had faced same problem. What I did was, I unjarred the mina-core-2.x that is on the main page of the apache project. When things failed, I changed downloaded mina-core-1.1.7 and everything worked fine. Of course, you have to make sure that you set the claspath correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜