I think bea used to include xerces classes in one of its jars. This may be why you didn't need to include a xerces jar when using castor in the past but of course this made it impossible in certain cases to use other than the xerces version in bea's jars except by modifying a bea jar - not usually a good idea when dealing with a commercial product.
-----Original Message----- From: Paul Bienick [mailto:[EMAIL PROTECTED] Sent: Friday, June 17, 2005 10:30 AM To: [email protected] Subject: Re: [castor-user] NoClassDefFoundError on XMLSerializer while unmarshaling Thanks very much for the reply - I managed to figure this out. For some reason, I thought that portions of xerces.jar were incorporated into JDK 1.4 as with the xalan.jar library, hence the reason for my trying the -Xbooclasspath/p: first. But I guess I'm wrong, because all I had to do was add xerces.jar to the classpath that WebLogic uses when it starts up. On 6/17/05 5:00 AM, "Gregory Block" <[EMAIL PROTECTED]> wrote: > It's going to be one of three things: > > - Classpath-based conflicts over what the appropriate visibility to > use when loading classes will be; this is especially common if your > castor jar is in (on Tomcat) ${TOMCAT_HOME}/common/lib, but you're > trying to ship Xerces in the EAR/WAR. Specifying the classloader to > use might help with this. > > - Missing or corrupt jars. We can rule this one out in your case. > > > Try specifying a classloader to use to find the jar; if you're getting > the object, say, from JNDI, the classloader may be different than the > one which has full visibility of classes in your EAR. > Handing it the EAR classloader should get around this. > > > On 16 Jun 2005, at 23:25, Paul Bienick wrote: > > >> I'm having a problem unmarshaling XML in a message driven bean that >> uses Castor (any version including 0.9.7). We're running on WebLogic >> 8.1 SP2. >> This bean has been deployed in production for the last several years >> under WebLogic 6.1 with no problem, but now that we're migrating to >> 8.1, I'm getting the following error: >> >> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer >> at >> org.exolab.castor.xml.Unmarshaller.initConfig(Unmarshaller.java:272) >> at org.exolab.castor.xml.Unmarshaller.<init> >> (Unmarshaller.java:225) >> at org.exolab.castor.xml.Unmarshaller.<init> >> (Unmarshaller.java:212) >> at >> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:736) >> >> Obviously Castor needs this class and can't find it, but I can't >> figure out how to get this to work. I've tried expanding the latest >> Xerces JAR in my EJB JAR, and I've tried adding it to the >> bootclasspath via the >> -Xbootclasspath/p: option. I've even tried changing the >> org.exolab.castor.serializer to >> weblogic.apache.xml.serialize.XMLSerializer, >> but I still get the same message. >> >> I'm hopeful somebody out there will know the magic word I need to fix >> this. >> >> > > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an empty > message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > Paul Bienick Palisades Technology Partners iNet: [EMAIL PROTECTED] Phone: 941-926-7515 (home office) ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] ------------------------------------------------- ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

