BIRT: The viewing session is not available or has expired

by Jay Jonas

If you are using…


from a Eclipse RCP View calling to display a BIRT report and your report is open without any problem within the view, I know how much you are happy with BIRT.

However, if when you click on Print Report toolbar command, and  choose HTML print format, you see your report opens in a Internet Explorer window with a exception as follows, maybe you want to read the rest of this post.

This seems to be a Internet Explorer policy with iframe, cookies and cross-site.

Here you are the complete stack trace: The viewing session is not available or has expired.
 at javax.servlet.http.HttpServlet.service(
 at org.apache.axis.transport.http.AxisServletBase.service(
 at javax.servlet.http.HttpServlet.service(
 at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(
 at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(
 at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(
 at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(
 at javax.servlet.http.HttpServlet.service(
 at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(
 at org.mortbay.jetty.servlet.ServletHolder.handle(
 at org.mortbay.jetty.servlet.ServletHandler.handle(
 at org.mortbay.jetty.servlet.SessionHandler.handle(
 at org.mortbay.jetty.handler.ContextHandler.handle(
 at org.mortbay.jetty.handler.HandlerWrapper.handle(
 at org.mortbay.jetty.Server.handle(
 at org.mortbay.jetty.HttpConnection.handleRequest(
 at org.mortbay.jetty.HttpConnection$RequestHandler.content(
 at org.mortbay.jetty.HttpParser.parseNext(
 at org.mortbay.jetty.HttpParser.parseAvailable(
 at org.mortbay.jetty.HttpConnection.handle(
 at org.mortbay.thread.QueuedThreadPool$

A initial workaround for this is change the default browser used: go to Window >Preferences > Report Design > Preview. First, check the Always use external browsers checkbox. Right below there is a link to set the external browser preference, just do it. Finally, you may also want to set the host and port the viewer starts on using the Preview > Preview Server entry.

Sorry, but this was the prelude, because despite you change the default browser to another, e.g. Mozilla Firefox, the report always opens with Internet Explorer and the exception is throwed.

The actual workaround is disable the Internet Explorer Protected Mode for your site zone or something like that. Mine was intranet zone, it was easy! These are the steps:

  1. Open IE.
  2. From the IE command bar, choose Tools and then Internet Options.
  3. In the Internet Options window, click on the Security tab.
  4. Below the Security level for this zone area (in my case, it’s Intranet), and directly above the Custom level… and Default level buttons, uncheck the Enable Protected Mode checkbox.
    Note: disabling Protected Mode requires a restart of IE, as you may have seen next to the checkbox in this step.
  5. Click OK on the Internet Options window.
  6. If you’re prompted with a Warning! dialog box, advising that The current security settings will put your computer at risk, click the OK button.
  7. Close IE and then open it up again.

As I was advised by Jason I filed the bug ID 333931. The initial discussion about this started in BIRT forum on this topic.

That’s it!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: