incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Millman" <mark.mill...@mizar.com>
Subject Too many components
Date Wed, 17 May 2006 16:37:51 GMT
The following describes a problem I am having using Oracle ADF as
shipped with the JDevStudio final release 10.1.3.0.4.  I've posted the
problem to the Oracle JDeveloper Forum and got an immediate show of
interest from Oracle but nothing since then in terms of a clue as to
whether this is a solvable problem or not.  From the feed back I've
received on the Oracle Forum it seems that I am not the only one having
this problem.

In a nutshell, my page has finally gotten so complex that the stack
overflows and the application just aborts. I can remove a couple of
components and the page works fine. It doesn't seem to matter which
components I remove; when I navigate to the page the following appears
in my Embedded OC4J Server log.

Debugger connection to debuggee process has been lost. 
Process exited.
Debugger disconnected from local process.

The _MyPage_jspx.java file is over 500K and the class file is about
110K. If I remove some components and get the total _MyPage_jspx.java
file under 500K then the page works again.

The page includes a lot of application controls and a number of tables
that are used to display and edit attribute data. Most of these tables
include nested tables inside of their detailStamps. Rows in a table of
streets have tables of sites. This is where things start to fail.

Sometimes (but not always) I get a message that tells me that could not
find the StackOverflowError class so I have tried adding a -Xss1024k
option to my Java options but this didn't help; neither did -Xss2048k.

I am confident that the problem is not caused by the code itself as I
can remove any panelGroup or panelForm set on the page and it works. I
put any back and it fails. It is just too many components. Everything
compiles fine but JDeveloper just disconnects from the application when
the page is opened.

The following is some simple JSP code that demonstrates the problem.

Include-0.jspf

<af:panelBox text="Bottom include file has 3 panelForms" >  
  <af:panelHorizontal>    
    <af:panelForm rows="1" maxColumns="1">      
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." />   
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      </af:panelForm>    
    <af:panelForm rows="1" maxColumns="1">      
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." />   
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      </af:panelForm> 
    <af:panelForm rows="1" maxColumns="1">      
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." />   
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      <af:inputText label="Lorem ipsum" rows="3" wrap="true"
readOnly="true"
                    value="Proin orci. Suspendisse cursus lobortis
magna. Vivamus id tortor. Phasellus consectetuer, quam sit amet laoreet
ultrices, tortor leo aliquet turpis." /> 
      </af:panelForm> 
  </af:panelHorizontal>
</af:panelBox>


I included this in another jspf file

Include-1.jspf

<af:panelBox text="Include-1.jspf includes Include-0.jspf 5 times.">  
  <jsp:directive.include file="/Include-0.jspf" />  
  <jsp:directive.include file="/Include-0.jspf" />  
  <jsp:directive.include file="/Include-0.jspf" />  
  <jsp:directive.include file="/Include-0.jspf" />  
  <jsp:directive.include file="/Include-0.jspf" /> </af:panelBox>


I include that in another jspf

Include-2.jspf

<af:panelBox text="Include-2.jspf includes Include-1.jspf 5 times.">  
  <jsp:directive.include file="/Include-1.jspf" />
  <jsp:directive.include file="/Include-1.jspf" />
  <jsp:directive.include file="/Include-1.jspf" />
  <jsp:directive.include file="/Include-1.jspf" />
  <jsp:directive.include file="/Include-1.jspf" /> </af:panelBox>


And that is referenced by my jspx page.

TooManyComponents.jspx

<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces"
xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
  <jsp:text>    
    <![CDATA[ ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ]]>  
  </jsp:text>  
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>  
  <f:view>
    <afh:script source="/jscript/view_tools.js"/>
    <af:document rendered="false">
      <af:form id="notloggedin">
        <af:panelPage title="This never happens but it mirrors my
problem layour">
          <jsp:directive.include file="header.jspf"/>
          <af:commandMenuItem text="You are not logged in.  Please click
this message to be re-directed to the Login Page" action="login"/>
        </af:panelPage>
      </af:form>
    </af:document>
    <af:document rendered="true">
      <af:form id="loggedin">
        <af:panelPage title="Too much of a good thing?">
          <jsp:directive.include file="/header.jspf"/>
          <jsp:directive.include file="/Include-2.jspf" />
        </af:panelPage>
      </af:form>
    </af:document>
  </f:view>
</jsp:root>


This particular setup yeilded me the following error

Fatal error: Cannot find class java/lang/StackOverflowErrorProcess
exited.Debugger disconnected from local process.


If I put a second 
 <jsp:directive.include file="/Include-2.jspf" /> 
in my jspx file I get the following compile time error.

Error: code segment of method
_jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse) too large


If I remove one of the jsp:include directives from my Include-1.jspf so
that it reads as follows the application works.

<af:panelBox text="Include-1.jspf includes Include-0.jspf 4 times.">
  <jsp:directive.include file="/Include-0.jspf" />
  <jsp:directive.include file="/Include-0.jspf" />
  <jsp:directive.include file="/Include-0.jspf" />
  <jsp:directive.include file="/Include-0.jspf" /> </af:panelBox>

I took all the JDeveloperStudio defaults for creating this test project.

Mark Millman



Mime
View raw message