Jave/Websphere opening PDF document
I don't know if anyone has come across this problem before.
I support a Web application (Java 1.2.2/WebSphere 3.5).
One of the options this application offers is to create a PDF file
containing the details of the transaction the user just completed. This is done by writing the PDF file using Etymon (and a PDF template file). This PDF file is displayed in another browser window (users mainly use Internet Explorer either v5 or v6).
opens a new internet browser window in which the created PDF file is displayed. This comes into our Web Server via a doGet method.
This works for most users and they get a PDF file displayed in a new
window, however some users get a NullPointerException in the doGet method (information ascertained from the stack trace).
Having looked at the doGet the only real place that a NullPointerException
can occur is when we get something out of the HttpServletRequest using
So it looks like to me when the new window is opened the session is
not "passed" to that new window and we cannot get anything from that session!?!
As I said earlier this only occurs for certain users and it only
happens when they try to create the new PDF file the rest of the application works fine (and the application requires cookies).
To me it sounds like a browser issues as I have been able to log on
as the user at different sites and different PCs and display the PDF file with no issues (ie: I do not get the NullPointerException).
The user has the correct version of Adobe Reader and they can display
a dummy PDF file in their browser, it just appears when they try to display the dynamic PDF created by the application that the error occurs.
Any suggestions? Could it be something to do with the browser not
allowing a new window to be displayed or the session to be passed to a new window. Cookies will be turned on in the browser otherwise the application would not work at all.
Any help would be appreciated.
It does sound like the browser.
Do those users always get nullpointers?
Try deploying your app to Tomcat or JBoss (depending on your application needs) or another "low cost" app server and test.
I'll second that question. Is the behavior consistent? I.e. the good/bad users are consistently good/bad? I assume you load a page into the popup that makes the request for the PDF onload. Some browsers share instances between separate windows, some don't and some are configurable. If the browser launches a new window as a separate process, the new window will not share the existing session with the server. If this is the case it should be consistent for a given user.
Do you not have an IDE with a WebSphere Test Environment so you can debug this in the container?
The user's who have the problem get the problem consistently.
The IDE we use is VisualAge for Java 3.5 which does have a WebSphere test environment and we also have some test servers that mirror our production environment with WebSphere 3.5.5 installed. Unfortunately in all our dev and test environments (including the clients that do not have the problem) this error cannot be recreated.
We are going to visit the client (ie: a client with the problem) to view their PC set up, and I was wondering if anyone would have any ideas as to what to look for.
Some things I will be trying:
1. Making our URL a trusted site and setting trusted sites to "Low" security
2. Ensuring they check for newer versions of stored page everytime they load the web page
3. Allowing the save of encrypted files to disk to see if IE will download the file instead of displaying on a page
Anything I missed?
The problem with VAJ 3.5 is that Websphere Test Environement is an emulation, of sorts, of WAS. So they don't function the same. WSAD (and beyond) has an actual instance of WAS. Also, at that point, the code bases for WAS between platforms was not the same.
WAS did have alot of issues in the past. I would suggest, if you can do it, moving to Eclipse/RAD and a current version of WAS (or Tomcat/JBoss/Jonas/Geronimo). I don't think VAJ 3.5 and WAS 3.5 are supported anymore either.
True. They've been out of support for almost two years.
I don't think VAJ 3.5 and WAS 3.5 are supported anymore either.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL