blob: d8df0e58af345743f81ccf37bc56ca3806703dbe [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta
http-equiv="Content-Type"
content="text/html; charset=UTF-8" />
<meta
content="text/html; charset=iso-8859-1"
http-equiv="Content-Type" />
<link
type="text/css"
href="../../..//default_style.css"
rel="stylesheet" />
<link
type="text/css"
href="../../..//webtools/wtp.css"
rel="stylesheet" />
<title>http connection tracer diagnostic utility</title>
</head>
<body>
<table
border="0"
cellpadding="2"
cellspacing="5"
width="100%">
<tbody>
<tr>
<td
align="left"
width="60%"><font class="indextop">HTTP Connection Tracer Diagnostic Utility</font> <br />
<font class="indexsub">http connection tracer diagnostic utility</font></td>
<td width="40%"><img
src="../../..//webtools/images/wtplogosmall.jpg"
align="middle"
height="129"
hspace="50"
width="207"
alt="" /></td>
</tr>
</tbody>
</table>
<table
border="0"
cellpadding="2"
cellspacing="5"
width="100%">
<col width="16" />
<col width="*" />
<tbody>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>In the past we've encountered many different 'going off to the internet problems' in various parts of
our tools (on the development side and the server side). As you know these problems have proven to be a real
pain for support and development .... they're difficult to track down and take a great deal of effort to
reproduce. I'm sure these are also a real pain for customers who are nagged by many different variations of
the 'going off to the internet problem'.</p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>I've finally found a few hours to write an "HTTP Connection Tracer" tool to help us manage these
'going off to the internet problems' Really the tool has two purposes:</p>
<ul>
<li><b>to help development and support understand these problems</b> by providing logging
information so were can see where the code is 'going off to the internet'</li>
<li><b>to help customers workaround these problems</b> by providing a crude means to redirect http
connections ... so instead of 'going off to the internet' they go to the local file system</li>
</ul>
<p></p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>I should emphasize that this tool is not intended to be a 'solution' ... just a useful short term aid
until a time that we can provide 'proper' fixes. Below I've described how to install \ and configure the
tool and how to use it. <b>Please help test this out!</b> If you agree that it proves useful I would
encourage you to direct users to utilize this when helping address these sorts of problems.</p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Please address any questions, comments or suggestions in <a
href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web%20Tools"
target="_top">bugs</a> or via the <a
href="https://dev.eclipse.org/mailman/listinfo/wtp-dev"
target="_top">wtp-dev@eclipse.org</a> mailing list.</p>
</td>
</tr>
<tr>
<td
colspan="2"
align="left"
bgcolor="#0080c0"
valign="top"><b><font
color="#ffffff"
face="Arial,Helvetica">Download</font></b></td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p><a href="httphandler.jar">Download the HTTP connection tracer diagnostic utility</a></p>
</td>
</tr>
<tr>
<td
colspan="2"
align="left"
bgcolor="#0080c0"
valign="top"><b><font
color="#ffffff"
face="Arial,Helvetica">Installation</font></b></td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>The httphandler.jar file must be added to the JRE's lib/ext directory. This must be done for each JRE
that you're using in your environment. So if you're developing your code with eclipse and deploying to a
server (and you want to get trace information for both) you'll need to make the JAR available for both the
eclipse JRE and the server's JRE.</p>
</td>
</tr>
<tr>
<td
colspan="2"
align="left"
bgcolor="#0080c0"
valign="top"><b><font
color="#ffffff"
face="Arial,Helvetica">Configuration</font></b></td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>When you launch eclipse or run your sever, you'll need to specify some vmargs to activate the "HTTP
Connection Tracer" tool. Here's an example of how you'd do this on the command line for Eclipse.</p>
<blockquote>eclipse.exe -vmargs -Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol
-DurlMapLocation=C:\map.txt -DurlLogLocation=C:\log.txt</blockquote>
<p></p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Here's a description of what each argument does ....</p>
<table border="1">
<tr>
<th>name</th>
<th>example value</th>
<th>description</th>
</tr>
<tr>
<td>java.protocol.handler.pkgs</td>
<td>com.ibm.etools.www.protocol</td>
<td>Tells the JVM to utilize the "HTTP Connection Tracer" tool.</td>
</tr>
<tr>
<td>urlMapLocation</td>
<td>C:\map.txt</td>
<td>Specifies the location of a 'properties' file where URL mapping information can be
provided. Note that if no map location is specified then URL redirection never occurs.</td>
</tr>
<tr>
<td>urlLogLocation</td>
<td>C:\log.txt</td>
<td>Specifies the location of a log file where logging information will be written. Note that
if no log location is specified the logging information will be written to System.out.</td>
</tr>
</table>
<p></p>
</td>
</tr>
<tr>
<td
colspan="2"
align="left"
bgcolor="#0080c0"
valign="top"><b><font
color="#ffffff"
face="Arial,Helvetica">The Map File</font></b></td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Here's an example of what the map file looks like....</p>
<blockquote>http://www.hello.com/bar.xsd =file:///D:/my-schema-cache/bar.xsd<br />
http://www.ibm.com/foo.xsd=file:///D:/my-schema-cache/foo.xsd</blockquote>
<p></p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Notice its just a list of mapping pairs (separated by an '=' sign) that specifies how a web address
should be redirected to a local file system address. By editing this file, a customer can workaround nagging
'going off to the internet problems' until a proper fix is delivered.</p>
</td>
</tr>
<tr>
<td
colspan="2"
align="left"
bgcolor="#0080c0"
valign="top"><b><font
color="#ffffff"
face="Arial,Helvetica">The Log File</font></b></td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Each time the JVM attempts to create an HTTP connection, an entry is added to the log file. Below
I've shown an example log file entry. It consists of three interesting pieces of information...</p>
<blockquote>URL request - provides the URL address for the connection<br />
URL mapped - provides the 'mapped' address (as specified in the 'map.txt' file) to help the customer see
that the URL has been succesfully redirected<br />
STACK TRACE - dumps of stack to help the support and development teams understand the code paths involved in
creating the connection request</blockquote>
<p></p>
</td>
</tr>
<tr>
<td
align="right"
valign="top">&nbsp;</td>
<td valign="top">
<p>Note that the presense of an entry in the log does not neccessarily imply an defect in the product.
Some attempts to create an HTTP connections are expected. So I'd encourage you to scrutinize the entries in
the log file. At the very least the logs will provide you some useful stack trace information that will help
developers understand the nature of the HTTP connections. Below I've shown an example log file...</p>
<blockquote>URL requested : http://www.ibm.com/foo.xsd<br />
URL mapped : file:///D:/workspaces/corona-test/XMLExamples/substitutionGroup/Catalogue4.xsd<br />
STACK TRACE :<br />
java.lang.Exception: dumpTheStack<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.etools.www.protocol.http.Handler.openConnection(Handler.java:156) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.net.URL.openConnection(URL.java:924) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at javax.xml.parsers.SAXParser.parse(Unknown Source) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.xsd.util.XSDParser.parse(XSDParser.java:175) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.wizards.XSDSelectIncludeFileWizard.doLoadExternalModel(XSDSelectIncludeFileWizard.java:183)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.wizards.XSDSelectIncludeFileWizard$XSDURLPage.openExternalSchema(XSDSelectIncludeFileWizard.java:293)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.wizards.XSDSelectIncludeFileWizard$XSDURLPage.access$0(XSDSelectIncludeFileWizard.java:271)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.wizards.XSDSelectIncludeFileWizard$1.run(XSDSelectIncludeFileWizard.java:318) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:303) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:253) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:752) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.wizards.XSDSelectIncludeFileWizard.performFinish(XSDSelectIncludeFileWizard.java:130)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:609) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:305) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled
Code)) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled
Code)) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.jface.window.Window.runEventLoop(Window.java:668) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.jface.window.Window.open(Window.java:648) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
com.ibm.xsdeditor.internal.properties.section.NamespaceAndSchemaLocationSection.widgetSelected(NamespaceAndSchemaLocationSection.java:159)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled
Code)) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.lang.reflect.Method.invoke(Method.java:391) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.core.launcher.Main.basicRun(Main.java:185) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.core.launcher.Main.run(Main.java:704) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at org.eclipse.core.launcher.Main.main(Main.java:688) <br />
</blockquote>
</td>
</tr>
</tbody>
</table>
</body>
</html>