ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/trb/trbpgdisplayprob2.htm

313 lines
17 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Troubleshoot: Starting applications</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h3><a name="trbpgdisplayprob2"></a>Troubleshoot: Starting applications</h3>
<p>What kind of errors do you see when you start an application?</p>
<ul>
<li><a href="#plugin"> HTTP server and Application
Server are working separately, but requests are not passing from HTTP server
to Application Server</a></li>
<li><a href="#staticfiles">File serving problems</a></li>
<li><a href="#noimg">Graphics do not appear on
the JavaServer Pages (JSP) file or servlet output</a></li>
<li><a href="#jspcompile">SRVE0026E: [Servlet
Error]-[Unable to compile class for JSP error on JSP]</a></li>
<li><a href="#nojspchg">After
modifying and saving a JSP file, the change does not show up in the browser
(the old JSP file displays)</a></li>
<li><a href="#jspattrpage">Message similar to
&quot;Message: /jspname.jsp(9,0) Include: Mandatory attribute page missing&quot; displays
when trying to access JSP file</a></li>
<li><a href="#nojspsrc">The
Java source generated from a JSP file is not retained in the temp directory
(only the class file is found)</a></li>
<li><a href="#batchcomfail">The JSP batch compiler
fails with the message &quot;Enterprise Application [application name you typed
in] not found&quot;</a></li>
<li><a href="#nonenglish">There is a translation
problem with non-English browser input</a></li>
<li><a href="#noscroll">Scroll bars do not appear
around items in the browser window</a></li>
<li><a href="#friendlyHTTP">A &quot;Page cannot be
displayed... server not found or DNS error&quot; error displays when attempting
to browse a Java Server Page (JSP) using Internet Explorer</a></li>
</ul>
<p><a name="plugin"></a><b>HTTP server and Application Server are working
separately, but requests are not passing from HTTP server to Application Server</b></p>
<p>If your HTTP server appears to be functioning correctly, and the application
server also works on its own, but browser requests sent to the HTTP server
for pages are not being served, a problem exists in the WebSphere Application
Server - Express plug-in.</p>
<p>Perform the following steps to determine the problem:</p>
<ol>
<li><p>Determine whether the HTTP server is attempting to serve the requested
resource itself, rather than forwarding it to WebSphere Application Server - Express.</p>
<ol type="a">
<li>Browse the HTTP server access log for IBM HTTP Server. It may indicate that it
could not find the file in the document root directory.</li>
<li>Browse the plug-in log file as described below.</li>
</ol>
</li>
<li>Refresh the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/config/cells/plugin-cfg.xml
file. This file determines what requests sent to the HTTP server are forwarded to the
WebSphere Application Server - Express and to what application server. To to refresh this file:
<ul>
<li>Start the administrative console.</li>
<li>In the topology tree, expand <STRONG>Environment</STRONG>.</li>
<li>Click <strong>Update WebSphere Plugin</strong>.</li>
<li>Stop and restart the HTTP server, and retry the Web request.</li>
</ul>
</li>
<li>Browse the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/logs/http_plugin.log file
for clues to the problem. Make sure the timestamps with the most recent plug-in
information stanza (which is printed when the plug-in is loaded), correspond
to the time the Web server started.</li>
<li>Turn on plug-in tracing. To turn on plug-in tracing, set the <samp>LogLevel</samp> attribute in the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/config/cells/plugin-cfg.xml file to <samp>Trace</samp> and reload the request. Browse the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/logs/http_plugin.log file.
You should be able to see the plug-in attempting to match the request URI
with the various URI definitions for the routes in the<samp> plugin-cfg.xml</samp>. Check what rules the plug-in is not matching against and then figure out
if you need to add additional ones. If you recently installed the application, you may
need to manually regenerate the plug-in configuration to pick up
the new URIs related to the new application.</li>
</ol>
<p><a name="staticfiles"></a><b>File serving problems</b></p>
<p>If text output appears on your JSP- or servlet-supported Web page, but image files do not appear, perform the following steps:</p>
<ul>
<li><P>Verify that your image files are in the the <strong>document root</strong> directory of your Web application. WebSphere Application Server - Express follows the J2EE standard,
which means that the document root is the <strong>Web_module_name</strong>.war directory
of your deployed Web application. Typically this directory will be found
in the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/installedApps/<em>cell_name</em>/
<em>application_name</em>.ear directory.</P>
<p>If the files are in a subdirectory of the document root, verify that there is a correct reference to the file. For example, if the invoices.html file
is stored in the Windows directory <strong>Web_module_name</strong>.war\invoices,
links from other pages in the Web application to display those files should be coded as
<samp>&quot;invoices\invoices.html&quot;</samp>, not <samp>&quot;invoices.html&quot;</samp>.</p></li>
<li>Verify that your Web application is configured to enable file serving
and is enabled to display static resources like image files and HTML files:
<ol>
<li>View the file serving property of the hosting Web module by browsing the source .war file. If necessary, update the property and redeploy the module.</li>
<li>Edit the <samp>fileServingEnabled</samp> property of the <samp>ibm-web-ext.xmi</samp> configuration file. This file is located at
/QIBM/UserData/WebASE51/ASE/<em>instance</em>/config/cells/<em>cell_name</em>/
applications/<em>application_name</em>/deployments/<em>application_name</em>/<em>Webmodule_name</em>/web-inf directory.</li>
</ol>
</li>
</ul>
<p><a name="noimg"></a><b>Graphics do not appear in the JSP file or servlet
output</b></p>
<p>If text output appears on your JSP- or -servlet-supported
Web page, but image files do not appear, perform the following steps:</p>
<ul>
<li><p>Verify that your graphic files are in the <strong>document
root</strong> directory of your Web application WebSphere Application Server - Express follows the J2EE standard, which means that the document root is
the<strong>Web_module_name</strong>.war directory
of your deployed Web application. Typically this directory is found in the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/installedApps/<em>cell_name</em>/<em>application_name</em>.ear directory.</p>
<p>If the graphics
files are in a subdirectory of the document root, verify that there is a correct reference to the file. For example, if the <samp>banner.gif</samp> file
is stored in the Windows directory <strong>Web_module_name</strong>.war/images,
the tag to display it should read: <samp>&lt;img SRC=&quot;images/banner.gif&quot;&gt;</samp>,
not <samp>&lt;img SRC=&quot;banner.gif&quot;&gt;</samp>.</p>
</li>
<li><p>Verify that your Web application is configured to enable file serving
and can display static resources like image and HTML files:</p>
<ol>
<li>View the file serving property
of the hosting Web module by browsing the source <samp>.war</samp> file. If necessary,
update the property and re-deploy the module.</li>
<li>Edit the <samp>fileServingEnabled</samp> property of the <samp>ibm-web-ext.xmi</samp> configuration file. This file is located at
/QIBM/UserData/WebASE51/ASE/<em>instance</em>/config/cells/<em>cell_name</em>/
applications/<em>application_name</em>/deployments/<em>application_name</em>/<em>Webmodule_name</em>/web-inf directory.</li>
<li>Start the administrative console.</li>
<li>In the topology tree, expand <strong>Environment</strong>.</li>
<li>Click <strong>Update WebSphere Plugin</strong>.</li>
<li>Stop and restart the HTTP server, and retry the Web request.</li>
</ol>
</li>
</ul>
<p><a name="jspcompile"></a><b>SRVE0026E: [Servlet Error]-[Unable to compile
class for JSP file </b></p>
<p>If this error appears in a browser when trying
to access a new or modified .jsp file for the first time,
the most likely cause is that the JSP file Java source failed (was incorrect)
during the <strong>javac</strong> compilation phase.</p>
<p>Check the SystemErr.log
file for a compiler error message. The SystemErr.log file is located at /QIBM/UserData/WebASE51/ASE/<em>instance</em>/logs/<em>node_name</em>/SystemErr.log. The compiler error message may be as follows:</p>
<pre>
C:\WASROOT\temp\ ... test.war\_myJsp.java:14: \
Duplicate variable declaration: int myInt was int myInt
int myInt = 122;
String myString = &quot;number is 122&quot;;
static int myStaticInt=22;
int myInt=121;
^
</pre>
<p>Fix the problem in the JSP source file, save the source, and request
the JSP file again.</p>
<p>If the error occurs when trying to serve a JSP
file that was copied from another system where it had successfully run, then there
is something different about the new server environment that prevents the execution of the
JSP file. Browse the text of the error for a statement such as:</p>
<pre>Undefined variable or class name: MyClass</pre>
<p>This error indicates that a supporting .class or .jar file is not copied to the target
server, or is not on the class path. Find the MyClass.class file,
and copy it to the Web module WEB-INF/classes directory,
or place the containing .jar file in the Web module WEB-INF/lib directory.</p>
<p>Verify that the URL used to access the resource is correct by completing the following
steps:</p>
<ul>
<li><P>The URL path for a JSP file, HTML file, or image file can be described as follows:</p>
<pre>
http://<em>your_server_name</em>/<em>Web_module_context_root</em>/
<em>subdirectory</em>/<em>filename.ext</em>
</pre>
<p>The document root for a Web application is the <samp><em>application_name</em>.WAR</samp> directory of the installed application.</p>
<p>For example, to access the myJsp.jsp file, located in the /QIBM/UserData/WebASE51/ASE/default/installedApps/myEntApp.ear/myWebApp.war/invoices directory on myhost.mydomain.com (assume the context root for the myWebApp Web module is myApp), the URL is <samp>http://myhost.mydomain.com/myApp/invoices/myJsp.jsp</samp>.</p>
</li>
<li><P>JSP serving is enabled by default. File serving for HTML and image files must be enabled as a property of the Web module or by setting the <samp><strong>fileServingEnabled</strong></samp> property to <strong>true</strong> in
the <samp>ibm-web-ext.xmi</samp> file of the installed Web application and restarting
the application.</P>
</li>
<li><P>For servlets served by class name, the URL is as follows:</P>
<pre>
http://<em>hostname</em>/<em>Web_module_context_root</em>/servlet/
<em>packageName.className</em>
</pre>
<p>For example, to access myCom.myServlet.class, located in the /QIBM/UserData/WebASE51/ASE/default/installedApps/myEntApp.ear/myWebApp.war/WEB-INF/classes directory (assume the context root for the myWebApp module is myApp), the URL would be:</p>
<pre>http://myhost.mydomain.com/myApp/servlet/myCom.MyServlet</pre>.
</li>
<li>Serving servlets by class name must be enabled as a property of the Web module. It is enabled by default. File serving for HTML and image files must be enabled as a property of the Web application, by setting the <samp><strong>fileServingEnabled</strong></samp> property to <strong>true</strong> in
the <samp><strong>ibm-web-ext.xmi</strong></samp> file of the installed Web application
and restarting the application. </li>
</ul>
<p>Correct the URL in the &quot;from&quot; HTML file, servlet or JSP file.
An HREF with no leading slash (/) inherits the calling resource context.
For example:</p>
<ul>
<li>an HREF in <samp>http://[hostname]/myapp/servlet/MyServlet</samp> to <samp>&quot;ServletB&quot;</samp> resolves
to <samp>&quot;http://hostname/myapp/servlet/ServletB&quot;</samp> </li>
<li>an HREF in <samp>http://[hostname]/myapp/servlet/MyServlet</samp> to <samp>&quot;servlet/ServletB&quot;</samp> resolves
to <samp>&quot;http://hostname/myapp/servlet/servlet/ServletB&quot;</samp> (an error)</li>
<li>an HREF in <samp>http://[hostname]/myapp/servlet/MyServlet</samp> to <samp>&quot;/ServletB&quot;</samp> resolves
to <samp>&quot;http://hostname/ServletB&quot;</samp> (an error, if <samp>ServletB</samp> requires
the same context root as <samp>MyServlet</samp>) </li>
</ul>
<p><a name="nojspchg"></a><b>After modifying and saving a JSP file, the change does not show up in the browser (the old JSP file displays)</b></p>
<p>It is probable that the Web application is not configured for servlet reloading, or the reload interval is too high.</p>
<p>To correct this problem, in the administrative console, check
the <strong>Reloading Enabled</strong> flag and the <strong>Reload Interval</strong> value in the IBM Extensions for the Web module in question. Turn Reloading on, or
if it is already on, then set the Reload Interval lower.</p>
<p><a name="jspattrpage"></a><b>Message like &quot;Message: /jspname.jsp(9,0)
Include: Mandatory attribute page missing&quot; appears when attempting to browse
JSP file</b></p>
<p>It is probable that the JSP file failed during the translation
to Java phase. Specifically, a JSPdirective (in this case, an Include statement),
was incorrect or referred to a file that could not be found.</p>
<p>To correct this problem, fix the problem in the JSP source, save the source, and request
the JSP file again.</p>
<p><a name="nojspsrc"></a><b>The Java
source generated from a JSP file is not retained in the temp directory (only
the class file is found)</b></p>
<p>It is possible that the JSP processor is not configured to keep generated Java source.</p>
<p>In the administrative console, check the <strong>JSP Attributes</strong> under <strong>Assembly Property
Extensions</strong> for the Web module in question. Make sure the <strong>keepgenerated</strong> attribute
is there and is set to true. If not, set this attribute and restart the Web
application. To see the results of this operation, delete the class file from
the temp directory to force the JSP processor to translate
the JSP source into Java source again.</p>
<p><a name="batchcomfail"></a><b>The JSP Batch Compiler fails with the message
&quot;Enterprise Application [application name you typed in] not found.&quot;</b></p>
<p>It is possible that the full enterprise application path and name, starting with
the <samp>.ear</samp> subdirectory that resides in the /QIBM/UserData/WebASE51/ASE/<em>instance</em>/config/cells/
<em>cell_name</em>/applications directory is expected as an argument to the JspBatchCompiler tool, not just the display name. For example:</p>
<ul>
<li><samp>&quot;JspBatchCompiler -enterpriseapp.name sampleApp.ear/deployments/sampleApp&quot;</samp> is
correct, as opposed to</li>
<li><samp>&quot;JspBatchCompiler -enterpriseapp.name sampleApp&quot;</samp>, which is incorrect.</li>
</ul>
<p><a name="nonenglish"></a><b>There is a translation problem with non-English
browser input.</b></p>
<p>If non-English-character-set browser input cannot
be translated after being read by a servlet or JSP file, ensure that the request
parameters are encoded according to the expected character set before reading.
For example, if the site is Chinese, the target .jsp file should
have the following line before any req.getParameter()
calls:</p>
<pre> req.setCharacterEncoding(&quot;gb2312&quot;);</pre>
<p>This problem affects servlets and .jsp files ported from
earlier versions of WebSphere Application Server - Express, which converted characters
automatically based upon the locale of the WebSphere Application Server - Express.</p>
<p><a name="noscroll"></a><b>Scroll bars do not appear around items in the
browser window</b></p>
<p>In some browsers, tree or list type items that extend
beyond their allotted windows do not have scroll bars to permit viewing of
the entire list.</p>
<p>To correct this problem, right-click on the browser
window, and click <strong>Reload</strong> from the menu.</p>
<p><a name="friendlyHTTP"></a><b>Error &quot;Page cannot be displayed... server
not found or DNS error&quot; appears when attempting to browse a Java Server Page
(JSP) using Internet Explorer</b></p>
<p>This error can occur when an HTTP
timeout causes the servant to be brought down and restarted. To correct this
problem, increase the ConnectionIOTimeout value:</p>
<ol>
<li>From the administrative console, expand <strong>System Administration --&gt; DeploymentManager --&gt; Administration Services --&gt; Custom Properties</strong>.</li>
<li>Select <STRONG>ConnectionIOTimeout</STRONG>.</li>
<li>Increase the ConnectionIOTimeout value.</li>
<li>Click <STRONG>OK</STRONG>.</li>
</ol>
</body>
</html>