【问题标题】:business objects program object schedule业务对象程序对象计划表
【发布时间】:2015-08-28 00:14:33
【问题描述】:
package com.ghc.bo.extract;

 //import com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase;
 import com.crystaldecisions.sdk.framework.IEnterpriseSession;
 import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
 import com.crystaldecisions.sdk.exception.*;
 import com.crystaldecisions.sdk.framework.*;


 public class ExecuteExtract implements com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase
 {


    public void run(IEnterpriseSession boEnterpriseSession, IInfoStore InfoStore, String[] args) 
    {
        System.out.println("Arguments are: ");

        for (int i=0; i<args.length; i++)
        {
            System.out.println("args[" + i + "]=" + args[i]);
        }

        try
        {
            String name = boEnterpriseSession.getUserInfo().getUserName();
            System.out.println("user \"" + name + "\" logged in via run() method");
        }
        catch(SDKException ske)
        {
            System.out.println(ske);
        }

        System.out.println("CMS is " + boEnterpriseSession.getCMSName());
    }

    public static void main(String[] args) 
    {

        IEnterpriseSession boEnterpriseSession = null;
        ISessionMgr boSessionMgr = null;
        IInfoStore boInfoStore = null;

        String userName = null;
        String cmsName = null;
        String password = null;
        String authType = null;     

        userName = args[0];
        password = args[1];
        cmsName = args[2];
        authType = args[3];


   if ((args.length == 4 || args.length == 5) && args[0] != null) 
       try
       {
          boSessionMgr = CrystalEnterprise.getSessionMgr();

          boEnterpriseSession = boSessionMgr.logon(userName, password, cmsName, authType);
          System.out.println("user \"" + userName + "\" logged in via main() method");

          boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");
       }
       catch (SDKException e)
       {
           System.out.println(e.getMessage());
           System.exit(1);
       }

       //call the run() method
       ExecuteExtract pot = new ExecuteExtract();
       pot.run(boEnterpriseSession, boInfoStore, args);

    }    
 }

您好,我运行了这个,我按照http://scn.sap.com/community/bi-platform/blog/2014/11/25/how-to-create-a-program-file-in-bi4#comment-613074 中的所有操作进行了操作,这基本上只是为了创建一个 jar 文件并为计划做最少的配置。我将 jar 创建为可运行和实用程序 jar,我打包/提取了包含的 jar 并将它们排除在外。我尝试了所有这些方法,并在程序参数中输入了类名“ExecuteExtract”,但仍然出现错误

Failed to load class: [ExecuteExtract]. Reason: [java.lang.ClassNotFoundException: ExecuteExtract].

有人知道我缺少什么吗?

【问题讨论】:

    标签: java jar executable-jar business-objects business-objects-sdk


    【解决方案1】:

    要么使用默认包,要么指定全限定类名(com.ghc.bo.extract.ExecuteExtract)作为程序对象参数中的类名。

    【讨论】:

    • 先生,这就是他们付给你大笔钱的原因
    猜你喜欢
    • 2011-02-18
    • 2010-09-15
    • 1970-01-01
    • 1970-01-01
    • 2021-11-22
    • 1970-01-01
    • 2016-08-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多