Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty + Slf4j

I starting jetty with the start/stop script

/etc/init.d/jetty stop
/etc/init.d/jetty start

Looking for the CP, i found this

                $DAEMON -user "$JETTY_USER" -cp "$JSVC_CLASSPATH" \
                    -outfile $LOGDIR/out.log -errfile $LOGDIR/out.log \
                    -pidfile "$PIDFILE" $JAVA_OPTIONS $BOOTSTRAP_CLASS \
                    $JETTY_ARGS $CONFIGS

The content of the $JSVC_CLASSPATH is:
/usr/share/java/commons-daemon.jar:/usr/share/jetty/start.jar:/usr/share/jetty/start-daemon.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar

Which I think its correct.


On Tue, Dec 8, 2009 at 4:39 PM, Julio Viegas <julioviegas@xxxxxxxxxxxxxxx> wrote:
Hello Diego,

  How are you starting Jetty? I mean, can you check your Jetty's JVM
classpath setting?

  I suspect "jar:file:/usr/share/java/slf4j-simple-1.5.8.jar" is
inside your $CLASSPATH or something like that...

Rgrds,
JV -- julioviegas.com

On Tue, Dec 8, 2009 at 16:26, Diego Plentz <diego@xxxxxxxxxx> wrote:
> Hey guys,
> I'm using jetty 6.1.x installed through apt-get in a Ubuntu box. When I
> deploy my application, I have a problem with slf4j. If I deploy my war with
> slf4j-log4j12-1.5.8.jar, I have this message:
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/usr/share/java/slf4j-simple-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/var/cache/jetty/Jetty_0_0_0_0_8080_suporte_promotor.war___suporte.promotoronline.com.br_ivstzq/webapp/WEB-INF/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> But, if I remove the jar from the war file, I have a NoClassDefFoundError:
> Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
> at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
> at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
> ....
> What is the correct behavior?
> --
> http://plentz.org
> http://twitter.com/plentz
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
http://plentz.org
http://twitter.com/plentz

Back to the top