About the quickest way I know to take the joy out of Cocoon Portal design is
when you miskey a definition and get a 33-page stack trace back which will
tell you everything but what really caused the error.

The Cocoon portal code throws an exception if you do this, but the message
text is lost as it percolates back up through Castor and SAX. Presumably a
future release of Castor will address this, but in the mean time a little
assistance is in order.

Here's a small mod to the CopletInstanceDataReferenceFieldHandler that will
output a message to sysout:

        public void setValue(Object object, Object value) {
        
                CopletInstanceData copletInstanceData =
(CopletInstanceData)getObjectMap().get(value);
                if (copletInstanceData == null) {
            final String missingLink = "Referenced <coplet-instance-data>
item \""+
                value+
                "\" is not defined in the coplet instance data definitions
resource.";
            System.out.println(missingLink);
            throw new IllegalArgumentException(missingLink);
                }

        
((CopletLayout)object).setCopletInstanceData(copletInstanceData);
        }

Ideally this message should go out to the log, but that's beyond my
competence.

Similar treatments can properly be applied to the other modules that
reference across resources.

Hope this helps someone,

  Tim

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom it is addressed.  If you are not the 
intended recipient or the person responsible for delivering the e-mail to the intended 
recipient, be advised that you have received this e-mail in error, and that any use, 
dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.

If you received this e-mail in error, please return the e-mail to the sender and 
delete it from your computer. Although our company attempts to sweep e-mail and 
attachments for viruses, it does not guarantee that either are virus-free and accepts 
no liability for any damage sustained as a result of viruses.

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

Reply via email to