This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes lookup NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "lookup NoClassDefFoundError" Watch "lookup NoClassDefFoundError" New topic
Author

lookup NoClassDefFoundError

merabi kamjin
Greenhorn

Joined: Feb 09, 2006
Posts: 7
heyall.

i'm facing this error for more than 12h...
need some serious help...

I've made a EAR file called "Ad.ear".
There are JAR and WAR files in the Ad.ear.

In Jar file, I have a Remote interface called "ResetObj" and implemented Stateless Session bean called "ResetObjBean".

Here's what I'm tryin to do.

I created another EAR file called Ad2.ear which only contains the Servlet.
From the servlet, I'm tryin to call the Remote Session Bean like this:



but the prob is that it gives me following error:




JBoss:4.0.5GA
JVM:1.5.0_10

and using EJB3.0.

I've set ClassPath to both JAVA_HOME and JBOSS_HOME.

I copied JBoss folder and Eclipse Project folder from my co-worker, but it didn' solve the prob...

I also tried installing new Eclipse and set up the new environment, but nothing changed.

It seems that the prob is something to do w/ the JNDI, but I cannot find the answer.

ANY help will be appreciated!!
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262

I created another EAR file called Ad2.ear which only contains the Servlet.


If your servlet is packaged inside an EAR that only contains the servlet (and not EJB interfaces), then the class not found exception is to be expected. Try updating your Ad2.ear so that it contains a war file (including your servlet) and a jar file containing the home and remote interfaces for your bean.


Fun programming etcetera!
merabi kamjin
Greenhorn

Joined: Feb 09, 2006
Posts: 7
thanks for fast reply.

but the situation didn change any.

I edited the build xml and included the "Ad.jar" and "Ad2.war" into "Ad2.ear", but it gives me the same error...

forgot the tell you that just above the error msg it tells me:



does this tells you anything?

I'm guessing that the my PC's classpath might be the cause...
here's the path that I have:



Also, in Eclipse i included libraries in this order:



I'm guessing that the cause is in my computer and not the code or the jboss setting...

it's wired tho...
i have some servlets inside of "Ad.ear" and from that servlet there's no problem at all.

it happens only when i tried to access from the other EAR file.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: lookup NoClassDefFoundError
 
Similar Threads
JBoss in Eclipse not finding source
Problem Deploying Applet
java.io.IOException: Server returned HTTP response code: 500
Reflection Problem in SOAP
Simple & Basic EJB application -- Help is needed