cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <kpiroum...@apache.org>
Subject Re: i18n problem with i18n:attr : ArrayIndexOutOfBoundsException
Date Wed, 22 Jan 2003 08:14:46 GMT
A typical parser/classpath problem.
You'll find the answer here (scroll to the bottom):

http://wiki.cocoondev.org/Wiki.jsp?page=FAQs

--
  Konstantin

----- Original Message -----
From: "Thomas Haselberger" <thomas.haselberger@ucpmorgen.com>
To: "Cocoon-Users (E-mail)" <cocoon-users@xml.apache.org>
Sent: Tuesday, January 21, 2003 12:52
Subject: i18n problem with i18n:attr : ArrayIndexOutOfBoundsException


I use cocoon 2.0.4 in tomcat 4.1.18 with j2sdk1.4.0_03.

the i18n samples that use i18n:attr work ok, but my i18n transformation
throws an
ArrayIndexOutOfBoundsException.

this is my source xml:
=================================================================
<?xml version="1.0" encoding="UTF-8"?>

<wml xmlns:i18n="http://apache.org/cocoon/i18n/2.0">
  <card i18n:attr="title" title="ol" id="main">
    <p mode="nowrap">
      <em><i18n:text>ol</i18n:text></em>
      <br/><a href="new/1/"><i18n:text>new</i18n:text></a>
    </p>
  </card>
</wml>
=================================================================

this is my sitemap matcher entry:
=================================================================
<!-- i18n test -->
<map:match pattern="**i18ntest**">
  <map:generate src="content/wml_for_i18n.xml"/>
  <map:transform type="i18n" label="rmns"/>
  <map:serialize type="xml"/>
</map:match>
=================================================================

and that's the error log entry generated:
=================================================================
ERROR   (2003-01-21) 10:50.44:761   [sitemap] (/idc/i18ntest/bla)
Thread-15/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/java/jakarta-tomcat-4.1.18/webapps/idc/content/wml_for_i18n.xml:
java.lang.ArrayIndexOutOfBoundsException
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:214)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
at
org.apache.cocoon.www.sitemap_xmap.matchN400126(D:\java\jakarta-tomcat-4.1.1
8\work\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_x
map.java:1345)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1185)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1128)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415
)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.java:439)
at
org.apache.cocoon.transformation.I18nTransformer.translateAttributes(I18nTra
nsformer.java:1157)
at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransforme
r.java:879)
at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118
)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBin
der.java:877)
at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.ja
va:569)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:759)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
... 41 more
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.java:439)
at
org.apache.cocoon.transformation.I18nTransformer.translateAttributes(I18nTra
nsformer.java:1157)
at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransforme
r.java:879)
at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118
)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBin
der.java:877)
at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.ja
va:569)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:759)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
at
org.apache.cocoon.www.sitemap_xmap.matchN400126(D:\java\jakarta-tomcat-4.1.1
8\work\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_x
map.java:1345)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1185)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1128)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.xml.sax.helpers.AttributesImpl.removeAttribute(AttributesImpl.java:439)
at
org.apache.cocoon.transformation.I18nTransformer.translateAttributes(I18nTra
nsformer.java:1157)
at
org.apache.cocoon.transformation.I18nTransformer.startElement(I18nTransforme
r.java:879)
at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:118
)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:459)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBin
der.java:877)
at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.ja
va:569)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:759)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:329)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:117
5)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:264)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:215)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
at
org.apache.cocoon.www.sitemap_xmap.matchN400126(D:\java\jakarta-tomcat-4.1.1
8\work\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_x
map.java:1345)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1185)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1128)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
=================================================================

any ideas ?

thx,
tom

--
thomas haselberger

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message