| Author |
Problem in BIRT (Report ) when run in weblogic error is " org.mozil....l "
|
Diwakar Gupta
Greenhorn
Joined: Apr 26, 2006
Posts: 2
|
|
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);
|
 |
Rabee' Nawash
Greenhorn
Joined: Feb 27, 2005
Posts: 14
|
|
|
did u find a solution for this , I'm facing the same problem with websphere application server??!!!
|
Best Regards,<br />Rabee' Nawash
|
 |
Rabee' Nawash
Greenhorn
Joined: Feb 27, 2005
Posts: 14
|
|
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.
|
 |
 |
|
|
subject: Problem in BIRT (Report ) when run in weblogic error is " org.mozil....l "
|
|
|