• Post Reply Bookmark Topic Watch Topic
  • New Topic

lookup NoClassDefFoundError  RSS feed

 
merabi kamjin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
merabi kamjin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!