This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError

 
Linda Ruiz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm in an Advanced Java class trying to make a servlet work and I'm stuck. I think the problem may have to do with declaring a local variable in my doGet method, but I can't figure it out. I'm trying to do a search in an employee database. Would someone be willing to look at my code? I'm new to JavaRanch, so I'm not sure how this works...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you paste some sample code (using the UBB 'code' tags, there are buttons to add them on the page where you write your post). Try to keep it short while giving us enough to work with, try not to post everything.

I find there are heaps of people sitting around waiting to help you with your problem, you just have to ask right!

... and welcome!

Dave
 
parvesh sharma
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Linda,

It seems that you are mising some class file in the class path. Please place the exception log, along with the specific code(line), so that exact problem could be figured out.

regards
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Linda,

Welcome to Javaranch. Hope you enjoy ranching here.

Could you give the exact error message that you are getting.

That would be helpful to trace the error that bugs you. Also please specify the web server, on which your servlet is running.

Cheers,
Swamy.
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can try this too.

set classpath = %classpath%;.------> Don't miss the dot at the end.

This might work. Any idea?

Cheers,
Swamy
 
Linda Ruiz
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for all your responses. Turns out my servletExecDebugger wasn't set right. Then moving some connection code from doGet to init did the trick. On to the last project of the semester!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic