[opencms-dev] Add Locale Problem

Radu Sora sisturix at gmail.com
Thu Sep 21 10:41:40 CEST 2006


Hello,

I have some problems when adding different locales to a OpenCMS site.

The steps to reproduce the bug (assuming is a bug, and i am not doing
something wrong) are the following:

1) Edit opencms-system.xml to add more languages:

Exemple:

[...]

<internationalization>
      <localehandler class="org.opencms.i18n.CmsDefaultLocaleHandler"/>
      <localesconfigured>
        <locale>ro</locale>
        <locale>hu</locale>
        <locale>en</locale>
      </localesconfigured>
      <localesdefault>
        <locale>ro</locale>
      </localesdefault>
    </internationalization>

[...]

2) Restart tomcat server

3) Create a JSP template

4) Create a "Page with free text" based on the template selected on step 3.

5) Try to "Edit Page" on the template

The error generated is:  Error javax.servlet.jsp.JspException: Index: 0,
Size: 0

Some notes:

- if i try to edit controlcode, and manually created the xml structure for
all the languages, then i can edit page corectlly.
- the problem doesnt exists for structured content editing;

The stack for the error is:

21 Sep 2006 11:39:37,445 ERROR [ina.core.ApplicationDispatcher: 704]
Servlet.service() for servlet jsp threw exception
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:546)
    at java.util.ArrayList.get(ArrayList.java:321)
    at
org.opencms.workplace.editors.CmsDefaultPageEditor.initBodyElementName(
CmsDefaultPageEditor.java:548)
    at
org.opencms.workplace.editors.CmsSimplePageEditor.initWorkplaceRequestValues
(CmsSimplePageEditor.java:258)
    at org.opencms.editors.fckeditor.CmsFCKEditor.initWorkplaceRequestValues
(CmsFCKEditor.java:178)
    at org.opencms.workplace.CmsWorkplace.initWorkplaceMembers(
CmsWorkplace.java:2067)
    at org.opencms.workplace.CmsWorkplace.<init>(CmsWorkplace.java:253)
    at org.opencms.workplace.tools.CmsToolDialog.<init>(CmsToolDialog.java
:93)
    at org.opencms.workplace.CmsDialog.<init>(CmsDialog.java:249)
    at org.opencms.workplace.editors.CmsEditor.<init>(CmsEditor.java:186)
    at org.opencms.workplace.editors.CmsDefaultPageEditor.<init>(
CmsDefaultPageEditor.java:115)
    at org.opencms.workplace.editors.CmsSimplePageEditor.<init>(
CmsSimplePageEditor.java:90)
    at org.opencms.editors.fckeditor.CmsFCKEditor.<init>(CmsFCKEditor.java
:92)
    at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.editors.fckeditor.editor_jsp._jspService
(editor_jsp.java:51)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(
ApplicationDispatcher.java:672)
[...]


Any clue on what may be causing that? I suppose is a problem on the script
that creates the initial xmlstructure for a page (is doesn't cycle correctly
through all the languages).

Thank you,
Radu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060921/8ed7d2bb/attachment.htm>


More information about the opencms-dev mailing list