Improve company productivity with a Business Account.Sign Up


Netscape says "Document Contains No Data"

Posted on 1998-05-07
Medium Priority
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.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


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 140 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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.

606 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