cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JACOB, ERIC" <eric.ja...@bell.ca>
Subject Portal - Problem when loading profiles
Date Fri, 20 Aug 2004 16:09:26 GMT
Hi,

Here my problem. I have a default portal layout (profiles/layout/portal.xml)
that looks like this:

<composite-layout name="tab" id="maintab">
  <named-item name="Main">
    <composite-layout name="row">
      <item>
        <composite-layout name="column">
          <item>
            <parameter name="width" value="50%"/>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>MyPage-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>Dilbert-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
          <item>
            <parameter name="width" value="50%"/>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>CiscoNews-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
 
<coplet-instance-data>NortelNetworksTechnology-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
        </composite-layout>
      </item>
    </composite-layout>
  </named-item>
</composite-layout>

Into the sitemap, I uncommented these lines to save the user's profile when
he logs out:

<map:act type="portal-save-profile">
  <map:parameter name="portal-name" value="portal"/>
</map:act>

Everything is fine until I log in again. I got this error:
org.apache.avalon.framework.CascadingRuntimeException: Exception during
loading of profile.

cause: org.xml.sax.SAXException: unable to add 'parameter' to <null> due to
the following exception: >>>--- Begin Exception ---<<<
java.lang.ClassCastException at
org.apache.cocoon.portal.util.ParameterFieldHandler.setValue(ParameterFieldH
andler.java:56) at
org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerImpl.
java:433) at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:970)
at
...

Now, when I looked at the saved profile
(profiles/layout/portal-user-eric.jacob.xml), the parameters tags has been
altered:

<composite-layout id="maintab" name="tab">
  <named-item name="Main">
    <composite-layout name="row">
      <item>
        <composite-layout name="column">
          <item>
            <parameter xsi:type="map-item"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <name>width</name> 
              <value name="width" value="50%" xsi:type="attributed-map-item"
/> 
            </parameter>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>MyPage-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>Dilbert-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
          <item>
            <parameter xsi:type="map-item"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
              <name>width</name> 
              <value name="width" value="50%" xsi:type="attributed-map-item"
/> 
            </parameter>
            <composite-layout name="row">
              <item>
                <coplet-layout name="coplet">
                  <coplet-instance-data>CiscoNews-1</coplet-instance-data>
                </coplet-layout>
              </item>
              <item>
                <coplet-layout name="coplet">
 
<coplet-instance-data>NortelNetworksTechnology-1</coplet-instance-data>
                </coplet-layout>
              </item>
            </composite-layout>
          </item>
        </composite-layout>
      </item>
    </composite-layout>
  </named-item>
</composite-layout>

Any idea on how I could avoid this? Is it a bug or I missed something?

Thanks,

Eric




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


Mime
View raw message