Bug 119176 - UPGRADE: P2fs fails to get URL for items
Summary: UPGRADE: P2fs fails to get URL for items
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin Ross
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 113496
TreeView+ depends on / blocked
 
Reported: 2004-03-25 23:06 UTC by Jon Orris
Modified: 2007-04-18 17:04 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-29 21:48:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Jon Orris 2004-03-25 23:06:58 UTC
Description of problem:

@41798/postgres

P2FS can't seem to generate the URLs to properly publish items.
This occurs with any pre-existing items that were deployed, or new
items. NOTE: Pre-existing published items were successfully
re-published by p2fs.


2004-03-25 18:02:56,152 [queue] ERROR publishToFile.QueueManager -
PublishToFileException.  itemId=41019 task=publish for item
41019(parent 41021) on host goodeats.boston.redhat.com:9004
destination=null failCount=7 error=woohoo: Bad response code 404 when
reading
http://goodeats.boston.redhat.com:9004/ccm/content/.en?templateContext=public
com.arsdigita.cms.publishToFile.PublishToFileException: woohoo: Bad
response code 404 when reading
http://goodeats.boston.redhat.com:9004/ccm/content/.en?templateContext=public
        at
com.arsdigita.cms.publishToFile.HttpHTMLProvider.fetchHTML(HttpHTMLProvider.java:77)
        at
com.arsdigita.cms.publishToFile.PublishToFile.readHTML(PublishToFile.java:451)
        at
com.arsdigita.cms.publishToFile.PublishToFile.publishPage(PublishToFile.java:395)
        at
com.arsdigita.cms.publishToFile.PublishToFile.publish(PublishToFile.java:331)
        at
com.arsdigita.cms.publishToFile.PublishToFile.doTask(PublishToFile.java:221)
        at
com.arsdigita.cms.publishToFile.QueueManager.processQueueItemsInternal(QueueManager.java:552)
        at
com.arsdigita.cms.publishToFile.QueueManager.processQueueItems(QueueManager.java:499)
        at
com.arsdigita.cms.publishToFile.QueueManager.run(QueueManager.java:463)
        at java.lang.Thread.run(Thread.java:534)

Comment 1 Jon Orris 2004-03-25 23:33:28 UTC
Is not being resolved properly by MultilingualItemResolver. Looking at
the code, getPathInfo(true) is returning an empty collection in
ContentItem.getPathNoJsp(). Will get query output for this.

