• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

jsp/jar file prob

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm getting this error from my jsp:
java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement
I checked the jar file I compield all the relevant classes with
(jaxb-rt-1.0-ea.jar) andthe class is there in the right place. I get the same error when I compile them with the following
classpath:
/usr/j2se/lib/tools.jar:
/home/member/k/keno/public_html/WEB-INF/classes/front_page:
/usr/local/web/jakarta-tomcat-4.0.1/classes:
/home/member/k/keno/public_html/WEB-INF/lib/servlet.jar:
/home/member/k/keno/public_html/WEB-INF/lib/jaxb-rt-1.0-ea.jar
The url is:
http://www.redbrick.dcu.ie/~keno/front_page.jsp
Thanks in advance,
Keno

PS what's the story with useing org or com as directory names in your package?
I was putting my classes in front_page/org to see what would happen and I got
a type definition error. What are the different names and different types of
directories they stand for?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have other servlets or JSP that run with this setup?
With respect to org or com as the base for your package - thats just a convention to give your class names a unique package. This is basic Java.
Bill
 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you mean this setup? It's the first time I've used jaxb classes in conjunction with a jsp.
I have a simple test package (redbrick.dcu.ie/~keno/simple.jsp) that interacts with a class that returns my name as a string.
With front_page.jsp I just want to output the unmarshalled xml data as a string..
I have been able to unmarshal an xml file, add some info and marshall the updated data successufully using a class outside of my WEB-INF directory and the jar file I mentioned.
I have put all the files in :
http://www.redbrick.dcu.ie/~keno/fp_app/
As for the other thing, in retrospect it was the fact that I didn't put the package name in my java files that i was getting the wierd error(I'm fairly new to useing packages and jsp in general).
Thanks for the reply,
Brendan
 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, unpacking the jaxb-rt jar file in my classes dir was enough to get it semi working properly, it's not outputting the tags right, but that might be something to do with a bad binding schema..
how can it be that this works and my jar file doesn't?
 
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic