Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 我已经创建了jar文件,但是它显示了类defnotfound错误?怎么逃脱这个?_Java_Logging_Portal - Fatal编程技术网

Java 我已经创建了jar文件,但是它显示了类defnotfound错误?怎么逃脱这个?

Java 我已经创建了jar文件,但是它显示了类defnotfound错误?怎么逃脱这个?,java,logging,portal,Java,Logging,Portal,我正在尝试从单个logger类实现多日志实现,并且使用jar文件根据模块选择动态加载logger文件。我得到一个如下所示的错误 发生了一个错误。 [返回的错误消息是:“method main.com/grpf/Jarclass中的错误” 有关其他错误信息,请参阅部署的应用程序中的日志文件夹 单击此处隐藏详细的错误消息 main.com/grpf/Jarclass方法中出现异常错误 static WebAppAccess rt; public static void main(String ar

我正在尝试从单个logger类实现多日志实现,并且使用jar文件根据模块选择动态加载logger文件。我得到一个如下所示的错误 发生了一个错误。 [返回的错误消息是:“method main.com/grpf/Jarclass中的错误”

有关其他错误信息,请参阅部署的应用程序中的日志文件夹

单击此处隐藏详细的错误消息

main.com/grpf/Jarclass方法中出现异常错误

static WebAppAccess rt;

public static void main(String args[]){
    CommonClassForLogFileSelection1();
}

public static String CommonClassForLogFileSelection1(){

    try{
        if(rt.getModelName().equals("qwe"))
        return "logf2";
        else
            return "CommonECPLogs";
    }catch(final Exception e){
        throw new WebAppRuntimeException( e, "PropertyFileSelectionHandler Has encountered an error while processing a profile" );
    }
}
堆栈跟踪 java.lang.NoClassDefFoundError:com/grpf/Jarclass

static WebAppAccess rt;

public static void main(String args[]){
    CommonClassForLogFileSelection1();
}

public static String CommonClassForLogFileSelection1(){

    try{
        if(rt.getModelName().equals("qwe"))
        return "logf2";
        else
            return "CommonECPLogs";
    }catch(final Exception e){
        throw new WebAppRuntimeException( e, "PropertyFileSelectionHandler Has encountered an error while processing a profile" );
    }
}

在类路径中包含jar,以便能够链接/使用它


这将有助于您了解

您是否链接到外部库?