Bug 113629

Summary: Application.retrieveAllApplications() blows up in the presence of Portal Server + Forum
Product: [Retired] Red Hat Web Application Framework Reporter: Vadim Nasardinov <vnasardinov>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED DUPLICATE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightlyCC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:00:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vadim Nasardinov 2004-01-15 22:39:05 UTC
See bug 113615 for details of my current setup.

The following code dies with an assertion error:

    ApplicationCollection apps = Application.retrieveAllApplications();

    while (apps.next()) {
        Application app = apps.getApplication();
    }

The assertion error looks like so:

java.lang.IllegalStateException: Value of application is null.
        at com.arsdigita.util.Assert.assertTrue(Assert.java:374)
        at com.arsdigita.util.Assert.assertNotNull(Assert.java:396)
        at com.arsdigita.web.ApplicationCollection.getApplication(ApplicationCollection.java:99)


From talking to Justin, my understanding is that the APPLICATIONS
table is used for storing things that are not necessarily
applications.  For these rows,
Application#retrieveApplication(DataObject) returns null.

Here's what I currently have in my APPLICATIONS table:
 

select
  application_id, ap.title as ap_title, apt.title as apt_title, workspace_application_p
from
  applications as ap
inner join 
  application_types as apt
on
  (ap.application_type_id = apt.application_type_id)
order by
  ap.application_id;

 application_id |         ap_title         |             apt_title             | workspace_application_p 
----------------+--------------------------+-----------------------------------+-------------------------
           1021 | content                  | CMS Content Section               | f
           2006 | forms                    | CMS Content Section               | f
           6015 | Administration           | Portal                            | f
           6024 | Site Administration      | Portal Server Site Administration | f
           6030 | Personal Portal Creator  | Personal Portal Creator           | f
           7004 | Create Top-Level Portals | Portal Creator                    | f
           7010 | Portal Site Map          | Portal Site Map                   | f
           8003 | Personal Portal          | Personal Portal                   | f
          12009 | Forums                   | Discussion Forum Application      | t
          15003 | Tab One                  | PortalTab                         | 
          15004 | V Forum                  | Discussion Forum Application      | t
          15016 | Recent V Forum Postings  | Recent Forum Postings             | t
          20003 | Tab two                  | PortalTab                         | 
          20004 | M Forum                  | Discussion Forum Application      | t
(14 rows)

Comment 1 Vadim Nasardinov 2004-01-15 22:59:27 UTC
To be more specific, to replicate this bug, p4 sync to 39425.

Login as a site-wide admin, go to your personal portal, click on
"Configure portal", click on "Layout", add a "Tab", choose "Recent
Forum Postings" from the list of available portlets, click "Go".  On
the next page, select the radio button that says "I want to create a
new discussion forum application to display in the portlet." Click
"Next". On the next page, enter a title and description.  Click
"Next".  Get the following stack trace:


-*-*-*- Section: Stack trace -*-*-*-
java.lang.IllegalStateException: Value of application is null.
        at com.arsdigita.util.Assert.assertTrue(Assert.java:374)
        at com.arsdigita.util.Assert.assertNotNull(Assert.java:396)
        at com.arsdigita.web.ApplicationCollection.getApplication(ApplicationCollection.java:99)
        at com.arsdigita.web.BaseDispatcher$Cache.refresh(BaseDispatcher.java:337)
        at com.arsdigita.web.PathMapCache$2.afterCommit(PathMapCache.java:146)
        at com.arsdigita.persistence.TransactionContext.fireCommitEvent(TransactionContext.java:200)
        at com.arsdigita.persistence.TransactionContext.commitTxn(TransactionContext.java:93)
        at com.arsdigita.kernel.DatabaseTransaction.commit(DatabaseTransaction.java:75)
        at com.arsdigita.kernel.DatabaseTransaction.end(DatabaseTransaction.java:63)
        at com.arsdigita.bebop.page.PageTransformer.endTransaction(PageTransformer.java:381)
        at com.arsdigita.bebop.page.PageTransformer.servePage(PageTransformer.java:269)
        at com.arsdigita.bebop.page.PageTransformer.servePage(PageTransformer.java:212)
        at com.arsdigita.bebop.page.PageDispatcher.dispatch(PageDispatcher.java:80)
        at com.arsdigita.portalserver.personal.PersonalPortalDispatcher.dispatch(PersonalPortalDispatcher.java:87)
        at com.arsdigita.web.LegacyAdapterServlet.doService(LegacyAdapterServlet.java:116)
        at com.arsdigita.web.BaseApplicationServlet$1.excurse(BaseApplicationServlet.java:111)
        at com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
        at com.arsdigita.web.BaseApplicationServlet.doService(BaseApplicationServlet.java:105)
        at com.arsdigita.web.BaseServlet$1.excurse(BaseServlet.java:176)
        at com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
        at com.arsdigita.web.BaseServlet.internalService(BaseServlet.java:147)
        at com.arsdigita.web.BaseServlet.doPost(BaseServlet.java:291)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
        at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
        at com.caucho.server.http.Invocation.service(Invocation.java:312)
        at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:213)
        at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:100)
        at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:77)
        at com.arsdigita.web.BaseDispatcher.forward(BaseDispatcher.java:201)
        at com.arsdigita.web.BaseDispatcher.forward(BaseDispatcher.java:185)
        at com.arsdigita.web.BaseDispatcher.dispatch(BaseDispatcher.java:132)
        at com.arsdigita.web.DispatcherServlet.doService(DispatcherServlet.java:123)
        at com.arsdigita.web.BaseServlet$1.excurse(BaseServlet.java:176)
        at com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
        at com.arsdigita.web.BaseServlet.internalService(BaseServlet.java:147)
        at com.arsdigita.web.BaseServlet.doPost(BaseServlet.java:291)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
        at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
        at com.caucho.server.http.Invocation.service(Invocation.java:312)
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
        at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
        at java.lang.Thread.run(Thread.java:479)


Comment 2 Richard Li 2004-01-15 23:10:36 UTC
is this related to bug 113122?

Comment 3 Vadim Nasardinov 2004-01-15 23:15:02 UTC

*** This bug has been marked as a duplicate of 113122 ***

Comment 4 Red Hat Bugzilla 2006-02-21 19:00:46 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.