Bug 104909 - application fault when creating template
Summary: application fault when creating template
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other
Version: nightly
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-23 14:40 UTC by Mark Watson
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-05 17:36:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Mark Watson 2003-09-23 14:40:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030807 Galeon/1.3.5

Description of problem:
On the nightly build for 09-21-2003 (and on 09-17-2003 which I previously had),
creating a template throws the following error ... (information from the ccm log): 

WARN  dispatcher.CMSPage - Failed to load content item 500012003-09-23
13:35:03,560 [0][9]] 
WARN  search.SearchTransactionListener - Search save event failed for object
[com.arsdigita.cms.Template:{id=50001}]java.lang.ClassCastException:
com.arsdigita.cms.Template at
com.arsdigita.cms.search.ContentPageMetadataProvider.getTypeSpecificInfo(ContentPageMetadataProvider.java:62)
       at
com.arsdigita.search.lucene.DocumentObserver.onSave(DocumentObserver.java:63)  
     at
com.arsdigita.search.SearchTransactionListener.beforeCommit(SearchTransactionListener.java:66)
       at
com.arsdigita.persistence.TransactionContext.fireBeforeCommitEvent(TransactionContext.java:181)
       at
com.arsdigita.persistence.TransactionContext.commitTxn(TransactionContext.java:88)
       ... etc

2003-09-23 13:35:03,799 [0][9]] 
FATAL logging.ErrorReport --*-*-*-*-*- 
Begin Error Report -*-*-*-*-*--*-*-*- 
ACS Error Report Code: x.x.x.x:2554aa10:f7ce720ff4 -*-*-*--*-*-*- 
Message: Unable to send all events to database because these required properties
are null: [com.arsdigita.search.lucene.Document:{id=50001}].title -*-*-*-

Version-Release number of selected component (if applicable):
ccm-core-6.1.0.AUTO.09.21.2003-1-bin.zip

How reproducible:
Always

Steps to Reproduce:
1. Go to content types, choose article
2. Add a template
3. Fill in values and save
    

Actual Results:  See Description
Note the template then appears against the content type as created, but attempts
to edit it throw the same error.

Expected Results:  Template created and no error thrown.

Additional info:

Reported to list, 2 responses as follows:

RESPONSE 1 - Vadim Nasardinov <vadimn>:
Looks like you might want to file a bug report on this one. The method
getTypeSpecificInfo assumes it can cast DomainObject to ContentPage:

$ nl -ba ContentPageMetadataProvider.java | head -n 65 | tail -n 5    
61      public String getTypeSpecificInfo(DomainObject dobj) {    
62          ContentPage item = (ContentPage) dobj;    
63          return ContentItem.LIVE.equals(item.getVersion()) ?    
64              ContentItem.LIVE : ContentItem.DRAFT;    
65      }

You found a situation where this is not the case.

RESPONSE 2 - Daniel P. Berrange <berrange>
- reply to response 1
In fact there shouldn't even be a search object registeredagainst the
c.a.cms.Template object type, since its an internal type for managing JSP
templates rather than content per se.

Comment 1 Richard Li 2003-09-23 21:59:09 UTC
dan, should this be you?

Comment 2 Daniel Berrangé 2003-09-24 13:21:08 UTC
Yep, its my mistake. When registering search metadata adapters in the XML
content type loader it was not taking care to filter out those with the
'isInternal' flag set & those which are not subclasses of ContentPage. This is
fixed in p4 36296.

Comment 3 David Lawrence 2006-07-18 03:32:55 UTC
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.

Comment 4 Jon Orris 2006-09-05 17:36:28 UTC
Closing old tickets





Note You need to log in before you can comment on or make changes to this bug.