geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <>
Subject Re: Geronimo xmlbeans error
Date Fri, 28 Apr 2006 06:02:54 GMT
It's possible, even likely, that the app is using the version of
XMLBeans in the Geronimo classpath, and that can't see the JARs on the
web app classpath.  You may need to add something like this to your
geronimo-web.xml (assuming you're using Geronimo 1.0):


Then you'll have to put XMLBeans in the WEB-INF/lib directory.  This
is a little unfortunate, but there's a "bug" in Geronimo 1.0 where
common libraries and WEB-INF/lib libraries don't share the same
classpath.  In Geronimo 1.1 your app can share the same copy of
XMLBeans used by the server but just add it to the application's class
path using a <dependency> element.


On 4/28/06, avin98 <> wrote:
> I am trying to marshal an object into XML in my servlet. I am using XMLBeans
> to achieve this.
> I use scomp to create a jar, and have it in my /WEB-INF/lib folder.
> However at runtime I get the following error. Can someone let me know whats
> wrong ???
> java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
>         at java.lang.Class.getDeclaredMethods0(Native Method)
>         at java.lang.Class.privateGetDeclaredMethods(
>         at java.lang.Class.getMethod0(
>         at java.lang.Class.getMethod(
>         at org.apache.xmlbeans.XmlBeans.buildMethod(
>         at org.apache.xmlbeans.XmlBeans.buildNodeMethod(
>         at
> org.apache.xmlbeans.XmlBeans.buildNodeToCursorMethod(
> 2)
>         at org.apache.xmlbeans.XmlBeans.<clinit>(
> The same code in a standalone console app works perfectly fine.
> Is there anything that I need to do ? I am using XmlBeans v 2.0.0 which is
> what is shipped with Geronimo as well.
> --
> View this message in context:
> Sent from the Apache Geronimo - Users forum at

View raw message