RE: SourceResolver in Selector?

2003-07-02 Thread GUILLAUME Gabriel FTRD/DIH/HDM REN

Hi,
I have developped a matcher that use a SourceResolver as follows 
1) My class implements the import org.apache.avalon.framework.component.Composable 
interface
2) I get the ComponentManager as follows
/** The component manager instance */
protected org.apache.avalon.framework.component.ComponentManager manager_;

/**
 * Set the current codeComponentManager/code instance used by this
 * codeComposable/code.
 */
public void compose(org.apache.avalon.framework.component.ComponentManager 
aManager) throws ComponentException 
{
manager_=aManager;
}
3) Then in the configure method (from the Configurable interface), I access to the 
(URLFactory)SourceResolver via the component manager as follows

String config_url=foo.xml;
URLFactory url_factory = null;
Source config_source = null;
try 
{
url_factory = (URLFactory)this.manager_.lookup(URLFactory.ROLE);
URLFactorySourceResolver urlResolver = new 
URLFactorySourceResolver(url_factory, this.manager_);
config_source = urlResolver.resolve(config_url);
...
} 
catch (Exception e) 
{
throw new ConfigurationException(Cannot load configuration from  + 
config_url, e);
} 
finally 
{
this.manager_.release(url_factory);
if (config_source != null) {
config_source.recycle();
}


Does it address your problem ?
Gabriel


-Message d'origine-
De : Paul Bowler [mailto:[EMAIL PROTECTED]
Envoyé : mardi 1 juillet 2003 16:25
À : [EMAIL PROTECTED]
Objet : SourceResolver in Selector?


Anyone know how to resolve a URI within a selector?

No SourceResolver is passed to it, unlike a Transformer, and I'm trying to gain access 
to a local XML file with no 
luck.

Thanks,

Paul.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RuntimeException : The sitemap is null

2003-07-01 Thread GUILLAUME Gabriel FTRD/DIH/HDM REN
Hi folks,

I'm currently performing some load tests on the following configuration
:
cocoon 2.0.4
resin 2.1.9
SUN JDK 1.4.003
Linux (RH 9)

After 5-10 minutes, I got the following  well known RuntimeException :
The sitemap is null.
I've seen on the cocoon-dev archive that a bug report has been recently
posted about this, but I just would like to know :
- if this bug is planned to be fixed in the 2.0.4 or in the 2.1 ?
- if there are some workaround to avoid this problem ? Any hint (change
JVM, system, servlet engine) ?

Many thanks for your help
Gabriel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Failed to compile sitemap when using map:call in error handlers ?

2003-06-23 Thread GUILLAUME Gabriel FTRD/DIH/HDM REN
Hi folks,
I tried to compile the following (dummy) pipeline with Cocoon 2.0.4 :
...
 map:resources
map:resource name=test
map:serialize/
/map:resource
/map:resources
...
map:pipeline
map:match pattern=dummy
map:generate src=dummy.html/
map:serialize/
/map:match

map:handle-errors
map:transform src=stylesheets/system/error2html.xsl/
map:call resource=test/
/map:handle-errors

/map:pipeline

The compilation of the sitemap failed with the following message :
Exception: org.apache.cocoon.components.language.LanguageException: Error compiling 
proxy_xmap: Line 829, column 91: variable cocoon_view not found in class 
org.apache.cocoon.www.proxy_xmap Line 0, column 0: 1 error 

If I replace the map:call by a map:serialize, the compilation works fine.
Is it forbidden to use resource inside an error handler ?
Thanks for your help.

Gabriel

PS : I'm using 2.0.4 on Tomcat 3.3.1a with SUN jdk 1.4.0 on W2k

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]