You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by James Holstead <Ja...@tybrin.com> on 2006/10/02 16:10:59 UTC

RE: runtime error: xmlserializer not found

I'm running j2se 1.5 using netbeans IDE and it's built in tomcat55. My
webpages folder WEB-INF/lib includes:  xml-apis-1.3.03, xalan-2.7.0,
xercesImpl-2.8.0 jars. I copied these to the
%tomcat_home%\common\endorsed and restarted tomcat. Same error results.
Any red flags pop up ?

-----Original Message-----
From: Jeroen Reijn [mailto:j.reijn@hippo.nl] 
Sent: Friday, September 29, 2006 3:31 AM
To: users@cocoon.apache.org
Subject: Re: runtime error: xmlserializer not found

Hi James,

yes it looks like Xerces isn't in your classpath or lib directory of you
application server. Can you confirm this? I guess your problem should go
away after adding the jar and restarting tomcat.

Did you try the suggestions from the cocoon documentation about tomcat
,Xerces and j2se 1.4?

It states:

"Cocoon requires more recent versions of the Xerces and Xalan libraries
than those shipped with j2se 1.4. To override bundled libraries, follow
these steps:

1. Create %JAVA_HOME%\jre\lib\endorsed directory. (Tomcat users use
%TOMCAT_HOME\common\endorsed instead) 2. Copy xercesXXX.jar,
xalan-XXX.jar, and the xml-apis.jar from the .\lib\endorsed\ to the new
directory created above.

See http://cocoon.apache.org/2.1/installing/index.html for more
information

Regards,

Reijn

James Holstead wrote:
> Envo: Cocoon219, Hibernate, Tc5.5
>  
> This is a configuration question that may not belong here, but after a

> full day of searching I'm left wondering if there is a conflicting jar

> with the org.apache.xml package somewhere. Any help or direction is 
> appreciated. I'll say this in advance, because the error looks fairly 
> obvious at first: xerces is in my nb project classpath.
>  
> The code:
>  
>       <fd:action id="test">
>             <fd:label>Push Me</fd:label>
>             <fd:on-action>
>                 <fd:javascript>
>                     // get the counties as xml
>                     importPackage(com.testcocoon.utilities.data);
>                     importPackage(org.apache.xml.serialize); //added 
> this line, doesn't help...why? In fact: If a try to import the class 
> XMLSerializer, it complains thats its a class and not a package.
> 
>                     var countyData = new StaticDataCounties(); 
> //returns object with county data
>                     var data = countyData.currentObject(); //ERROR 
> Line95, returns a CastorMarshaller.getXML()
> 
>                     var parent = event.source.parent;
>                     parent.lookupWidget("output").setValue(data);
>  
>                     //ds is hibernate datasource
>                     var peopleList = ds.getObjects("from 
> com.testcocoon.dataobjects.PersonDO as o order by 
> o.persLastName",0,10);
> 
>                     var peopleWidget =  parent.lookupWidget("people");
>                     peopleWidget.setSelectionList(peopleList,
> "personID","persLastName");
> 
>                 </fd:javascript>
>             </fd:on-action>
>         </fd:action>
>  
>  
> The error:
> 
> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
>  
> Cocoon stacktrace[hide]
>  
> at handleEvent
> (file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/e
> dit_childcare_facility_model.xml,
> Line 95):
> java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1
> 
> Error calling continuation
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1 [JavaScriptException]
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> it_childcare_facility_model.xml
> - 95:-1
> resource://org/apache/cocoon/forms/flow/javascript/Form.js - 168:-1 
> resource://org/apache/cocoon/forms/flow/javascript/Form.js - 0:-1 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/prefs.js

> -
> 0:-1
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/sitemap.
> xmap
> - 127:47 <map:call>
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/sitemap.xmap

> -
> 188:68 <map:mount>
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/sitemap.xmap -
> 969:66 <map:mount>
>  
> Java stacktrace[hide]
>  
> 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)
>  
>  
> Thanks for any input, even if you have to kick me to a hibernate or 
> castor thread....I'm a bit lost!
>  
> *James Holstead*
> Software Engineer
> Tybrin Corporation
> tybrin.com
> 850.337.2718
>  
> This e-mail and any files transmitted with it are the property of 
> TYBRIN Corporation, are confidential, and are intended solely for the 
> use of the individual or entity to which this email is addressed. If 
> you are not one of the named recipient(s) or otherwise have reason to 
> believe that you have received this message in error, please delete 
> this message immediately. Any other use, retention, dissemination, 
> forwarding, printing, or copying of this e-mail is strictly
prohibited.
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: runtime error: xmlserializer not found

Posted by Geert Josten <ge...@daidalos.nl>.
Perhaps the IDE is running tomcat in its own JVM and this causes the
commen/endorsed libraries to be loaded after the libraries from the JVM
itself? I would recommend as test running tomcat outside the IDE and see
whether the error occurs there as well.

If you are really keen on working within the IDE, you might have more
succes with using the Paranoid Cocoon servlet. Include the paranoid
block in the Cocoon build (just one additional jar I believe) and set
the servlet-class in web.xml to:

	
<servlet-class>org.apache.cocoon.servlet.ParanoidCocoonServlet</servlet-
class>

This makes sure that classes are searched in the webapp libraries first,
before looking in libraries provided through the framework.

Kind regards,
Geert

> 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
 

