Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to get ODEJava to work (org.apache.log4j.Logger not found)  (Read 2910 times)
0 Members and 1 Guest are viewing this topic.
Offline gtzpower

Junior Newbie





« Posted 2008-03-30 19:55:46 »

Hey everyone, I downloaded odejava, followed the installation instructions found here (http://fivedots.coe.psu.ac.th/~ad/jg2/ch05/worldsCollide.pdf) since the odejava sites instruction links don't work, and I can not get anything to work.  When I call Odejava.getInstance(); I keep getting:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
   at org.odejava.Odejava.<clinit>(Odejava.java:77)
   at Game.createSceneGraph(Game.java:182)
   at Game.<init>(Game.java:245)
   at Game.main(Game.java:292)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   ... 4 more

I am at my wits end.  I can import org.apache.log4j.Logger; just fine, and I can even instantiate one using Logger.GetLogger() (im guessing a singleton pattern).  So, I have no idea why the odejava is throwing the ClassNotFoundException.  Any thoughts?
Offline gtzpower

Junior Newbie





« Reply #1 - Posted 2008-03-30 20:02:50 »

Wow, 6 hours of trying, then I post here and get it working almost instantly.  I have multiple JRE's installed, and it was missing in one of the JRE's lib\ext folders (apparently the one being used).
Offline irrisor

Junior Devvie





« Reply #2 - Posted 2008-03-30 21:08:03 »

it's log4j.jar that's missing - usually this should not be in the JRE... but it's good that you got it to work properly Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #3 - Posted 2008-03-31 11:52:17 »

I never understood this dependency..it should be optional. Asking the user to download 100 of irrelevant (to his gaming) libraries is
asking too much.
Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #4 - Posted 2008-04-02 19:02:04 »

Wow, 6 hours of trying, then I post here and get it working almost instantly.  I have multiple JRE's installed, and it was missing in one of the JRE's lib\ext folders (apparently the one being used).

it's log4j.jar that's missing - usually this should not be in the JRE... but it's good that you got it to work properly Smiley

Well, it is not a good idea to put anything into the jre/ext folder. And this is a very good example, why Smiley. Another good reason, not to do this is, that you might need version A of library XYZ for project P1 while you need version B of the same lib for project P2. You simply cannot do this when the lib resides in the jre/ext folder. Simply put the lib (log4j in your case) in the project's (ODEJava's) classpath and everything will be fine.

Marvin
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!