当前位置: 代码迷 >> Web前端 >> birt session 过期有关问题,跨域有关问题
  详细解决方案

birt session 过期有关问题,跨域有关问题

热度:669   发布时间:2012-09-24 13:49:42.0
birt session 过期问题,跨域问题

The viewing session is not available or has expired

?

最近研究birt的使用,发现birt不支持集群。

所以我就另外搭建了一个tomcat,做专门的birt报表服务器。那么我就需要把它继承在现有的web程序中。用的是iframe。

发现,还是有问题,总是报错“The viewing session is not available or has expired”。

搞了半天,查了半天的资料。发现没有好的办法。老外也遇到这个问题,也在惆怅。

我试了IE的设置,找到一个勉强可以接受的方法来解决。

方法如下:

IE - Intetnet 选项 - 隐私 - 设置:这里有个拉动条,可以设置IE的cookie。将它调到“低”或者“最低”,可以达到解决问题的目的。

不过,这个方法我认为不好。你不能让每个用你的birt程序的人都去修改IE浏览器吧?!所以,也希望看见blog的朋友要是解决过这类的问题,说一下你们解决的方法。还有,谁尝试过birt的集群,也希望能给我一些帮助。谢谢

?

------------------------------------ 2012-01-10 [解决如下] -------------

birt the viewing session is not avaliable or has expired

问题描述:

http://11.23.26.3:8084/biReport/frameset?__report=VIP_kefu.rptdesign&__masterpage=true&__format=html&__parameterpage=true&__toolbar=true&__showtitle=false

我采用上面的url,在一个项目中访问另一个项目biReport中的birt报表,发生错误:

birt the viewing session is not avaliable or has expired

?

我在google的很多地方,都没有找到解决的方案。最终,在?http://www.birt-exchange.org/org/forum/index.php/topic/17735-the-viewing-session-is-not-available-or-has-expired-again/page__s__e25ec58943536503b7b10f91ccd1e87e?里面找到一个方案,解决了这个问题。原文描述如下:

Posted?23 December 2010 - 06:25 AM

Hello,

Today I encountered the same "The viewing session is not available or has expired." message again. Some months ago I managed to find a solution (see this?post).?

This time the issue was a bit different: it only happened when the reports were accessed from IE, but not from Firefox and only for some of them. Looking at the differences I saw that for some of the reports the URL included the hostname and for the others the IP address of the Tomcat server. The ones that were failing to be displayed were the ones accessed by IP.?

So you could check how you are accessing the reports and how the URL is specified. In my case using the hostname of the machine hosting the Tomcat did the trick.

Regards,
Mudor?
所以,我修改了原有的IP地址访问,把IP地址修改为了hostname,就可以正常访问,不在报session过期的错误。
如下:
http://bi2.query.com:8084/biReport/frameset?__report=VIP_kefu.rptdesign&__masterpage=true&__format=html&__parameterpage=true&__toolbar=true&__showtitle=false

?

呵呵,困扰了很久的问题,终于得到解决。爽啊!(备注:这个问题已经被官网列为BUG,但是一直没有修复,很奇怪。必须用域名,而不能用IP)

?

?

1 楼 ximinjie 2012-03-01  
非常感谢,我也遇到这个问题一直搞不定。看到你的文章如释重负啊。
2 楼 kanpiaoxue 2012-03-01  
呵呵。不客气。我也是被困扰了一段时间,在老外的网站找到的。期待birt能够做成集群,那样,这个session就应该会被解决了。
  相关解决方案