Hello All,
I have a question about configuring and using visualize.js (under JRS 5.6.1).
While I have no problem running a sample report on either jsfiddle.net (http://jsfiddle.net/kczksufL/8/) or running localhost (127.0.0.1), I cannot seem to get the following to work across a LAN without generating an error:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - demo - </title>
</head>
<body>
<script type="text/javascript" src="http://192.168.1.10/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript">
visualize({
auth:{
name:"jasperadmin",
password:"jasperadmin",
organization:""
}
},
function (v){
//render report from provided resource
v("#container").report( {
resource:"/public/Samples/Reports/01._Geographic_Results_by_Segment_Report",
error:handleError
} );
//show error
function handleError(err) {
alert(err.message);
}
});
</script>
<div id="container"></div>
</body>
</html>
Depending on the browser, the error that's generated on the client side is as follows:
- Chrome: Uncaught TypeError: Cannot read property 'Fn' of undefined (xdm.remote.js:6)
- Firefox: TypeError: c(...) is undefined (xdm.remote.js:6)
- IE: Unable to get property 'Fn' of undefined or null reference
The trace for this error appears to point to easyXDM, as indicated here:
xdm.remote.js:5 13:52:52.204 [easyXDM.Rpc] [DEBUG] - constructorxdm.remote.js:5 13:52:52.206 [EasyXDM.{Private}] [DEBUG] - preparing transport stackxdm.remote.js:5 13:52:52.206 [EasyXDM.{Private}] [DEBUG] - using parameters from queryxdm.remote.js:5 13:52:52.208 [easyXDM.stack.SameOriginTransport] [DEBUG] - constructorxdm.remote.js:5 13:52:52.208 [easyXDM.stack.QueueBehavior] [DEBUG] - constructorxdm.remote.js:5 13:52:52.210 [easyXDM.stack.RpcBehavior] [DEBUG] - initxdm.remote.js:5 13:52:52.211 [easyXDM.stack.SameOriginTransport] [DEBUG] - init
Logs for both tomcat6 and jaspersoft don't provide any additional clues (not surprising, given that it appears that this issue is on the client side and not on the server side).
I'm at a loss, as straight HTML page rendering through the tomcat webserver runs with no problems. However, any attempt to run a JRS report through visualize.js libs will fail as indicated.
My question is this:
- My testing is currently within a LAN, so both of the Tomcat/JRS services and web clients are all running on the same subnet. Does this present any known issues (security or otherwise) that would cause the failure on the client side?
If this shouldn't be an issue (and someone has managed to do what I've described successfully), are there any other approaches that might help drive a solution?
Thanks much
Rich