• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic