Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange deployment behavior

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is it possible that when I run an EAR file on one JBOSS installation, it works fine, but on anther JBOSS installation, I get ClassNotFound erorrs?

Both versions of JBOSS are the same (4.03 SP1) and both installations have the same Java code, however one box has Java 1.5, the other has Java 1.4.

The EAR that won't run on the Java 1.4 box runs fine on the Java 1.5 box and the EAR created on the Java 1.5 box runs fine there too.

I've spent countless hours now trying to figure this out.

I'm using Maven to build the EAR file. The project complaining about the ClassNotFoundException is in the tmp\deploy area of the deployment.

HELP!!!

Thanks.

-- Mike
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you are using a 5.0 class that isn't available in 1.4 Or maybe you compiled in 5.0 but tried to run it on a 1.4 JVM. Or maybe the 1.4 box ia missing a jar file that is a dependency.

Mark
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm cool with the JDK differences and understand how these errors could happen.

Here's where I need you clarification: --- how it is possible that the EAR file could be missing a jar dependency on one machine, but (the same EAR file) run fine on another? That seems to be what's happening though.

The way I think about the EAR file is that it has EVERYTHING it needs -- the entire application -- to run and should work on any JBOSS installation (it has all dependencies within the EAR).

I build the EAR on the PC that won't run it, but it runs fine on another PC. How can this be? I even know which JAR/class it's complaining about, but I'm baffled how this can happen in the first place.

I really look forward to your reply. I'm clearly missing something basic on JBOSS deployments.

Thanks in advance.

-- Mike
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any dependencies for the EAR file in the JBoss/server/../lib directory that may be one one PC and not the other?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic