[
https://jira.jboss.org/jira/browse/JBIDE-4937?page=com.atlassian.jira.plu...
]
Gonzalez Adrian commented on JBIDE-4937:
----------------------------------------
A test case to reproduce the issue :
To reproduce, I'm using JBoss Tools 3.1.0.M2.
1. Create a new Seam project named seambirtweb with BIRT reporting runtime facet.
2. download the attachment JBIDE-4937-1.zip and unzip its content into the seam web
project (it adds a java class, overrides components.xml, pages.xml, adds some xhtml pages
and a birt report).
3. remove src/main/META-INF/persistence.xml (you can let it, but since I have a space in
my workspace directory, Hibernate stops working for me ;( ).
4. start JBoss (I'm using 4.2.2) and add the webapp.
5. connect to
http://localhost:8080/seam-birt-web/birttests.seam
6. select Test Birt Embed, you'll have the following error :
ReportDesign (id = 1):
+ There are errors evaluating script "importPackage(Packages.org.jboss.seam);
importPackage(Packages.org.apache.log4j);
logger.info("reportContext.getHttpServletRequest =
"+reportContext.getHttpServletRequest());
sampleReportList = Component.getInstance("sampleReportList", false);
logger = Logger.getLogger("com.natixis.birt");
logger.warn("sampleReportList = "+sampleReportList);
reportsIterator = sampleReportList.getNames().iterator();
":
{1}.
birt - Seam component always null with birt embed
-------------------------------------------------
Key: JBIDE-4937
URL:
https://jira.jboss.org/jira/browse/JBIDE-4937
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: birt
Reporter: Gonzalez Adrian
Assignee: Snjezana Peco
Fix For: 3.1.0.M4
Attachments: JBIDE-4937-1.zip
I'm using a Seam component in birt report (from a scripted datasource).
Seam component is in conversation (or even session scope - same result).
When I try to access a Seam Component from a birt report and when I use embed
mode(designType="embed"), Seam component is always null (I'm accessing seam
component with Component.getInstance("sampleReportList", false);).
When I use designType="run", or frameset everything works fine.
Tthe issue is due to the session that isn't propagated in embed mode.
UIDocument class creates a new URLConnection to call JBossBirtServlet without propagating
session cookie JSESSIONID (or the session id parameter if session is propagated with url
rewriting).
JBossBirtServlet then calls birt engine, but in a new session context.
So the scripted source in birt engine cannot get a reference to any object stored in the
original session.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira