HTTP Connection Tracer Diagnostic Utility

NOTE: this page is out of date, and should be considered deprecated. See the HTTP Tracer wiki page for current inforamtion.


In the past we have 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'.

The solution (for diagnosis)

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:

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. Please help test this out! If you agree that it proves useful I would encourage you to direct users to utilize this when helping address these sorts of problems.

Please address any questions, comments or suggestions in bugs or via the mailing list.


Download the HTTP connection tracer diagnostic utility jar file.

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.


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.

eclipse.exe -vmargs -DurlMapLocation=C:\map.txt -DurlLogLocation=C:\log.txt

Here's a description of what each argument does ....

name example value description
java.protocol.handler.pkgs Tells the JVM to utilize the "HTTP Connection Tracer" tool.
urlMapLocation C:\map.txt 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.
urlLogLocation C:\log.txt 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. Note also that if no HTTP requests are made, then no log or output is produced. If there is no output, you may want to confirm your setup by running a small test program that explicitly does a URL connection. See bug 216524 for an example.

The Map File

Here's an example of what the map file looks like.... =file:///D:/my-schema-cache/bar.xsd

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.

The Log File

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

URL request - provides the URL address for the connection
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
STACK TRACE - dumps of stack to help the support and development teams understand the code paths involved in creating the connection request

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.

Example Output

URL requested :
URL mapped : file:///D:/workspaces/corona-test/XMLExamples/substitutionGroup/Catalogue4.xsd
java.lang.Exception: dumpTheStack
   at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) 
   at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) 
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) 
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) 
   at javax.xml.parsers.SAXParser.parse(Unknown Source) 
   at org.eclipse.xsd.util.XSDParser.parse( 
   at org.eclipse.jface.operation.ModalContext.runInCurrentThread( 
   at org.eclipse.jface.wizard.WizardDialog.finishPressed( 
   at org.eclipse.jface.wizard.WizardDialog.buttonPressed( 
   at org.eclipse.jface.dialogs.Dialog$2.widgetSelected( 
   at org.eclipse.swt.widgets.TypedListener.handleEvent( 
   at org.eclipse.swt.widgets.EventTable.sendEvent( Code)) 
   at org.eclipse.swt.widgets.Widget.sendEvent( 
   at org.eclipse.swt.widgets.Display.runDeferredEvents( 
   at org.eclipse.swt.widgets.Display.readAndDispatch( Code)) 
   at org.eclipse.jface.window.Window.runEventLoop( 
   at org.eclipse.swt.widgets.TypedListener.handleEvent( 
   at org.eclipse.swt.widgets.EventTable.sendEvent( Code)) 
   at org.eclipse.swt.widgets.Widget.sendEvent( 
   at org.eclipse.swt.widgets.Display.runDeferredEvents( 
   at org.eclipse.swt.widgets.Display.readAndDispatch( 
   at org.eclipse.ui.internal.Workbench.runEventLoop( 
   at org.eclipse.ui.internal.Workbench.runUI( 
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench( 
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench( 
   at org.eclipse.core.internal.runtime.PlatformActivator$ 
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
   at sun.reflect.NativeMethodAccessorImpl.invoke( 
   at sun.reflect.NativeMethodAccessorImpl.invoke( 
   at sun.reflect.DelegatingMethodAccessorImpl.invoke( 
   at java.lang.reflect.Method.invoke( 
   at org.eclipse.core.launcher.Main.basicRun( 
   at org.eclipse.core.launcher.Main.main( 

The solution (for code)

While there is no one solution for all situations where you want to avoid or minimize network access, here we will mention a few things to consider.