cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject RE: multiple catalogue search
Date Thu, 18 Dec 2003 17:26:34 GMT

Sorry for the duplicate email to you, but I made one other observation and
wanted to include the message I sent you to the dev list.  

Just for grins I modified the I18N sample so that the location was set to
"cocoon:/catalogues". I then created a pipeline consisting of:

<map:match pattern="catalogues/*">
  <map:generate src="translations/{1}/>
  <map:serialize type="xml"/>

Although this worked just fine I ended up getting a couple of stacktraces in
the error log. I was hoping that if the catalog could come from a pipeline
that I could use that method to merge two files together.  Unfortunately,
although it works I can't tolerate the stacktraces in production.  

I believe the stack trace occurs because the file couldn't be resolved by
cocoon, probably for messages_en_US.xml and menu_en_US.xml.
loadResourceBundle then calls the DocumentBuilder as a fallback to try to
load the file which causes the stack trace.  I'm not really sure why this
second call is necessary, but could the exception be caught and ignored? 

ERROR   (2003-12-18) 08:17.50:742   [core.i18n-bundles] (/test/simple.xml)
PoolThread-4/XMLResourceBundleFactory: Resource loading failed unknown protocol: cocoon
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)

> -----Original Message-----
> From: Konstantin Piroumian []
> Sent: Wednesday, December 17, 2003 11:44 PM
> To: Ralph Goers
> Cc:
> Subject: Re: multiple catalogue search
> From: "Ralph Goers" <>
> > Hi,
> >
> > I have a need for a feature similar to Fernando's request 
> back in June and
> > Beat De Martin's in August.  I was wondering if anything 
> had been done
> with
> > that. If not, I'd like some suggestions on how to go about
> > modifying/enhancing the XMLResourceBundleFactory to do what I need.
> >
> > We are an ASP that will have 1500 or more clients using the 
> same webapp.
> We
> > would like to see catalogs "concatenated" so that the 
> client's catalog is
> > searched first and then the default catalog.  In fact, we'd 
> really like a
> > catalog for each request as well so that the order would be:
> > client request-specific catalog
> > global request-specific catalog
> > client default catalog
> > global default catalog.
> Not sure that this is possible in exactly this way, but there 
> were made
> enhancements to support specific/default catalogs. Take a 
> look at the i18n
> transformer configuration documentation.
> >
> > However, we could specify a different id for the 
> request-specific catalogs
> > vs. the default catalogs.
> >
> > To make matters worse, we would like to cache the catalogs 
> but be able to
> > force a refresh through some adminstrative action.
> This is not yet implemented. Vadim was making changes in this 
> part recently,
> so probably you can join him in working on this feature. If 
> you implement
> the Bundle cache validity to take into account the last 
> modification time of
> the file then you can simply touch desired message files and 
> thus force
> their reload.
> Regards,
>   Konstantin
> >
> > Ralph Goers
> >
> >
> >
> >

View raw message