DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15279>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15279

WriteableSource doesn't work with context: URLs

           Summary: WriteableSource doesn't work with context: URLs
           Product: Cocoon 2
           Version: Current CVS
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: general components
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I've found that it is not possible to use a WriteableSource to write to a URI
specified with the 'context:' pseudo-protocol.

The possibility of being able to do this is alll over the
SourceRewritingTransformer docs:

http://xml.apache.org/cocoon/userdocs/transformers/sourcewriting-transformer.html

Yet the actual samples never do so; I'm sure they'd break if they tried.

Attached is a minimal sample transformer that tries to write "Hello World" to a
file specified as "context://samples/logfile" in the associated sitemap.  When
mounted in the Cocoon samples/ directory, it gives an error:

org.apache.cocoon.ProcessingException: Error resolving
'context://samples/logfile':
org.apache.excalibur.source.SourceNotFoundException: samples/logfile could not
be found. (possible context problem)

Original exception : org.apache.excalibur.source.SourceNotFoundException:
samples/logfile could not be found. (possible context problem)
at
org.apache.cocoon.components.source.impl.ContextSourceFactory.getSource(ContextSourceFactory.java:147)
at
org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:263)
at
org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:418)
at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:509)
at
org.apache.cocoon.environment.AbstractEnvironment.resolveURI(AbstractEnvironment.java:499)
at org.apache.cocoon.transformation.TestTransformer.setup(TestTransformer.java:73)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:391)
...
org.apache.cocoon.ProcessingException: Error resolving
'context://samples/logfile':
org.apache.excalibur.source.SourceNotFoundException: samples/logfile could not
be found. (possible context problem)
at org.apache.cocoon.transformation.TestTransformer.setup(TestTransformer.java:88)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:391)


Changing the 'src' in the sitemap to 'logfile.log' or something else without
'context:' will work.


--Jeff

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

Reply via email to