Java Testng类文件中非本机或抽象的方法中缺少代码属性

Java Testng类文件中非本机或抽象的方法中缺少代码属性,java,testng,classformaterror,Java,Testng,Classformaterror,我们在运行testNG测试用例时遇到以下错误。我们还尝试了在现场提供的建议,但对我们没有帮助: 我是否可以在参数中看到这些值: java.lang.ClassFormatError:在类文件javax/ejb/TransactionaAttribute类型中,方法中缺少非本机或抽象的代码属性 文件:/abc/xyz/123/abc/.m2/repository/javaee/javaee-api/6/javaee-api-6.jar java.lang.ClassFormatError: Ab

我们在运行testNG测试用例时遇到以下错误。我们还尝试了在现场提供的建议,但对我们没有帮助:

我是否可以在参数中看到这些值:

java.lang.ClassFormatError:在类文件javax/ejb/TransactionaAttribute类型中,方法中缺少非本机或抽象的代码属性

文件:/abc/xyz/123/abc/.m2/repository/javaee/javaee-api/6/javaee-api-6.jar

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ejb/TransactionAttributeType
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
    at java.lang.Class.getDeclaredMethods(Class.java:1845)
    at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:104)
    at sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:101)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:100)
    at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:84)
    at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:221)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
    at java.lang.reflect.Method.declaredAnnotations(Method.java:714)
    at java.lang.reflect.Method.getAnnotation(Method.java:700)
    at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:103)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:60)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:575)
    at org.testng.SuiteRunner.init(SuiteRunner.java:159)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:113)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
java.lang.ClassFormatError:在类文件javax/ejb/TransactionAttributeType中,方法中缺少非本机或抽象的代码属性
位于java.lang.ClassLoader.defineClass1(本机方法)
位于java.lang.ClassLoader.defineClass(ClassLoader.java:792)
位于java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
位于java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
在java.net.URLClassLoader.access$100(URLClassLoader.java:71)
在java.net.URLClassLoader$1.run(URLClassLoader.java:361)
在java.net.URLClassLoader$1.run(URLClassLoader.java:355)
位于java.security.AccessController.doPrivileged(本机方法)
位于java.net.URLClassLoader.findClass(URLClassLoader.java:354)
位于java.lang.ClassLoader.loadClass(ClassLoader.java:424)
位于sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
位于java.lang.ClassLoader.loadClass(ClassLoader.java:357)
位于java.lang.Class.getDeclaredMethods0(本机方法)
位于java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
位于java.lang.Class.getDeclaredMethods(Class.java:1845)
位于sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:104)
位于sun.reflect.annotation.AnnotationType$1.run(AnnotationType.java:101)
位于java.security.AccessController.doPrivileged(本机方法)
位于sun.reflect.annotation.AnnotationType。(AnnotationType.java:100)
位于sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:84)
位于sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:221)
位于sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
位于sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
位于java.lang.reflect.Method.declaredAnnotations(Method.java:714)
位于java.lang.reflect.Method.getAnnotation(Method.java:700)
位于org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:103)
位于org.testng.internal.TestNGClassFinder(TestNGClassFinder.java:60)
位于org.testng.TestRunner.initMethods(TestRunner.java:409)
位于org.testng.TestRunner.init(TestRunner.java:235)
位于org.testng.TestRunner.init(TestRunner.java:205)
位于org.testng.TestRunner.(TestRunner.java:160)
在org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
位于org.testng.remote.RemoteTestNG$delegatingestrunnerfactory.newTestRunner(RemoteTestNG.java:271)
位于org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:575)
位于org.testng.SuiteRunner.init(SuiteRunner.java:159)
位于org.testng.SuiteRunner(SuiteRunner.java:113)
位于org.testng.testng.createSuiteRunner(testng.java:1299)
位于org.testng.testng.createSuiteRunners(testng.java:1286)
位于org.testng.testng.runSuitesLocally(testng.java:1140)
位于org.testng.testng.run(testng.java:1057)
位于org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
位于org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
位于org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

在项目构建路径中添加weblogic full client后,我们可以运行testNG TCs。

能否请您详细说明您是如何“尝试在站点上提供建议”的?我在构建类路径中添加了javaee.jar。您能说一下您在构建路径中添加了哪个jar吗?你从哪里下载的?