This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem in BIRT (Report ) when run in weblogic error is " org.mozil....l "

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody,
I am facing a problem In BIRT a reporting tool I am wrote one jsp for display a report in pdf formate on web.
when i run this jsp wblogic server gives a error ==
<u><b>"Org.mozilla.javascript.ImporterTopLevel.initStandardObjects(Lorg/mozilla/javascript/Context;Z)V "</b></u>I am using a weblogic server. I attech my jsp code also, plz help me if any one know the solution

<b>and error show in weblogic console is</b>

java.lang.NoSuchMethodError: org.mozilla.javascript.ImporterTopLevel.initStandar
dObjects(Lorg/mozilla/javascript/Context;Z)V
at org.eclipse.birt.core.script.ScriptContext.<init>(ScriptContext.java:
81)
at org.eclipse.birt.report.engine.executor.ExecutionContext.<init>(Execu
tionContext.java:248)
at org.eclipse.birt.report.engine.api.impl.EngineTask.<init>(EngineTask.
java:118)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.<init>(RunAn
dRenderTask.java:54)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.createRunA
ndRenderTask(ReportEngineHelper.java:215)
at org.eclipse.birt.report.engine.api.ReportEngine.createRunAndRenderTas
k(ReportEngine.java:258)
at resources.jsp.Pdf.run(Pdf.java:81)
at jsp_servlet._resources._jsp.__test._jspService(Test.jsp:123)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:463)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter(PageFlowJspFilt
er.java:261)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:6724)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>



<u><i><b>ReportBIRT.jsp</b></i></u>







public void returnFile(String filename, OutputStream fout)
throws FileNotFoundException, IOException
{
InputStream in = null;
try
{
in = new BufferedInputStream(new FileInputStream(filename));
byte[ ] buf = new byte[4 * 1024]; // 4K buffer
int bytesRead;
while ((bytesRead = in.read(buf)) != -1)
{
fout.write(buf, 0, bytesRead);
}
}
finally
{
if (in != null) in.close( );
}
}





response.setContentType("text/html");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);


HttpSession mysession=request.getSession(true);
OutputStream out_frame = response.getOutputStream( );


/*String reportName = request.getParameter("selectreport");
System.out.println("reportName=="+reportName);
String reportType = request.getParameter("selecttype");
System.out.println("reportType=="+reportType);
*/

String reportName = "C:/Documents and Settings/Administrator/workspace/My First Report/SubReport.rptdesign";
String reportType ="PDF";

InputStream fin = new FileInputStream(reportName);
/*
Vector reportFile = ReportEngineDatabaseLayer.downrpt(reportName);
InputStream in=null;
if (reportFile != null) {
for(int j=0;j<reportFile.size();j++){
Vector vModule = (Vector)reportFile.elementAt(j);
in = (InputStream)vModule.elementAt(1);
}
}
*/

boolean showInfo = false;
HashMap params = new HashMap();
String tfor = new String();
String format ="";
if(reportType.equals("HTML"))
{
format="html";
System.out.println("HTML File");
}

else{
format="pdf";
response.setContentType("application/pdf");

}

Pdf.run( fin, params, format, showInfo);

response.setContentType("application/pdf");

String mmm="C:/diwakar.pdf";
returnFile(mmm,out_frame);
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did u find a solution for this , I'm facing the same problem with websphere application server??!!!
 
Rabee' Nawash
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the cause of the problem, The problem is because the application server contains a older version of
Rhino's js.jar, while BIRT uses the latest version (1.6RC1). Because the js.jar
in the application server is loaded before the one in BIRT, the older version
of class org.mozilla.javascript.Context is loaded. Since the older version of
class org.mozilla.javascript.Context doesn't contain function
initStandardObjects, a runtime java.lang.NoSuchMethodError happened.

its a bug on eclipse Bugzilla Bug site with no 105853
this is the link to this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=105853

I test the solution with websphere application server V5.1 and it works.
 
    Bookmark Topic Watch Topic
  • New Topic