You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Neil Davies <ne...@llgc.org.uk> on 2003/03/26 16:24:58 UTC
error trying to use TextParserGenerator
Apologies if this has been answered previously but I'm a relative newbie to Cocoon2.
I have a structured text file which is exported from a database (non SQL, a complete mess so there's no chance of using standard xsl logic to extract data) and need to convert it into ead-xml.
I am trying to see if I am capable of doing this using a TextParserGenerator to get it into an XML format that I can manipulate into ead. Unfortunately I keep getting the following Internal Server Error:
type fatal
message Error in sitemap configuration : org.apache.cocoon.generation.TextParserGenerator
description org.apache.avalon.framework.configuration.ConfigurationException: Error in sitemap configuration : org.apache.cocoon.generation.TextParserGenerator
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
Here's the bulk of the sitemap:
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:components>
<map:generators default="file">
<map:generator name="textparser"
src="org.apache.cocoon.generation.TextParserGenerator"/>
</map:generators>
-- other components --
</map:components>
<map:pipelines>
<map:pipeline>
<map:match pattern="">
<map:generate src="documents/et6766.txt" type="textparser">
<map:parameter name="grammar" value="ead.grm"/>
<map:parameter name="includeignorabletokens" value="false"/>
</map:generate>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
If the grammer file would be helpful I'll post it, but I'll try and keep this minimal for now.
Thanks.
Re: TextParserGenerator question
Posted by Stephan Michels <st...@apache.org>.
On Thu, 27 Mar 2003, Neil Davies wrote:
> Is there actually a working TextParserGenerator? I've not seen any
> examples of anyone using it on the web.
>
> I can't get Cocoon to recognise it in the sitemap decleration.
Take a look into the current CVS HEAD. There is a new and cleaner
version of the chaperon components, which have some improvements for
the usability. There are also some more examples.
Stephan.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: TextParserGenerator question
Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le Jeudi, 27 mars 2003, à 13:47 Europe/Zurich, Neil Davies a écrit :
> Is there actually a working TextParserGenerator? I've not seen any
> examples of anyone using it on the web....
If you're using the latest CVS you'll find several Chaperon parser
samples at http://localhost:8888/samples/chaperon/ , and the
corresponding files in the source code under
src/blocks/chaperon/samples.
-Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
TextParserGenerator question
Posted by Neil Davies <ne...@llgc.org.uk>.
Is there actually a working TextParserGenerator? I've not seen any
examples of anyone using it on the web.
I can't get Cocoon to recognise it in the sitemap decleration.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: error trying to use TextParserGenerator
Posted by Neil Davies <ne...@llgc.org.uk>.
>
>
>Is there a detailed exception in the logs under WEB-INF/logs/*.log ?
>(Perhaps you must set the log level higher)
>
>With this exception I can only draw the conclusion, that the generator
>have problems with the configuration within the components section.
>
>Stephan.
>
Okay. I have looked at the error.log file, I meant to mention this in my
last email but I sent it without realising I hadn't, and it mentioned a
ClassNotFoundException on the TextParserGenerator. I have looked in the
sitemap.xmap in the jakara-home/webapps/cocoon directory and there is no
mention of a TextParserGenerator in there, which must be causing the
problem.
I am using Cocoon 2.0.4, which is the latest version I think. Is the
TextParserGenerator included with this? The other generators work
without any bother.
Can anyone point me in the direction of some information on this
subject? I have looked at the user-documentation on the
TextParserGenerator online.
Here is the error-report if it is of any help:
ERROR (2003-03-26) 17:24.25:543 [core.manager] (/cocoon/eadcairs)
Thread-10/Handler: Error compiling sitemap
org.apache.avalon.framework.configuration.ConfigurationException: Error
in sitemap configuration : org.apache.cocoon.generation.TextParserGenerator
at
org.apache.cocoon.www.file_.C_.jakarta_tomcat.webapps.cocoon.c2.eadcairs.sitemap_xmap.configure(C:\jakarta-tomcat\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/jakarta_tomcat/webapps/cocoon/c2/eadcairs\sitemap_xmap.java:148)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:264)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:187)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:357)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.ClassNotFoundException:
org.apache.cocoon.generation.TextParserGenerator
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1428)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.java:263)
at
org.apache.cocoon.www.file_.C_.jakarta_tomcat.webapps.cocoon.c2.eadcairs.sitemap_xmap$Configurer.configGenerators(C:\jakarta-tomcat\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/jakarta_tomcat/webapps/cocoon/c2/eadcairs\sitemap_xmap.java:170)
at
org.apache.cocoon.www.file_.C_.jakarta_tomcat.webapps.cocoon.c2.eadcairs.sitemap_xmap.configure(C:\jakarta-tomcat\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/file_/C_/jakarta_tomcat/webapps/cocoon/c2/eadcairs\sitemap_xmap.java:126)
at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:264)
at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:187)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:357)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
at java.lang.Thread.run(Thread.java:536)
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: error trying to use TextParserGenerator
Posted by Stephan Michels <st...@apache.org>.
On Wed, 26 Mar 2003, Neil Davies wrote:
> Apologies if this has been answered previously but I'm a relative
> newbie to Cocoon2.
>
> I have a structured text file which is exported from a database
> (non SQL, a complete mess so there's no chance of using standard xsl
> logic to extract data) and need to convert it into ead-xml.
>
> I am trying to see if I am capable of doing this using a
> TextParserGenerator to get it into an XML format that I can manipulate
> into ead. Unfortunately I keep getting the following Internal Server
> Error:
>
> type fatal
> message Error in sitemap configuration : org.apache.cocoon.generation.TextParserGenerator
> description
> org.apache.avalon.framework.configuration.ConfigurationException: Error
> in sitemap configuration :
> org.apache.cocoon.generation.TextParserGenerator
> sender org.apache.cocoon.servlet.CocoonServlet
> source Cocoon servlet
>
> Here's the bulk of the sitemap:
>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> <map:components>
> <map:generators default="file">
> <map:generator name="textparser"
> src="org.apache.cocoon.generation.TextParserGenerator"/>
> </map:generators>
> -- other components --
> </map:components>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="">
> <map:generate src="documents/et6766.txt" type="textparser">
> <map:parameter name="grammar" value="ead.grm"/>
> <map:parameter name="includeignorabletokens" value="false"/>
> </map:generate>
> <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> </map:sitemap>
>
> If the grammer file would be helpful I'll post it, but I'll try and keep this minimal for now.
Is there a detailed exception in the logs under WEB-INF/logs/*.log ?
(Perhaps you must set the log level higher)
With this exception I can only draw the conclusion, that the generator
have problems with the configuration within the components section.
Stephan.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org