Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    This is for a RuneScape Private Server.
    This is on a CentOS Virtual Private Server.

    [8/16/11 9:11 PM]: Exception in thread "main" [8/16/11 9:11 PM]: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    [8/16/11 9:11 PM]: at org.apache.mina.util.NamePreservingRunnable.<init> (NamePreservingRunnable.java:32)
    [8/16/11 9:11 PM]: at org.apache.mina.transport.socket.nio.SocketAccepto r.startupWorker(SocketAcceptor.java:165)
    [8/16/11 9:11 PM]: at org.apache.mina.transport.socket.nio.SocketAccepto r.bind(SocketAcceptor.java:141)
    [8/16/11 9:11 PM]: at server.Server.main(Server.java:144)
    [8/16/11 9:11 PM]: Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    [8/16/11 9:11 PM]: at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    [8/16/11 9:11 PM]: at java.security.AccessController.doPrivileged(Native Method)
    [8/16/11 9:11 PM]: at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    [8/16/11 9:11 PM]: at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    [8/16/11 9:11 PM]: at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    [8/16/11 9:11 PM]: at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
    [8/16/11 9:11 PM]: ... 4 more
    This is the folder layout:

    Last edited by Jonathansafc; August 17th, 2011 at 03:28 PM.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    A typical cause of this exception is that the required libraries are not on the class path. So are all the jars in the dependency folder on the classpath?

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    I have Private Messaged you, copeg, please answer

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    Communicating via private messages defeats the purpose of a public forum - your solution here might help others in the future, and this is lost via PM. I recommend reading about the classpath
    PATH and CLASSPATH (The Java™ Tutorials > Essential Classes > The Platform Environment)
    As well as how to set it for your particular application (which I presume has some sort of help, documentation, etc)

  5. #5
    Junior Member
    Join Date
    Aug 2011
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    I changed from CentOS to Ubuntu and I'm currently following a guide to install it correctly, but I'm going to sleep now. I'll be back tomorrow.

  6. #6
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    What IDE do you use?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  7. #7
    Junior Member
    Join Date
    Aug 2011
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    I don't use one, I just use Notepad++

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: [SLF4J] 'java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory'

    The OP private messaged me as well, but I agree entirely with everything copeg said. Follow his directions, and if you still have questions, ask them here (not in a private message).
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Exception in thread "main" java.lang.NoClassDefFoundError
    By Scarice in forum Java Theory & Questions
    Replies: 25
    Last Post: July 4th, 2011, 10:02 PM
  2. java.lang.NoClassDefFoundError
    By nrao in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 27th, 2011, 08:18 AM
  3. java.lang.NoClassDefFoundError
    By anonymous001 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: January 26th, 2011, 04:41 PM
  4. Replies: 3
    Last Post: May 15th, 2010, 02:05 PM
  5. Replies: 1
    Last Post: October 25th, 2009, 11:54 AM