• 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

returning a hashmap

 
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A real beginners question.

I am populating a HashMap (DnaiInstrument) in a database utility as below



I then when I call the getInstrument() method in the code below I get a
java.lang.NoClassDefFoundError: DNAI/data/DnaiDB DNAI.struts.TestAction.execute(TestAction.java:41)



Something is wrong at the DnaiInstrument = DnaiDB.getInstrument();

where I am returning a HashMap into a HashMap variable. The program compiles, and intuitively I understand that this may be wrong, but I can't figure out how.

Hope someone can help, thanks
[ September 05, 2008: Message edited by: marten kay ]
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing wrong with the code if it compiles; this is just a deployment problem. Either you're not putting all the class files into your jar(s), or some of your jar files aren't being put in the right place in your web server. I'm going to move this over to the Struts forum, because perhaps Struts has some special requirements for how classes have to be installed. But again, there's nothing at all wrong with the code -- it has nothing to do with "returning a hashmap."
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ernest

I now think it was something in my netbeans, I rewrote the class with a different name but same code and it now works. This case closed.

thanks again and cheers

Marten
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic