Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » report doesn't show up
report doesn't show up [message #715578] Sun, 14 August 2011 16:13 Go to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
hi
i wanna add a report to my jsf webapp and i followed steps as exactly as mentioned in :
http://www.birt-exchange.org/org/wiki/index.php?title=Using_BIRT_and_Act...
but i get the error bellow and i don't how to fix it, i'm in a desperate need for help.

java.lang.NullPointerException
org.eclipse.birt.report.engine.executor.ExecutionContext.getDesign(ExecutionContext.java:957)
org.eclipse.birt.report.engine.api.impl.EngineTask.doValidateParameters(EngineTask.java:650)
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:92)
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:75)
com.exadel.jsfbirt.engine.BirtRendererUtils.runAndRender(BirtRendererUtils.java:231)
com.exadel.jsfbirt.engine.BirtRendererUtils.renderBirt(BirtRendererUtils.java:148)
com.exadel.jsfbirt.renderkit.html.BirtWrapperRenderer.doEncodeBegin(BirtWrapperRenderer.java:162)
com.exadel.jsfbirt.renderkit.html.BirtWrapperRenderer.encodeBegin(BirtWrapperRenderer.java:127)
javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:275)
org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:200)
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:195)
org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
Re: report doesn't show up [message #715628 is a reply to message #715578] Sun, 14 August 2011 23:35 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
please I'm really stuck on this one and I need to solve it to move on with the project cause I have a deadline to respect and I really did all I could to solve it.
I instaled the plugin, I added jars, the jsf4birt demo works just fine, but the report in the project doesn't work.I have a list in my bean that I wanna export as a report,
here is the code in my page:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:b="http://jboss.com/products/seam/birt"
xmlns:jsf4birt="http://jsf4birt.components">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<rich:panel>
<f:facet name="header">
Raport Transactions
</f:facet>
<jsf4birt:birtWrapper reportName="/Reports/new_report.rptdesign">
<f:param name="Text" value="#{ValeursMBean.selection}" />
</jsf4birt:birtWrapper>
</rich:panel>
</body>
</html>

selection is the List to be be exported.

the Open method in the report is :
count=0;

myDataSource = new Packages.cdvm.surv.web.ValeursMBean();

values = myDataSource.getSelection();

the fetch method is :

if(count>values.size()){
return(false);
}
row["test"] = values.get(count);

count+=1;
return(true);

this is a simple test instead of the real things I wanna get, i'm working with this one first to make things easier to control.
i'll be really thankful for any kind of help .

[Updated on: Sun, 14 August 2011 23:36]

Report message to a moderator

Re: report doesn't show up [message #715802 is a reply to message #715628] Mon, 15 August 2011 15:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you add something like the following to your open method:

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/myrowcount.txt", true ) );
out.println( "values size is "+ values.size());
out.close();

and check that you are getting data.

Jason

On 8/14/2011 7:35 PM, yasser_z wrote:
> please I'm really stuck on this one and I need to solve it to move on
> with the project cause I have a deadline to respect and I really did all
> I could to solve it.
> I instaled the plugin, I added jars, the jsf4birt demo works just fine,
> but in project doesn't work.I have a list in my bean that I wanna export
> as a report, here is the code in my page:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:b="http://jboss.com/products/seam/birt"
> xmlns:jsf4birt="http://jsf4birt.components">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>Insert title here</title>
> </head>
> <body>
> <rich:panel>
> <f:facet name="header">
> Raport Transactions
> </f:facet>
> <jsf4birt:birtWrapper reportName="/Reports/new_report.rptdesign">
> <f:param name="Text" value="#{ValeursMBean.selection}" />
> </jsf4birt:birtWrapper>
> </rich:panel>
> </body>
> </html>
>
> selection is the List to be be exported.
>
> the Open method in the report is : count=0;
>
> myDataSource = new Packages.cdvm.surv.web.ValeursMBean();
> values = myDataSource.getSelection();
> the fetch method is :
>
> if(count>values.size()){
> return(false);
> }
> row["test"] = values.get(count);
> count+=1;
> return(true);
>
> this is a simple test instead of the real things I wanna get, i'm
> working with this one first to make things easier to control.
> i'll be really thankful for any kind of help .
>
Re: report doesn't show up [message #715884 is a reply to message #715802] Mon, 15 August 2011 21:06 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
Hi jason
I did that but still nth changes,
importPackage( Packages.java.io );
importPackage( Packages.cdvm.surv.web);
count=0;

myDataSource = new ValeursMBean();

values = myDataSource.getSelection();

out = new PrintWriter( new FileWriter( "/home/zairi/Bureau/myrowcount.txt", true ) );
out.println( "values size is "+ values.size());
out.close();


but I don't see the txt file in " Bureau"

by the way I read about coding some classes of Birt Engine and Design, should I code them even if I'm working with jsf4birt and the graphic tool of Birt ?
because all I did is that I made the report ,but dataset cannot get any data from my bean which is the problem, and I call it within the jsp file.
is there something I should add to that?
PS: I still have the same error.

