Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp/jar file prob

 
Brendan Kennedy
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • 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?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!