ArrayIndexOutOfBoundsException while running the test cases using testng and jmockit, please sugest

188 views
Skip to first unread message

jalaj61

unread,
May 21, 2020, 3:52:37 AM5/21/20
to testng-dev
Thread [main] (Suspended (breakpoint at line 52 in ArrayIndexOutOfBoundsException))
owns: Object  (id=40)
ArrayIndexOutOfBoundsException.<init>(String) line: 52
ClassReader.readClass(int, char[]) line: 1761
ClassReader.getSuperName() line: 193
ExpectationsTransformer.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 123
ExpectationsTransformer(ClassFileTransformer).transform(Module, ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 246
TransformerManager.transform(Module, ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 188
InstrumentationImpl.transform(Module, ClassLoader, String, Class<?>, ProtectionDomain, byte[], boolean) line: 563
ClassLoader.defineClass1(ClassLoader, String, byte[], int, int, ProtectionDomain, String) line: not available [native method]
ClassLoaders$AppClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 1016
ClassLoaders$AppClassLoader(SecureClassLoader).defineClass(String, byte[], int, int, CodeSource) line: 174
ClassLoaders$AppClassLoader(BuiltinClassLoader).defineClass(String, Resource) line: 800
ClassLoaders$AppClassLoader(BuiltinClassLoader).findClassOnClassPathOrNull(String) line: 698
ClassLoaders$AppClassLoader(BuiltinClassLoader).loadClassOrNull(String, boolean) line: 621
ClassLoaders$AppClassLoader(BuiltinClassLoader).loadClass(String, boolean) line: 579
ClassLoaders$AppClassLoader.loadClass(String, boolean) line: 178
ClassLoaders$AppClassLoader(ClassLoader).loadClass(String) line: 521
ClassHelper.forName(String) line: 117
XmlClass.loadClass() line: 74 [local variables unavailable]
XmlClass.getSupportClass() line: 85 [local variables unavailable]
ClassInfoMap.<init>(List<XmlClass>, boolean) line: 28
ClassInfoMap.<init>(List<XmlClass>) line: 21
TestRunner.initMethods() line: 369 [local variables unavailable]
TestRunner.init() line: 271 [local variables unavailable]
TestRunner.init(IConfiguration, ISuite, XmlTest, String, IAnnotationFinder, boolean, Collection<IInvokedMethodListener>, List<IClassListener>) line: 241
TestRunner.<init>(IConfiguration, ISuite, XmlTest, String, IAnnotationFinder, boolean, Collection<IInvokedMethodListener>, List<IClassListener>, Comparator<ITestNGMethod>, Map<Class<IDataProviderListener>,IDataProviderListener>) line: 167
SuiteRunner$DefaultTestRunnerFactory.newTestRunner(ISuite, XmlTest, Collection<IInvokedMethodListener>, List<IClassListener>, Map<Class<IDataProviderListener>,IDataProviderListener>) line: 663
SuiteRunner.init(IConfiguration, XmlSuite, String, ITestRunnerFactory, boolean, List<IMethodInterceptor>, Collection<IInvokedMethodListener>, Collection<ITestListener>, Collection<IClassListener>, Map<Class<IDataProviderListener>,IDataProviderListener>, Comparator<ITestNGMethod>) line: 260
SuiteRunner.<init>(IConfiguration, XmlSuite, String, ITestRunnerFactory, boolean, List<IMethodInterceptor>, Collection<IInvokedMethodListener>, Collection<ITestListener>, Collection<IClassListener>, Map<Class<IDataProviderListener>,IDataProviderListener>, Comparator<ITestNGMethod>) line: 198
TestNG.createSuiteRunner(XmlSuite) line: 1295
TestNG.createSuiteRunners(SuiteRunnerMap, XmlSuite) line: 1273
TestNG.runSuitesLocally() line: 1128
TestNG.runSuites() line: 1049 [local variables unavailable]
TestNG.run() line: 1017
TestNGExecutor.run(List<String>, String, Map<String,String>, RunListener, File, int) line: 283
TestNGXmlTestSuite.execute(RunListener) line: 75
TestNGProvider.invoke(Object) line: 120
ForkedBooter.invokeProviderInSameClassLoader(ForkingReporterFactory) line: 383
ForkedBooter.runSuitesInProcess() line: 344
ForkedBooter.execute() line: 125
ForkedBooter.main(String...) line: 417

Julien Herr

unread,
May 21, 2020, 4:00:15 AM5/21/20
to testng-dev
Hi,

Could you provide us a minimal project that reproduces the issue?

Do you reproduce the issue without jmockit?
If not, you should ask for help from them.

Regards,
Julien

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-dev/7acf7b18-2aab-4319-8360-e3d2bed1f597%40googlegroups.com.

jalaj61

unread,
May 21, 2020, 6:49:42 AM5/21/20
to testng-dev
Hi Julien, 
   Thanks for  the quick response, although I forgot to mention that I am also using the JaCoCo.As you pointed on jmocjit, I started google, keeping focus on jmockit , and found the below link  
As per that jmockit is not working properly with JaCoCo 0.8.5 , but it works well with JaCoCo 0.8.3, hence I moved to JaCoCo version 0.8.3 , and it is working properly.
Thanks a lot.
Regards
Jalaj

jalaj61

unread,
May 21, 2020, 7:05:47 AM5/21/20
to testng-dev
As this issue is still open as per the link - 
https://github.com/jmockit/jmockit1/issues/637
I shifted down to 0.8.3 JaCoCo which works 
Reply all
Reply to author
Forward
0 new messages