thank you
Re: report doesn't show up [message #715894 is a reply to message #715884] Mon, 15 August 2011 21:31 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What version of BIRT are you using and where is this package located:
cdvm.surv.web

Jason

On 8/15/2011 5:06 PM, yasser_z wrote:
> Hi jason I did that but still nth changes,
> importPackage( Packages.java.io );
> importPackage( Packages.cdvm.surv.web);
> count=0;
>
> myDataSource = new ValeursMBean();
> values = myDataSource.getSelection();
>
> out = new PrintWriter( new FileWriter(
> "/home/zairi/Bureau/myrowcount.txt", true ) );
> out.println( "values size is "+ values.size());
> out.close();
>
>
> but I don't see the txt file in " Bureau"
> by the way I read about coding some classes of Birt Engine and Design,
> should I code them even if I'm working with jsf4birt and the graphic
> tool of Birt ? because all I did is that I made the report ,but dataset
> cannot get any data from my bean which is the problem, and I call it
> within the jsp file.
> is there something I should add to that?
> PS: I still have the same error.
>
> thank you
Re: report doesn't show up [message #715902 is a reply to message #715894] Mon, 15 August 2011 22:02 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
i'm using Birt 2.5 and Birt runtime 2.5.0
i added an image of the hierarchy of my JSFproject:
the package cdvm.surv.web is in the src of my JSF project.
  • Attachment: Capture-1.png
    (Size: 106.99KB, Downloaded 169 times)
Re: report doesn't show up [message #715907 is a reply to message #715902] Mon, 15 August 2011 22:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you set the log level to FINE and see if you are getting anything in
the logs. My guess is that class in your open script is not being
found. Put something like this in the before factory to see if anything
is getting written out.
out = new PrintWriter( new FileWriter(
"/home/zairi/Bureau/myrowcount.txt", true ) );
out.println( "Some message");
out.close();

When deployed where is the source for the cdvm.surv.web package/

You may want to try the 3.7 runtime which does not have the
web-inf/platform directory and all the jars are in the web-inf/lib.

Jason

On 8/15/2011 6:02 PM, yasser_z wrote:
> i'm using Birt 2.5 and Birt runtime 2.5.0
> i added an image of the hierarchy of my JSFproject:
> the package cdvm.surv.web is in the src of my JSF project.
Re: report doesn't show up [message #715909 is a reply to message #715907] Mon, 15 August 2011 23:04 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
thank you Jason so much I really appreciate your help,
i wrote the code in the before factory but still no txt file.
may you tell me how to set the log level to FINE ?!
i guess i'll use the 3. version of birt as my last chance and see what that will come up with.
i'll keep you in touch.
thank you some much anyway Jason i really appreciate your help
Best Regards
Re: report doesn't show up [message #715913 is a reply to message #715909] Mon, 15 August 2011 23:31 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

In your list I did not see the jsf4birt lib. Is it in there?
Does this page work for any report or is it just failing on on scripted
datasource?

Jason

On 8/15/2011 7:04 PM, yasser_z wrote:
> thank you Jason so much I really appreciate your help,
> i wrote the code in the before factory but still no txt file.
> may you tell me how to set the log level to FINE ?!
> i guess i'll use the 3. version of birt as my last chance and see what
> that will come up with.
> i'll keep you in touch.
> thank you some much anyway Jason i really appreciate your help Best Regards
Re: report doesn't show up [message #715914 is a reply to message #715913] Mon, 15 August 2011 23:39 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
I've already added the jsf4birt jars
i added my Bean to the exadel-jsf4birt-demo src, and my report to its "Reports" file, and the dataset gets the list from the Bean, still it gaves some errors though, but at least this is a part of the problem resolved, I have to raplace the file "Reports" of my JSFproject and see what that will come up with.

thank you Jason
Re: report doesn't show up [message #716061 is a reply to message #715914] Tue, 16 August 2011 11:33 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
it seems that the report's script cannot be compiled even if I have the js jar in my lib.
Re: report doesn't show up [message #716066 is a reply to message #716061] Tue, 16 August 2011 11:43 Go to previous messageGo to next message
yasser_z is currently offline yasser_zFriend
Messages: 13
Registered: August 2011
Junior Member
hi jason
can i send you my project and see what the issue with it please ?
Re: report doesn't show up [message #716179 is a reply to message #716066] Tue, 16 August 2011 15:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Sure I will give a try. email it to jasonweathersby at windstream dot net.

Jason

On 8/16/2011 7:43 AM, yasser_z wrote:
> hi jason
> can i send you my project and see what the issue with it please ?
Re: report doesn't show up [message #904463 is a reply to message #716179] Tue, 28 August 2012 13:24 Go to previous message
Mateus Barni is currently offline Mateus BarniFriend
Messages: 10
Registered: August 2012
Location: Brazil
Junior Member
Anyone could send me a working copy of this project?
Previous Topic:Some queries not working following move to Juno (i.e.BIRT 4.2)
Next Topic:Hide a crosstab if empty
Goto Forum:
  


Current Time: Fri Oct 22 03:28:37 GMT 2021

Powered by FUDForum. Page generated in 0.02690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top