Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 87
Product ServletExec
Category Debugging
Question I am seeing a problem with a New Atlanta product that only occurs sometimes, or it only occurs with certain code, or in certain configurations, or on certain machines (but not others), how can a solution be found?
Answer Problems like this, are not easily reproduced by the support staff of New Atlanta Communications.
If New Atlanta cannot reproduce the problem then they cannot diagnose and solve it.
  • The first thing to do is to look for error messages in any applicable log files. For example if using ServletExec then you would need to look in ServletExec.log, ServletExecNative.log (in-process only), and Servlet.log.
    Very often, you can find messages in these logs which may point you to the cause of the problem.
  • Isolating the problem to its simplest, consistently reproducible test case is paramount.
    Ask yourself this question:
    "How can I simplify this problem?"
    For example, if the problem occurs with code that runs inside an application server, then consider running the code from a command line instead.
    Does the problem still occur?
    If the problem occurs with your code, consider removing your code from the equation completely (removing it from the Classpath, undeploying any of your web apps, etc...) and try using some of the examples that come with the New Atlanta product.
    For example if the product is ServletExec then try using TestServlet or DateServlet or hangman.jsp or the exampleWebApp.
    If the product is JTurbo, then try to run some of its simpler examples from a command line.
    If doing this reveals that the problem is only occurring when certain code is run, or when code is run in certain ways, then communicate that fact to the support staff of New Atlanta.
    If doing this reveals that the problem is only occurring when you run a specific chunk of code then comment out whole sections of that code in order to possibly isolate which block of code might be causing the problem.
  • Instrument your code,
    [adding System.out.println() statements in various locations] in order to begin narrowing in on precisely where the problem occurs, and what key variable values are when the problem occurs.

    If the problem involves JDBC code then consider using some JDBC debugging techniques
    So that the JDBC layer of your webapplication will output more info, which may help to solve the problem.
  • Look for patterns in the problem.
    Does it occur only when running certain code?
    Does the problem occur only when you do certain things?
    If using a web server and the problem is occurring on certain requests, then look at the access log file of the HTTP Web Server for a pattern of requests that lead to the problem.
  • If the problem involves JDBC code, then consider stubbing out all JDBC calls to see if the problem goes away.
    If you are using JDBC Connection pooling, try running the code without the pool at all (just getting a fresh connection each time). That at least would help to isolate it.
  • Are you making native calls from Java?
    If so, remove those and see if it alleviates the problem, or yeilds different behavior or different error messages.
  • Do you have access to any machine/configuration where the problem is not occurring?
    If so, then ask yourself this question:
    "What is different about the machine where the code works, and the machine where the code does not work"?
  • Consider trying a separate machine, different JVM version, different hotspot flavor (client vs server), different version of OS, and/or different brand of web server.
In all cases, make a single change and then retest, make another change and then retest, etc...
That way you will know the effect of each single change.
Once you have a solid test case, and you believe that it demonstrates a problem with a New Atlanta product, and the test case is as simplistic as possible and does nothing but consistently reproduce the problem, then send it to the support staff of New Atlanta Communications.
They will attempt to reproduce the problem and diagnose it.
Please do not send large bodies of source code. Please send only those components that are absolutely required for demonstrating and documenting the problem.

company media information terms of use privacy policy contact us