Java 如何解决JBoss远程错误?

Java 如何解决JBoss远程错误?,java,junit,jboss,compiler-errors,Java,Junit,Jboss,Compiler Errors,我试图在JUnit中运行JBoss remote,但遇到一个错误: 原因:java.lang.VerifyError:无法从最终类继承 以下是JUnit类的远程部分: import static org.junit.Assert.*; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; import org.junit.After; import org.jun

我试图在JUnit中运行JBoss remote,但遇到一个错误:

原因:java.lang.VerifyError:无法从最终类继承

以下是JUnit类的远程部分:

import static org.junit.Assert.*;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.SessionManager;

public class Test1 {

    private static SessionManager _service;

    @BeforeClass
    public static void doSms() throws Exception {
        String JBOSS_CONTEXT = "org.jboss.naming.remote.client.InitialContextFactory";
        Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT);
        properties.put(Context.PROVIDER_URL, "remote://localhost:4447");
        properties.put(Context.SECURITY_PRINCIPAL, "testuser");
        properties.put(Context.SECURITY_CREDENTIALS, "testpassword");
        _service = (SessionManager) new InitialContext(properties).lookup("java:global/SessionManager");
    }
}

此错误不属于JUnit中的JBoss Remote

检查放置在类路径中的所有必需jar

避免同一个jar与两个版本之间发生冲突(不要添加两个不同版本的jar)。

我已经删除了两个jar(/w不同版本),并且没有任何更改。