Quantcast
Channel: SCN : Popular Discussions - BI Platform
Viewing all articles
Browse latest Browse all 661

Unexpceted error while publishing reports through a JSP

$
0
0

Hi,

 

I am trying to publish reports to crystal reports XI sever using a JSP. I am pasting the code snippet I am using below:

 

     ISessionMgr oSessionMgr = CrystalEnterprise.getSessionMgr();

 

     ISessionMgr oSessionMgr = CrystalEnterprise.getSessionMgr();

 

     IEnterpriseSession oEnterpriseSession = oSessionMgr.logon("rptuser01", "rptuser01", "socw3s2ap19", "secEnterprise");

 

     IInfoStore oInfoStore = (IInfoStore)oEnterpriseSession.getService("", "InfoStore");

 

     //Retrieve the new report information

     String parentFolder       = (String)request.getParameter("parentFolder");

     String reportName         = (String)request.getParameter("reportName");

     String reportDesc         = (String)request.getParameter("reportDesc");

     String keyWords         = (String)request.getParameter("keywords");

     String reportFileLocation = (String)request.getParameter("reportFileLocation");

     String thumbnail = (String)request.getParameter("thumbnail");

 

     if (parentFolder != null)

     {

          int parentID = Integer.parseInt(parentFolder);

          try

          {

               String BOBJHome = "D:
Business Objects";

 

               System.setProperty(CeEnterpriseContext.BOBJ_ENTERPRISE_HOME, BOBJHome);

 

               IPluginMgr oPluginMgr = oInfoStore.getPluginMgr();

 

               IPluginInfo oPluginInfoNewReport = oPluginMgr.getPluginInfo("CrystalEnterprise.Report");

 

               IInfoObjects oInfoObjects = oInfoStore.newInfoObjectCollection();

               oInfoObjects.add(oPluginInfoNewReport);

            

               IInfoObject oInfoObjectNewReport = (IInfoObject)oInfoObjects.get(0);

 

               //Set the report name and file location

               oInfoObjectNewReport.setTitle(reportName);

               oInfoObjectNewReport.setDescription(reportDesc);

               oInfoObjectNewReport.setKeyword(keyWords);

               oInfoObjectNewReport.getFiles().addFile(reportFileLocation);               

 

               //Set the parent folder for the new report.

               oInfoObjectNewReport.properties().setProperty(CePropertyID.SI_PARENTID, parentID);

 

               IReport oReport = (IReport)oInfoObjectNewReport;               

               oReport.refreshProperties();// Getting ERROR at this step

 

               //Commit the new collection to the CMS using the commit method. This publishes the new report.

               oInfoStore.commit(oInfoObjects);

          }

 

In the above code I am getting an Unexpected error at the line oReport.refreshProperties();. The error message is as follows:

 

com.crystaldecisions.sdk.exception.SDKException$Unexpected: An unexpected error has occurred

cause:java.io.IOException: CreateProcess: "D:\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\plugins\desktop\CrystalEnterprise.Report\ReportAdd.exe" -report "C:\Workspace\CRJavaTest\WebContent\reports\Group By Interval.rpt" -newrpt -discard -version 1150 -thumbnail -outfile -token z00@1W@_4[]FWF7HfDc?S7JPm3W<?7ZM_aPK>0U8U5c528iK:Ddh>MjAm99SelC:CGbOSMZ;HkT7[]gN[_ghicj2KoM50 error=20

 

 

detail:An unexpected error has occurred

The exception originally thrown was java.io.IOException: CreateProcess: "D:\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\plugins\desktop\CrystalEnterprise.Report\ReportAdd.exe" -report "C:\Workspace\CRJavaTest\WebContent\reports\Group By Interval.rpt" -newrpt -discard -version 1150 -thumbnail -outfile -token z00@1W@_4[]FWF7HfDc?S7JPm3W<?7ZM_aPK>0U8U5c528iK:Ddh>MjAm99SelC:CGbOSMZ;HkT7[]gN[_ghicj2KoM50 error=20

        at com.crystaldecisions.sdk.plugin.desktop.report.internal.a.g(Unknown Source)

        at com.crystaldecisions.sdk.plugin.desktop.report.internal.a.g(Unknown Source)

        at com.crystaldecisions.sdk.plugin.desktop.report.internal.a.refreshProperties(Unknown Source)

        at jsp_servlet.__publish_report._jspService(__publish_report.java:336)

        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)

        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)

        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)

        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231)

        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)

        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)

        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)

        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)

        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

Caused by: java.io.IOException: CreateProcess: "D:\Business Objects\BusinessObjects Enterprise 11.5\win32_x86\plugins\desktop\CrystalEnterprise.Report\ReportAdd.exe" -report "C:\Workspace\CRJavaTest\WebContent\reports\Group By Interval.rpt" -newrpt -discard -version 1150 -thumbnail -outfile -token z00@1W@_4[]FWF7HfDc?S7JPm3W<?7ZM_aPK>0U8U5c528iK:Ddh>MjAm99SelC:CGbOSMZ;HkT7[]gN[_ghicj2KoM50 error=20

        at java.lang.ProcessImpl.create(Native Method)

        at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)

        at java.lang.ProcessImpl.start(ProcessImpl.java:30)

        at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)

        at java.lang.Runtime.exec(Runtime.java:591)

        at java.lang.Runtime.exec(Runtime.java:464)

        ... 17 more

 

If I comment that line, i.e. do not refresh the properties then this error does not occur and the report gets published but when I open the Object from the Central Management Web Console it shows an internal error and does not show the property tabs (i.e. Property, History, Process, etc.). In need help in finding out what this error is. I tried to google a lot about it and read a lot of documentation but did not find anything related. Any help will be appreciated.

 

Thanks

Manish


Viewing all articles
Browse latest Browse all 661

Trending Articles