Archive

Archive for October, 2005

Going down the wrong PATH

October 19th, 2005 osterday 1 comment

For the most part, I love my development environment. I really like the J2EE platform and using MyEclipse/Eclipse/Subclipse/JBoss/Subversion is a great combination and works really well most of the time.

Today I had one of those user errors that is a pain to track down. I redeployed a custom J2EE app to our production JBoss server that I just updated and suddenly JDom breaks. Worked fine on my local box. Scratch head…

So I start by “cleaning” my local projects… Now my JSPs are coming up saying “bad class file” when referring to my classes included from my other project. Scratch head…

Tried a bunch of different things… Bang head against wall…

Finally after hours of searching the web and recreating the projects, etc… I come across a post that mentions that the JSPs use javac from the path…

Crap! I had put the old 1.4 jdk/bin directory in my path to make it easy to run javac before I was using Eclipse. So now that I’m using 1.5 (aka Java 5) the JSPs were still being compiled with the 1.4 javac causing my problem.

Once I removed the 1.4 reference in my XP environment vars the JSPs compiled fine.

Of course I’m still getting the originally JDom error on production, so I still have to track down what’s causing that! Doh!

References: Bad class file, Error running javac

My JDom error is this:

org.jdom.Element.addContent(Lorg/jdom/Content;)Lorg/jdom/Element;; nested exception is: java.lang.NoSuchMethodError: org.jdom.Element.addContent(Lorg/jdom/Content;)Lorg/jdom/Element;

I’m including JDom 1.0 jar in the EAR file and I don’t see any other jdom.jar files in the classpath. Ideas? Oh, production is using JBoss 4.0.1RC2 and my laptop is using 4.0.3. I found this post, but I’m pretty sure I’m using JDom 1.0 for compiling and running!

UPDATE: After upgrading our production box to JBoss 4.0.3 and JDK 1.5.0 (update 5) the JDom errors went away.

Categories: code Tags: