Visualize.js Authentication Error

We're attempting to integrate Jasper Reports (via the Visualize.js SDK) into a single page web application (written with Ember).

I've noticed that after a user has been interacting with the app for a while, eventually calls to Visualize.js fail with an "Authentication Error". From the developer guide, I read that this can either be because of invalid credentials or a session timeout. Refreshing the app gets past the error for a while, but eventually calls start failing again with the same error.

From my limited experience with the product, it appears we're authenticating on every request to Visualize.js:

  name: "user"
  password: "password"
, (v) ->
  report =
    resource: "/path/to/report"
    container: "#container"
    error: (err) ->
      alert err.message

If we're passing in credentials on each call to visualize, could this possibly be a session timeout? If so, is there a way to prevent session timeouts (e.g. make it more stateless), so the web app can manage this directly?

jason.whitehorn's picture
Joined: Aug 20 2014 - 9:53am
Last seen: 7 years 11 months ago

1 Answer:

Seems to be a session timeout. I've experienced the same.

If you're using Tomcat, edit \conf\server.xml file. Search for "<Connector port="8080"". There should be a "connectionTimeout" attribute. Try increasing it.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 5 months ago

Isn't that simply the connection timeout for HTTP requests? The current value is 20,000... which, I assume is 20 seconds.

jason.whitehorn - 8 years 3 months ago