You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Adam Weingarten <we...@gmail.com> on 2007/03/23 08:52:14 UTC

How to get the MINA examples to work

Hi,


I am new to "Mina". I am having problems getting the project-examples to
work.


I am using the following packages:

-          mina-1.0.2

-          backport-util-concurrent-3.0

-          slf4j-1.3.0

-          spring-framework-2.0.3



The least of my problems is that "spring-framework" doesn't build. "slf4j"
seems to be a bigger problem; when I try to run various MINA examples (eg
"echoserver") I get the following error:

Exception in thread "main" java.lang.ExceptionInInitializerError

      at org.apache.mina.common.ExecutorThreadModel.<init>(*
ExecutorThreadModel.java:81*)

      at org.apache.mina.common.ExecutorThreadModel.getInstance(*
ExecutorThreadModel.java:71*)

      at org.apache.mina.common.support.BaseIoServiceConfig.<init>(*
BaseIoServiceConfig.java:46*)

      at org.apache.mina.common.support.BaseIoAcceptorConfig.<init>(*
BaseIoAcceptorConfig.java:36*)

      at org.apache.mina.transport.socket.nio.SocketAcceptorConfig.<init>(*
SocketAcceptorConfig.java:48*)

      at org.apache.mina.transport.socket.nio.SocketAcceptor.<init>(*
SocketAcceptor.java:63*)

      at org.apache.mina.transport.socket.nio.SocketAcceptor.<init>(*
SocketAcceptor.java:84*)

      at org.apache.mina.example.echoserver.Main.main(*Main.java:49*)

Caused by: *java.lang.IllegalStateException*: Logging factory implementation
cannot be null. See also http://www.slf4j.org/codes.html#null_LF

      at org.slf4j.LoggerFactory.getLogger(*LoggerFactory.java:75*)

      at org.apache.mina.filter.executor.ExecutorFilter.<clinit>(*
ExecutorFilter.java:54*)

      ... 8 more



Does anyone know off-hand what I am doing wrong?



Regards, Adam Weingarten

Re: How to get the MINA examples to work

Posted by Trustin Lee <tr...@gmail.com>.
Hi Adam,

On 3/23/07, Adam Weingarten <we...@gmail.com> wrote:
> Hi,
>
>
> I am new to "Mina". I am having problems getting the project-examples to
> work.
>
>
> I am using the following packages:
>
> -          mina-1.0.2
>
> -          backport-util-concurrent-3.0
>
> -          slf4j-1.3.0
>
> -          spring-framework-2.0.3
>
>
>
> The least of my problems is that "spring-framework" doesn't build. "slf4j"
> seems to be a bigger problem; when I try to run various MINA examples (eg
> "echoserver") I get the following error:
>
> Exception in thread "main" java.lang.ExceptionInInitializerError
>
>       at org.apache.mina.common.ExecutorThreadModel.<init>(*
> ExecutorThreadModel.java:81*)
>
>       at org.apache.mina.common.ExecutorThreadModel.getInstance(*
> ExecutorThreadModel.java:71*)
>
>       at org.apache.mina.common.support.BaseIoServiceConfig.<init>(*
> BaseIoServiceConfig.java:46*)
>
>       at org.apache.mina.common.support.BaseIoAcceptorConfig.<init>(*
> BaseIoAcceptorConfig.java:36*)
>
>       at org.apache.mina.transport.socket.nio.SocketAcceptorConfig.<init>(*
> SocketAcceptorConfig.java:48*)
>
>       at org.apache.mina.transport.socket.nio.SocketAcceptor.<init>(*
> SocketAcceptor.java:63*)
>
>       at org.apache.mina.transport.socket.nio.SocketAcceptor.<init>(*
> SocketAcceptor.java:84*)
>
>       at org.apache.mina.example.echoserver.Main.main(*Main.java:49*)
>
> Caused by: *java.lang.IllegalStateException*: Logging factory implementation
> cannot be null. See also http://www.slf4j.org/codes.html#null_LF
>
>       at org.slf4j.LoggerFactory.getLogger(*LoggerFactory.java:75*)
>
>       at org.apache.mina.filter.executor.ExecutorFilter.<clinit>(*
> ExecutorFilter.java:54*)
>
>       ... 8 more
>
>
>
> Does anyone know off-hand what I am doing wrong?

SLF4J requires one more JAR file.  Please try to download the latest
version of slf4j-simple or slf4j-log4j (+ log4j.jar) and add it to the
build path.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6