Here's more of the error:<br><br>java.lang.ClassCastException: org.slf4j.impl.SimpleLoggerFactory<br> at jupiter.messaging.EventSubscriber.<init>(EventSubscriber.java:40)<br> at developerworks.jetty6.CrudMessage.<clinit>(CrudMessage.java:91)<br>
at developerworks.jetty6.UserCountServlet.<clinit>(UserCountServlet.java<br>:33)<br> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br><br> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct<br>
orAccessorImpl.java:39)<br> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC<br>onstructorAccessorImpl.java:27)<br><br>This is code that run at startup and breaks on (LoggerContext) LoggerFactory.getILoggerFactory();<br>
<br>I am using Maven to keep track of dependencies, I have the following included for logback:<br> <br> <dependency><br> <groupId>ch.qos.logback</groupId><br> <artifactId>logback-core</artifactId><br>
<version>0.9.15</version><br> </dependency><br> <br> <dependency><br> <groupId>ch.qos.logback</groupId><br> <artifactId>logback-classic</artifactId><br>
<version>0.9.15</version><br> </dependency><br> <br> <dependency><br> <groupId>ch.qos.logback</groupId><br> <artifactId>logback-access</artifactId><br>
<version>0.9.15</version><br> </dependency><br> <br> <dependency><br> <groupId>org.slf4j</groupId><br> <artifactId>slf4j-api</artifactId><br>
<version>1.5.6</version><br> </dependency><br><br><div class="gmail_quote">On Wed, May 13, 2009 at 6:43 AM, Ceki Gulcu <span dir="ltr"><ceki@qos.ch></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Brian,<br>
<br>
Could you please post the two or three lines of the stack trace? Which artifacts (jar files) have you placed on the class path?<div><div></div><div class="h5"><br>
<br>
Brian Moschel wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey guys,<br>
<br>
I am noticing an error on startup:<br>
<br>
java.lang.ClassCastException: org.slf4j.impl.SimpleLoggerFactory<br>
<br>
I am trying to run the following lines to load my config, which I got from the startup guide:<br>
<br>
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();<br>
JoranConfigurator configurator = new JoranConfigurator();<br>
lc.reset();<br>
configurator.setContext(lc);<br>
configurator.doConfigure(my_path);<br>
StatusPrinter.printInCaseOfErrorsOrWarnings(lc);<br>
<br>
The error occurs at the first line in the above code. I got this working at some point, but somehow am back in a non-working state. This is a Jetty app. Any tips?<br>
<br>
Thanks,<br>
Brian<br>
</blockquote></div></div><font color="#888888">
-- <br>
Ceki Gülcü<br>
Logback: The reliable, generic, fast and flexible logging framework for Java.<br>
<a href="http://logback.qos.ch" target="_blank">http://logback.qos.ch</a><br>
_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</font></blockquote></div><br>