> Van: James Holstead [mailto:James.Holstead@tybrin.com] 
> Verzonden: maandag 2 oktober 2006 16:11
> Aan: users@cocoon.apache.org
> Onderwerp: RE: runtime error: xmlserializer not found
> 
> I'm running j2se 1.5 using netbeans IDE and it's built in 
> tomcat55. My webpages folder WEB-INF/lib includes:  
> xml-apis-1.3.03, xalan-2.7.0, xercesImpl-2.8.0 jars. I copied 
> these to the %tomcat_home%\common\endorsed and restarted 
> tomcat. Same error results.
> Any red flags pop up ?
> 
> -----Original Message-----
> From: Jeroen Reijn [mailto:j.reijn@hippo.nl]
> Sent: Friday, September 29, 2006 3:31 AM
> To: users@cocoon.apache.org
> Subject: Re: runtime error: xmlserializer not found
> 
> Hi James,
> 
> yes it looks like Xerces isn't in your classpath or lib 
> directory of you application server. Can you confirm this? I 
> guess your problem should go away after adding the jar and 
> restarting tomcat.
> 
> Did you try the suggestions from the cocoon documentation 
> about tomcat ,Xerces and j2se 1.4?
> 
> It states:
> 
> "Cocoon requires more recent versions of the Xerces and Xalan 
> libraries than those shipped with j2se 1.4. To override 
> bundled libraries, follow these steps:
> 
> 1. Create %JAVA_HOME%\jre\lib\endorsed directory. (Tomcat 
> users use %TOMCAT_HOME\common\endorsed instead) 2. Copy 
> xercesXXX.jar, xalan-XXX.jar, and the xml-apis.jar from the 
> .\lib\endorsed\ to the new directory created above.
> 
> See http://cocoon.apache.org/2.1/installing/index.html for 
> more information
> 
> Regards,
> 
> Reijn
> 
> James Holstead wrote:
> > Envo: Cocoon219, Hibernate, Tc5.5
> >  
> > This is a configuration question that may not belong here, 
> but after a
> 
> > full day of searching I'm left wondering if there is a 
> conflicting jar
> 
> > with the org.apache.xml package somewhere. Any help or direction is 
> > appreciated. I'll say this in advance, because the error 
> looks fairly 
> > obvious at first: xerces is in my nb project classpath.
> >  
> > The code:
> >  
> >       <fd:action id="test">
> >             <fd:label>Push Me</fd:label>
> >             <fd:on-action>
> >                 <fd:javascript>
> >                     // get the counties as xml
> >                     importPackage(com.testcocoon.utilities.data);
> >                     
> importPackage(org.apache.xml.serialize); //added 
> > this line, doesn't help...why? In fact: If a try to import 
> the class 
> > XMLSerializer, it complains thats its a class and not a package.
> > 
> >                     var countyData = new StaticDataCounties(); 
> > //returns object with county data
> >                     var data = countyData.currentObject(); //ERROR 
> > Line95, returns a CastorMarshaller.getXML()
> > 
> >                     var parent = event.source.parent;
> >                     parent.lookupWidget("output").setValue(data);
> >  
> >                     //ds is hibernate datasource
> >                     var peopleList = ds.getObjects("from 
> > com.testcocoon.dataobjects.PersonDO as o order by 
> > o.persLastName",0,10);
> > 
> >                     var peopleWidget =  
> parent.lookupWidget("people");
> >                     peopleWidget.setSelectionList(peopleList,
> > "personID","persLastName");
> > 
> >                 </fd:javascript>
> >             </fd:on-action>
> >         </fd:action>
> >  
> >  
> > The error:
> > 
> > java.lang.NoClassDefFoundError: 
> org/apache/xml/serialize/XMLSerializer
> >  
> > Cocoon stacktrace[hide]
> >  
> > at handleEvent
> > 
> (file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/e
> > dit_childcare_facility_model.xml,
> > Line 95):
> > java.lang.NoClassDefFoundError: 
> org/apache/xml/serialize/XMLSerializer
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1
> > 
> > Error calling continuation
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1 [JavaScriptException]
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/model/ed
> > it_childcare_facility_model.xml
> > - 95:-1
> > resource://org/apache/cocoon/forms/flow/javascript/Form.js - 168:-1 
> > resource://org/apache/cocoon/forms/flow/javascript/Form.js - 0:-1 
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/prefs.js
> 
> > -
> > 0:-1
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/lic/sitemap.
> > xmap
> > - 127:47 <map:call>
> > 
> file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/cct/sitemap.xmap
> 
> > -
> > 188:68 <map:mount>
> > file:/E:/tomcat_farm/common/cocoon-2.1.9/build/webapp/sitemap.xmap -
> > 969:66 <map:mount>
> >  
> > Java stacktrace[hide]
> >  
> > 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)
> >  
> >  
> > Thanks for any input, even if you have to kick me to a hibernate or 
> > castor thread....I'm a bit lost!
> >  
> > *James Holstead*
> > Software Engineer
> > Tybrin Corporation
> > tybrin.com
> > 850.337.2718
> >  
> > This e-mail and any files transmitted with it are the property of 
> > TYBRIN Corporation, are confidential, and are intended 
> solely for the 
> > use of the individual or entity to which this email is 
> addressed. If 
> > you are not one of the named recipient(s) or otherwise have 
> reason to 
> > believe that you have received this message in error, please delete 
> > this message immediately. Any other use, retention, dissemination, 
> > forwarding, printing, or copying of this e-mail is strictly
> prohibited.
> >  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org