2004-03-25 18:29:53,113 [004-1] DEBUG
dispatcher.MultilingualItemResolver - The root folder has a live
version; recursing
2004-03-25 18:29:53,300 [004-2] DEBUG
dispatcher.MultilingualItemResolver - Undergoing creation
2004-03-25 18:29:53,301 [004-2] DEBUG
dispatcher.MultilingualItemResolver - Generating an item URL for item
[com.arsdigita.cms.contenttypes.Article:{id=40011}], section
[com.arsdigita.cms.ContentSection:{id=11018}], and context preview
2004-03-25 18:29:53,337 [004-2] DEBUG
dispatcher.MultilingualItemResolver - Found a bundle; using its path
2004-03-25 18:29:53,346 [004-2] DEBUG cms.ContentItem - Get item path
not jsp
2004-03-25 18:29:53,346 [004-2] DEBUG
dispatcher.MultilingualItemResolver - Encoding the language of the
item passed in, 'en'
2004-03-25 18:29:53,346 [004-2] DEBUG
dispatcher.MultilingualItemResolver - Generated preview URL
/content/preview/.en
2004-03-25 18:29:53,593 [004-1] DEBUG cms.ContentItem - Get item path
not jsp
2004-03-25 18:29:53,593 [004-1] DEBUG
dispatcher.MultilingualItemResolver - Resolving the item for live URL
/.en and parent folder [com.arsdigita.cms.Folder:{id=28021}]
2004-03-25 18:29:53,593 [004-1] DEBUG
dispatcher.MultilingualItemResolver - The URL starts with a slash;
paring off the first URL element and recursing
2004-03-25 18:29:53,594 [004-1] DEBUG
dispatcher.MultilingualItemResolver - Resolving the item for live URL
.en and parent folder [com.arsdigita.cms.Folder:{id=28021}]
2004-03-25 18:29:53,594 [004-1] DEBUG
dispatcher.MultilingualItemResolver - Found a file element in the URL
2004-03-25 18:29:53,594 [004-1] DEBUG
dispatcher.MultilingualItemResolver - Found some file extensions to
look at; they are [Ljava.lang.Object;@13ce671
2004-03-25 18:29:53,595 [004-1] DEBUG
dispatcher.MultilingualItemResolver - File name resolved to en
2004-03-25 18:29:53,595 [004-1] DEBUG
dispatcher.MultilingualItemResolver - File language resolved to null
2004-03-25 18:29:53,600 [004-1] DEBUG
dispatcher.MultilingualItemResolver - I expected to get a content
bundle; I got null
2004-03-25 18:29:53,600 [004-1] DEBUG
dispatcher.MultilingualItemResolver - Resolved URL '/.en' to item null
2004-03-25 18:29:53,615 [queue] ERROR publishToFile.QueueManager -
PublishToFileException.  itemId=45005 task=publish for item
45005(parent 45006) on host goodeats.boston.redhat.com:9004
destination=null failCount=0 error=woohoo: Bad response code 404 when
reading
http://goodeats.boston.redhat.com:9004/ccm/content/.en?templateContext=public
com.arsdigita.cms.publishToFile.PublishToFileException: woohoo: Bad
response code 404 when reading
http://goodeats.boston.redhat.com:9004/ccm/content/.en?templateContext=public
        at
com.arsdigita.cms.publishToFile.HttpHTMLProvider.fetchHTML(HttpHTMLProvider.java:77)
        at
com.arsdigita.cms.publishToFile.PublishToFile.readHTML(PublishToFile.java:451)
        at
com.arsdigita.cms.publishToFile.PublishToFile.publishPage(PublishToFile.java:395)
        at
com.arsdigita.cms.publishToFile.PublishToFile.publish(PublishToFile.java:331)
        at
com.arsdigita.cms.publishToFile.PublishToFile.doTask(PublishToFile.java:221)
        at
com.arsdigita.cms.publishToFile.QueueManager.processQueueItemsInternal(QueueManager.java:552)
        at
com.arsdigita.cms.publishToFile.QueueManager.processQueueItems(QueueManager.java:499)
        at
com.arsdigita.cms.publishToFile.QueueManager.run(QueueManager.java:463)
        at java.lang.Thread.run(Thread.java:534)
 


Comment 2 Jon Orris 2004-03-25 23:58:22 UTC
THis is the query executed for getPathInfo(true)

2004-03-25 18:55:14,744 [004-2] INFO  rdbms.RDBMSEngine - Executing
query(sort(filter(this = all(com.arsdigita.cms.ContentItem), sql
{this.ancestors in :ancestors}), sql {this.ancestors}), this_id0 =
this.id, this_objectType1 = this.objectType, this_displayName2 =
this.displayName, this_defaultDomainClass3 = this.defaultDomainClass,
this_isDeleted4 = this.isDeleted, this_version5 = this.version,
this_name6 = this.name, this_language7 = this.language,
this_ancestors8 = this.ancestors)
2004-03-25 18:55:14,747 [004-2] INFO  rdbms.RDBMSEngine - select
t0.item_id as "this_id0",
       t22.object_type as "this_objectType1",
       t22.display_name as "this_displayName2",
       t22.default_domain_class as "this_defaultDomainClass3",
       t37.is_deleted as "this_isDeleted4",
       t0.version as "this_version5",
       t0.name as "this_name6",
       t0.language as "this_language7",
       t0.ancestors as "this_ancestors8"
from cms_items t0
join acs_objects t22 on t0.item_id = t22.object_id
join vc_objects t37 on t0.item_id = t37.object_id
where t0.ancestors in (?)
order by t0.ancestors
2004-03-25 18:55:14,748 [004-2] INFO  rdbms.RDBMSEngine - [28021/]
2004-03-25 18:55:14,748 [004-2] INFO  rdbms.RDBMSEngine - [VARCHAR]
2004-03-25 18:55:14,748 [004-2] INFO  rdbms.RDBMSEngine - {}

Note, this does return one row, which is ignored in the code; only the
subsequent ones are used, but none exist.
 this_id0 |     this_objectType1     | this_displayName2 |
this_defaultDomainClass3 | this_isDeleted4 | this_version5 |
this_name6 | this_language7 | this_ancestors8
----------+--------------------------+-------------------+--------------------------+-----------------+---------------+------------+----------------+-----------------
    28021 | com.arsdigita.cms.Folder | Root Folder       |
com.arsdigita.cms.Folder | 0               | live          | /       
  |                | 28021/
(1 row)
 



Comment 3 Jon Orris 2004-03-26 00:08:54 UTC
Oops. That was for the folder, not the bundle.

2004-03-25 19:05:04,917 [queue] WARN  cms.ContentItem - Getting
pathNoJsp for item [com.arsdigita.cms.ContentBundle:{id=50006}]

2004-03-25 19:05:04,918 [queue] INFO  rdbms.RDBMSEngine - Executing
query(filter(this = all(com.arsdigita.cms.ContentItem), this.id ==
50006), this_id0 = this.id, this_objectType1 = this.objectType,
this_displayName2 = this.displayName, this_defaultDomainClass3 =
this.defaultDomainClass, this_isDeleted4 = this.isDeleted,
this_version5 = this.version, this_name6 = this.name, this_language7 =
this.language, this_ancestors8 = this.ancestors)
2004-03-25 19:05:04,921 [queue] INFO  rdbms.RDBMSEngine - select
t0.item_id as "this_id0",
       t10.object_type as "this_objectType1",
       t10.display_name as "this_displayName2",
       t10.default_domain_class as "this_defaultDomainClass3",
       t25.is_deleted as "this_isDeleted4",
       t0.version as "this_version5",
       t0.name as "this_name6",
       t0.language as "this_language7",
       t0.ancestors as "this_ancestors8"
from cms_items t0
join acs_objects t10 on t0.item_id = t10.object_id
join vc_objects t25 on t0.item_id = t25.object_id
where t0.item_id = ?
2004-03-25 19:05:04,921 [queue] INFO  rdbms.RDBMSEngine - [50006]
2004-03-25 19:05:04,922 [queue] INFO  rdbms.RDBMSEngine - [NUMERIC]
2004-03-25 19:05:04,922 [queue] INFO  rdbms.RDBMSEngine - {}


upgrade=# select t0.item_id as "this_id0",
upgrade-#        t10.object_type as "this_objectType1",
upgrade-#        t10.display_name as "this_displayName2",
upgrade-#        t10.default_domain_class as "this_defaultDomainClass3",
upgrade-#        t25.is_deleted as "this_isDeleted4",
upgrade-#        t0.version as "this_version5",
upgrade-#        t0.name as "this_name6",
upgrade-#        t0.language as "this_language7",
upgrade-#        t0.ancestors as "this_ancestors8"
upgrade-# from cms_items t0
upgrade-# join acs_objects t10 on t0.item_id = t10.object_id
upgrade-# join vc_objects t25 on t0.item_id = t25.object_id
upgrade-# where t0.item_id = 50006
upgrade-# ;
 this_id0 |        this_objectType1         | this_displayName2 |   
this_defaultDomainClass3     | this_isDeleted4 | this_version5 |
this_name6 | this_language7 | this_a ncestors8
----------+---------------------------------+-------------------+---------------------------------+-----------------+---------------+------------+----------------+-------
----------
    50006 | com.arsdigita.cms.ContentBundle | p2fs-test         |
com.arsdigita.cms.ContentBundle | 0               | live          |
p2fs-test  |                |
(1 row)
 

upgrade=# select * from cms_items where name like '%p2fs%';
 item_id | parent_id |   name    | type_id | version | language |
section_id | ancestors | master_id
---------+-----------+-----------+---------+---------+----------+------------+-----------+-----------
   40012 |     11014 | p2fs-test |   12001 | draft   |          |    
 11018 |           |
   50006 |     28021 | p2fs-test |   12001 | live    |          |    
 11018 |           |     40012
   50005 |     50006 | p2fs-test |   12001 | live    | en       |    
 11018 |           |     40011
   40011 |     40012 | p2fs-test |   12001 | draft   | en       |    
 11018 |           |
(4 rows)



Comment 4 Jon Orris 2004-03-26 00:10:03 UTC
Looking at cms_items, none of the newly published items have ancestors
set:
upgrade=# select * from cms_items;
 item_id | parent_id |                  name                   |
type_id | version | language | section_id |           ancestors      
     | master_id
---------+-----------+-----------------------------------------+---------+---------+----------+------------+--------------------------------+-----------
   11017 |           | templates                               |     
   | draft   |          |            | 11017/                         |
   16011 |           | templates                               |     
   | draft   |          |            | 16011/                         |
   16008 |           | /                                       |     
   | draft   |          |      16012 | 16008/                         |
   19015 |     11014 | first                                   |  
12001 | draft   |          |      11018 | 11014/19015/                   |
   11014 |           | /                                       |     
   | draft   |          |      11018 | 11014/                         |
   29002 |     11014 | upgrade-item-one                        |  
26008 | draft   |          |      11018 | 11014/29002/                   |
   29003 |     11014 | folder                                  |     
   | draft   |          |      11018 | 11014/29003/                   |
   27009 |     29003 | folder-article                          |  
12001 | draft   |          |      11018 | 11014/29003/27009/             |
   32005 |     18014 | first_text_18014                        |     
   | draft   |          |            | 19015/18014/32005/             |
   25011 |           | upgrade-item-two/001_star_butterfly.png |     
   | draft   |          |            | 25011/                         |
   28007 |           | 001_star_butterfly.png                  |     
   | draft   |          |            | 28007/                         |
   28008 |           | first/001_star_butterfly.png            |     
   | draft   |          |            | 28008/                         |
   24015 |           | Misconceptions.pdf                      |     
   | draft   |          |            | 24015/                         |
   30004 |     28006 | upgrade-item-two_text_28006             |     
   | draft   |          |            | 31004/28006/30004/             |
   27014 |           | AUT_1963.jpg                            |     
   | draft   |          |            | 27014/                         |
   31005 |     30002 | upgrade-item-one_text_30002             |     
   | draft   |          |            | 29002/30002/31005/             |
   28010 |     26010 | upgrade-item-two_text_28006             |     
   | draft   |          |            | 11014/29003/31004/26010/28010/ |
   28011 |           | upgrade-item-two/001_star_butterfly.png |     
   | draft   |          |            | 28011/                         |
   26010 |     31004 | upgrade-item-two                        |  
26008 | draft   | es       |      11018 | 11014/29003/31004/26010/       |
   31004 |     29003 | upgrade-item-two                        |  
26008 | draft   |          |      11018 | 11014/29003/31004/             |
   28021 |           | /                                       |     
   | live    |          |      11018 | 28021/                        
|     11014
   28020 |     28021 | folder                                  |     
   | live    |          |      11018 | 28021/28020/                  
|     29003
   28019 |     28020 | upgrade-item-two                        |  
26008 | live    |          |      11018 | 28021/28020/28019/         
   |     31004
   28006 |     31004 | upgrade-item-two                        |  
26008 | draft   | en       |      11018 | 31004/28006/                   |
   28022 |     28018 | upgrade-item-two_text_28006             |     
   | live    |          |            | 28021/28020/28019/28018/28022/
|     30004
   28023 |           | upgrade-item-two/001_star_butterfly.png |     
   | live    |          |            | 28023/                        
|     25011
   28018 |     28019 | upgrade-item-two                        |  
26008 | live    | en       |      11018 | 28021/28020/28019/28018/   
   |     28006
   28026 |           | AUT_1963.jpg                            |     
   | live    |          |            | 28026/                        
|     27014
   28024 |           | 001_star_butterfly.png                  |     
   | live    |          |            | 28024/                        
|     28007
   24020 |     28021 | first                                   |  
12001 | live    |          |      11018 | 28021/24020/               
   |     19015
   18014 |     19015 | first                                   |  
12001 | draft   | en       |      11018 | 19015/18014/                   |
   24019 |           | Misconceptions.pdf                      |     
   | live    |          |            | 24019/                        
|     24015
   24021 |     24018 | first_text_18014                        |     
   | live    |          |            | 28021/24020/24018/24021/      
|     32005
   24022 |           | first/001_star_butterfly.png            |     
   | live    |          |            | 24022/                        
|     28008
   24018 |     24020 | first                                   |  
12001 | live    | en       |      11018 | 28021/24020/24018/         
   |     18014
   37001 |           | harrieteat.jpg                          |     
   | draft   |          |            |                                |
   37002 |           | second/harrieteat.jpg                   |     
   | draft   |          |            |                                |
   27015 |     25010 | second_text_25010                       |     
   | draft   |          |            | 28001/25010/27015/             |
   28001 |     11014 | second                                  |  
12001 | draft   |          |      11018 | 11014/28001/                   |
   36003 |           | MyPortal.xml                            |     
   | draft   |          |            |                                |
   37003 |           | upgrade-item-one/001_star_butterfly.png |     
   | draft   |          |            |                                |
   37004 |           | cw-create.sql                           |     
   | draft   |          |            |                                |
   39001 |           | harrieteat.jpg                          |     
   | draft   |          |            |                                |
   37005 |     26009 | folder-article_text_26009               |     
   | draft   |          |            |                                |
   41012 |           | harrieteat.jpg                          |     
   | live    |          |            |                               
|     37001
   41011 |           | second/harrieteat.jpg                   |     
   | live    |          |            |                               
|     37002
   41009 |     41008 | second_text_25010                       |     
   | live    |          |            |                               
|     27015
   41013 |           | MyPortal.xml                            |     
   | live    |          |            |                               
|     36003
   41010 |     28021 | second                                  |  
12001 | live    |          |      11018 |                            
   |     28001
   41008 |     41010 | second                                  |  
12001 | live    | en       |      11018 |                            
   |     25010
   25010 |     28001 | second                                  |  
12001 | draft   | en       |      11018 | 28001/25010/                   |
   41020 |     41019 | folder-article_text_26009               |     
   | live    |          |            |                               
|     37005
   41021 |     28020 | folder-article                          |  
12001 | live    |          |      11018 |                            
   |     27009
   41019 |     41021 | folder-article                          |  
12001 | live    | en       |      11018 |                            
   |     26009
   26009 |     27009 | folder-article                          |  
12001 | draft   | en       |      11018 | 27009/26009/                   |
   36009 |           | upgrade-item-one/001_star_butterfly.png |     
   | live    |          |            |                               
|     37003
   36007 |     36006 | upgrade-item-one_text_30002             |     
   | live    |          |            |                               
|     31005
   36010 |           | cw-create.sql                           |     
   | live    |          |            |                               
|     37004
   36008 |     28021 | upgrade-item-one                        |  
26008 | live    |          |      11018 |                            
   |     29002
   36006 |     36008 | upgrade-item-one                        |  
26008 | live    | en       |      11018 |                            
   |     30002
   30002 |     29002 | upgrade-item-one                        |  
26008 | draft   | en       |      11018 | 29002/30002/                   |
   40012 |     11014 | p2fs-test                               |  
12001 | draft   |          |      11018 |                                |
   50006 |     28021 | p2fs-test                               |  
12001 | live    |          |      11018 |                            
   |     40012
   50005 |     50006 | p2fs-test                               |  
12001 | live    | en       |      11018 |                            
   |     40011
   40011 |     40012 | p2fs-test                               |  
12001 | draft   | en       |      11018 |                                |


Comment 5 Justin Ross 2004-03-26 20:47:00 UTC
Perforce change 41832 fixes the ancestors trigger for postgres.

Comment 6 Jon Orris 2004-03-29 21:48:10 UTC
Fixed


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