Netscape says "Document Contains No Data"

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.

HELP!!!!!

Code follows:

import oracle.html.*;
import java.util.*;
import java.io.*;
import java.lang.*;
import oracle.owas.wrb.services.http.*;
// 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
sions.
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);
  hp.setBackgroundImage("/ows-img/stone_tile.jpg");
  bd.setUnfollowedLinkColor("#cc0000");
  bd.setActivatedLinkColor("#ff3300");
  bd.setFollowedLinkColor("#000055");
 
 
  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
    try
    {
    Connection conn =
      DriverManager.getConnection ("jdbc:oracle:oci7:@hosd010a_GLOBAL",
"UNIX_INV", "UNIX_INV");
      Statement connect_one = conn.createStatement ();
      ResultSet  rowTotal = connect_one.executeQuery ("select count(*) f
rom SEO_MACHINES");
      rowTotal.next ();
        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
HINES");
    String [][] machines = new String[num_rows][14];
 
    int count = 0;
 
    while(tabRows.next ())
    {
      for(int j=0; j < 14; j++)
      machines[count][j] = (tabRows.getString (j+1));
      count++;
    }
 
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++)
  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++)
  tab.addRow(rows[i]);
bd.addItem(tab);
 
    rowTotal.close();
    tabRows.close();
    connect_one.close();
    connect_two.close();
    conn.close();
    }
    catch (SQLException ex)
    {
      hp.getBody().addItem("SQLException: " + ex.getMessage());
      hp.printHeader();
      hp.print();
      return;
    }
 
bd.addItem(SimpleItem.Paragraph)
  .addItem(SimpleItem.HorizontalRule)
  .addItem(SimpleItem.Paragraph);
hp.printHeader();
hp.print();
  }
}
LanaNelsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jpk041897Commented:
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.
0
ggmgCommented:
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...
0
aziz061097Commented:
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.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

LanaNelsonAuthor Commented:
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
0
evijayCommented:
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

0
evijayCommented:
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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LanaNelsonAuthor Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

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.