3 Replies Latest reply: Mar 16, 2013 10:55 PM by user12301120 RSS

    Error After custom javahost program running.

    806113
      Hi all.

      We developed a javahost program which's running after ibot.

      It's role is downloading a attached pdf or mht file to local directory.

      we register it a ibot >> Advanced >>Add Action >> Custom Java Program.

      It works when a attached file size is small. (only contains text)

      but it fail when attached file is big(it contains multi contents including charts).

      below is our environment.

      thanks in advance.
      -------------------------------------
      Server version : Linux, 10.1.3.4.0

      javahost config file
      ---------------------------
      <Scheduler>
      <!-- Enabled the feature or not, by default feature is not enabled. -->
      <Enabled>True</Enabled>

      <!-- Required field, default location for user to put their Java extension, utility jar files. -->
      <DefaultUserJarFilePath>/oracle/BIEE/OracleBI/web/javahost/lib/</DefaultUserJarFilePath>

      <!-- Default temp file location for Scheduler RPC calls, by default is at system temp directory -->
      <!-- <DefaultTempFilePath/> -->

      <!-- Default purging period for Scheduler RPC calls to clean up failed jobs, by default is 300 seconds -->
      <!-- <DefaultPurgingPeriod/> -->
      </Scheduler>

      <XMLP>
      <InputStreamLimitInKB>4096</InputStreamLimitInKB>
      </XMLP>
      ---------------------------
      custom java program
      --------------------------
      public class LocalFileSave implements SchedulerJavaExtension{

      public void run(SchedulerJobInfo jobInfo) throws SchedulerJobException {
      String today = this.getToday();
      String filePrefix = jobInfo.parameter(0);
      String fileExt = jobInfo.parameter(1);
      String dir = "/oracle/BIEE/OracleBI/oc4j_bi/j2ee/home/default-web-app/ibot_stx/";
      String fileName = dir + filePrefix+"_"+today+"."+fileExt;

      System.out.println("================START==================");
      System.out.println("JobID is:" + jobInfo.jobID());
      System.out.println("Instance ID is:" + jobInfo.instanceID());
      System.out.println("JobInfo to string is:" + jobInfo.toString());
      System.out.println("FileName:" + fileName);
      try
      {
      FileInputStream fileInputStr = new FileInputStream(jobInfo.getResultSetFile());
      DeliveryManager delMan = new DeliveryManager();
      DeliveryRequest delReq = delMan.createRequest(DeliveryManager.TYPE_LOCAL);
      delReq.addProperty(LocalPropertyDefinitions.LOCAL_DESTINATION, fileName);
      delReq.setDocument(fileInputStr);
      delReq.submit();
      delReq.close();
      fileInputStr.close();
      }
      catch(Exception ex)
      {
      throw new SchedulerJobException(1, 1, ex.getMessage());
      }
      System.out.println("================ END ==================");
      }

      public void cancel() {
      }

      public String getToday(){

      Date todaysDate = new java.util.Date();
      SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");

      String formattedDate = formatter.format(todaysDate);
      return formattedDate;
      }

      }
      --------------------------
      javahost.out.log
      -------------------------
      2010. 10. 27 오후 5:50:39 MessageProcessorImpl processMessage
      경고: Unexpected exception. Connection will be closed
      java.io.EOFException
      at com.siebel.analytics.web.sawconnect.sawprotocol.SAWProtocol.readInt(SAWProtocol.java:167)
      at com.siebel.analytics.javahost.MessageProcessorImpl.processMessage(MessageProcessorImpl.java:133)
      at com.siebel.analytics.javahost.Listener$Job.run(Listener.java:223)
      at com.siebel.analytics.javahost.standalone.SAJobManagerImpl.threadMain(SAJobManagerImpl.java:205)
      at com.siebel.analytics.javahost.standalone.SAJobManagerImpl$1.run(SAJobManagerImpl.java:153)
      at java.lang.Thread.run(Thread.java:595)
      --------------------------

      Edited by: vingorius on 2010. 10. 27 오전 1:51

      Edited by: vingorius on 2010. 10. 27 오전 1:52