Bug 113122 - Application#retrieveAllApplications() also returns instances of c.a.kernel.Resource which aren't Applications
Summary: Application#retrieveAllApplications() also returns instances of c.a.kernel.Re...
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other   
(Show other bugs)
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Justin Ross
QA Contact: Jon Orris
URL:
Whiteboard:
Keywords:
: 113629 (view as bug list)
Depends On:
Blocks: 106481
TreeView+ depends on / blocked
 
Reported: 2004-01-08 17:36 UTC by Daniel Berrange
Modified: 2007-04-18 17:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-26 22:28:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Daniel Berrange 2004-01-08 17:36:25 UTC
Description of problem:
The Application#retrieveAllApplications() returns a collection of
Application instances. Except that, because it uses the same database
table as the c.a.kernel.Resource class, it also includes instances of
objects which are not Applications, eg Portals & Portlets. This causes
an Assertion to fail in the ApplicationCollection class. For example:

        ApplicationCollection apps = 
            Application.retrieveAllApplications();
        
        while (apps.next()) {
            Application app = apps.getApplication();
            ... do stuff ...
        }

Results in:

com.arsdigita.util.AssertionError: Value of application is null.
        at com.arsdigita.util.Assert.error(Assert.java:532)
        at com.arsdigita.util.Assert.assertTrue(Assert.java:372)
        at com.arsdigita.util.Assert.assertNotNull(Assert.java:396)
        at
com.arsdigita.web.ApplicationCollection.getApplication(ApplicationCollection.java:99)
        at
com.arsdigita.london.util.cmd.SiteMapList.doRun(SiteMapList.java:39)
        at com.arsdigita.london.util.Program.run(Program.java:221)
        at
com.arsdigita.london.util.cmd.SiteMapList.main(SiteMapList.java:56)
Error: Value of application is null.

When it hits the first non-Application object.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Vadim Nasardinov 2004-01-15 23:15:04 UTC
*** Bug 113629 has been marked as a duplicate of this bug. ***

Comment 2 Justin Ross 2004-01-22 22:06:13 UTC
Fixed in perforce change 39647.


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