Netscape says "Document Contains No Data"

Posted on 1998-05-07
Last Modified: 2010-04-16
Using Oracle WebServer Java Cartridge

Using JavaCacheTimeout = 0

I am selecting a table of 14 columns by 110 rows into an
Oracle.html table.  I can display this once.  If I click
on the reload button, I get a Netscape panel that says
"Document Contains No Data."  If I wait 10 or 15 minutes
before I click "Reload," I can re-display the table.


Code follows:

import oracle.html.*;
import java.util.*;
import java.lang.*;
// You need to import the java.sql package to use JDBC
import java.sql.*;
// You need to import oacle.jdbc.driver in order to use the oracle exten
import oracle.jdbc.driver.*;
class mach
  public static void main (String args [])
       throws SQLException, ClassNotFoundException
  HtmlHead hd = new HtmlHead();
  HtmlBody bd = new HtmlBody();
  HtmlPage hp = new HtmlPage(hd, bd);
  bd.addItem(new banner("SEO Computer Inventory Table:  SEO_MACHINES"));
    // Load the Oracle JDBC driver
      DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver(
    // Connect to the database
    Connection conn =
      DriverManager.getConnection ("jdbc:oracle:oci7:@hosd010a_GLOBAL",
      Statement connect_one = conn.createStatement ();
      ResultSet  rowTotal = connect_one.executeQuery ("select count(*) f
rom SEO_MACHINES"); ();
        int num_rows = (int)(rowTotal.getInt (1));
    ((OracleConnection)conn).setDefaultRowPrefetch (30);
    Statement connect_two = conn.createStatement ();
    ResultSet tabRows = connect_two.executeQuery ("select * from SEO_MAC
    String [][] machines = new String[num_rows][14];
    int count = 0;
    while( ())
      for(int j=0; j < 14; j++)
      machines[count][j] = (tabRows.getString (j+1));
DynamicTable tab = new DynamicTable(14);
TableRow rows[] = new TableRow[num_rows];
for(int i=0; i < num_rows; i++)
  rows[i] = new TableRow();
for(int i=0; i < num_rows; i++)
  .addCell(new TableDataCell(new SimpleItem(machines[i][0]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][1]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][2]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][3]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][4]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][5]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][6]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][7]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][8]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][9]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][10]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][11]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][12]).setBold()))
  .addCell(new TableDataCell(new SimpleItem(machines[i][13]).setBold()))
for(int i=0; i < num_rows; i++)
    catch (SQLException ex)
      hp.getBody().addItem("SQLException: " + ex.getMessage());
Question by:LanaNelson

Expert Comment

ID: 1220740
Document contains no data is a meesage sent by a server that is invoking a CGI.

Apperently, your HTML page is using the GET method to send data to a CGI in Java. As a result of this and sincwe GET uses environment variables, when you hit reload the data no longer exists in the environment variables.

See if you can change the invocation in your web page form to POST.

Expert Comment

ID: 1220741
It's nothing to do with the code, it's a Netscape thing. Common problem for documents that have large tables with oodles of data, especially on a slow network (we know that for a fact, particulary reload goof) and older editions of Navigator (might also appear on newer)

Solution ? Sorry... but if somebody knows how to deal with this Netscape "feature" sure tell me...

Expert Comment

ID: 1220742
Do you have the JDK1.1 patch for Netscape ? You should download that before you try to run java in this browser. If you have already done so , do you have any way to check the HTTP header being formed for this data ? If the HTTP header is being created using some outputStream then check what exactly is being sent . I had observed such problems when the Header was not formed correctly.

The header includes "Content-type" etc. etc.
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.


Author Comment

ID: 1220743
My web page offers 7 tables to be displayed.  My 7 java application programs are all identical except that they fetch and display different amounts of data. (The tables are different sizes).  Five of these tables are fairly small.  Two of these
tables are large.  I have little or no trouble with the small
tables. (I can re-execute or reload these small ones many times before I will get a "Document contains no data error.") I have a lot of trouble with the larger tables.  I can only display them once or sometimes not at all.  Time is also a factor.  I can get this error message, wait 10 0r 15 minutes, try again and get a successful display.  I sometimes get "SQLException:null" message
in the browser although the table has data and the java program always works correctly in the unix invironment i.e. it build an
HTML with database data in it.

HTTP solution:  If the problem lies in GET or POST method, it would affect all the tables all the time.  Please let me know if I am wrong about this.  

NETSCAPE solution:  In response to the suggestion from aziz, I tried to display in Netscape 4.5 and got the same problem.  I tried also in the lastest version of the HotJava Browser.  I didn't get a error msg but the display was blank.

QUESTION:  There must be something wrong with the Oracle WebServer Java Cartridge.  I have JavaCacheTimeout set to 0.
Shouldn't that make each application start fresh each time?  Does
the Java Cartridge buffer the data it extracts from the database?  Does anyone know how that works?  The documentation says that the cartridge comes with a java interpreter.  Does this mean that the java interpreter I run in unix from the JDK may not be the same interpreter that gets run by the java cartridge of the Webserver?

Thanks for your help!

Lana Nelson

Expert Comment

ID: 1220744
This is a problem with the oracle web application server. not with any other thing such as cgi etc.,.
Sometimes, due to some bug in app server or other thing, your webserver may fail to locate your java application component and hence it may break the connection to the http web server and hence the browser. When you click the reload button, it may now be able to locate your java program and execute and produce result. Contact oracle support for this


Accepted Solution

evijay earned 70 total points
ID: 1220745
This is a problem with the oracle web application server. not with any other thing such as cgi etc.,.
              Sometimes, due to some bug in app server or other thing, your webserver may fail to locate your java application component
              and hence it may break the connection to the http web server and hence the browser. When you click the reload button, it may
              now be able to locate your java program and execute and produce result. Contact oracle support for this

Author Comment

ID: 1220746
None of the answers provided solutions for the problem.  I have
finally solved the problem myself.  We upgraded from Oracle
Webserver 3.0 to 3.0.1 and the new documentation lists parameters
C_STACK (java interp flag -ss) , JAVA_STACK ( flag -oss),
INITIAL_HEAP (flag -ms), MAX_HEAP (-mx).
I set all the parameters to 35M (INITIAL_HEAP to 10M).  I now get
data instead of "No Data Found" messages.  If anyone has any
suggestions on good settings for these parameters, I would like
to hear from them.  The Oracle documentation is skimpy about
these parameters, I would welcome any descriptive info anyone
could offer.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to see all occupied ports on windows 10 laptop 15 77
servlet web applications   metadata-complete="true" or false 3 132
runtime exception 2 42
going to wrong jsp page 2 34
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question