Throw NullPointerException when run from CMD

When start to run test suite, it always throw NullPointerException. Anyone know how to fix this?
C:\WINDOWS\system32>katalonc -noSplash -runMode=console -projectPath=“C:\Repository\Platform\Platform.prj” -retry=0 -testSuitePath=“Test Suites/Customer_xxxx” -executionProfile=“default” -browserType=“Chrome” -apiKey=“xxxxxxxxxx” --config -proxy.auth.option=NO_PROXY -proxy.system.option=NO_PROXY -proxy.system.applyToDesiredCapabilities=true
Katalon workspace folder is set to default location: C:\Users\Cxxxx\AppData\Local\Temp\session-edbccb1d
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
131 2.4.7.xx-201611170128-e46 = ACTIVE

INFO: Katalon Version: 7.6.2
INFO: Command-line arguments: -runMode=console -projectPath=C:\Repository\Platform\Platform.prj -retry=0 -testSuitePath=Test Suites/Customer_xxxx -executionProfile=default -browserType=Chrome -apiKey=******** --config -proxy.auth.option=NO_PROXY -proxy.system.option=NO_PROXY -proxy.system.applyToDesiredCapabilities=true
INFO: User working dir: C:\WINDOWS\system32
INFO: Error log: C:/Users/Cxxxx/AppData/Local/Temp/session-edbccb1d/.metadata/.log
INFO: Katalon TestOps server URL: https://analytics.katalon.com
INFO: Katalon Store server URL: https://store.katalon.com
INFO: User home: C:\Users\Cxxxx
INFO: Java vendor: Oracle Corporation
INFO: Java version: 1.8.0_181
INFO: Local OS: Windows 10 64bit
INFO: CPU load: 12%
INFO: Total memory: 16190 MB
INFO: Free memory: 2929 MB
Start getting machine ID on Windows
Start appending additional signatures
hardwareSerialNumber
osDependentUsername cxxxx
End appending additional signatures 79302547-3eca-4f1f-8515-86ed021cca65__cxxxx
End getting machine ID on Windows a17c4b176f580a9cd78d1ee11d9ab7f6
INFO: Machine ID: a17c4b176f580a9cd78d1ee11d9ab7f6

Activating…
Start activating offline…
Search for valid offline licenses in folder: C:\Users\Cxxxxx.katalon\license
The number of valid offline licenses: 0
Offline activation failed.
Start activating online…
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
Delete folder: bin
Delete folder: Libs
Cleaning up workspace
Opening project file: C:\Repository\Platform\Platform.prj
/C%%Repository%Platform%Platform.prj/Test Listeners/TestListener.groovy: 13 Groovy:unable to resolve class internal.GlobalVariable
Generating global variables…
Parsing custom keywords…

Fri Jul 31 15:48:03 CST 2020
java.lang.NullPointerException
at com.kms.katalon.util.jdt.JDTUtil.findMethod(JDTUtil.java:47)
at com.kms.katalon.custom.parser.CustomKeywordParser.findJavadoc(CustomKeywordParser.java:299)
at com.kms.katalon.custom.parser.CustomKeywordParser.collectMethodJavadocs(CustomKeywordParser.java:292)
at com.kms.katalon.custom.parser.CustomKeywordParser.parseCustomKeywordFile(CustomKeywordParser.java:278)
at com.kms.katalon.custom.parser.CustomKeywordParser.parseProjectCustomKeywords(CustomKeywordParser.java:81)
at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(KeywordController.java:152)
at com.kms.katalon.controller.ProjectController.openProject(ProjectController.java:213)
at com.kms.katalon.execution.console.ConsoleMain.getProject(ConsoleMain.java:569)
at com.kms.katalon.execution.console.ConsoleMain.findProject(ConsoleMain.java:463)
at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:291)
at com.kms.katalon.console.application.ConsoleApplicationStarter.start(ConsoleApplicationStarter.java:37)
at com.kms.katalon.application.Application.runConsole(Application.java:120)
at com.kms.katalon.application.Application.start(Application.java:84)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

Does this happen only in CMD mode ? if yes try getting a fresh katalon installation
if not then it might be one of you custom keywords

Hi @ti.wang01,
We’ve acknowledged the issue and will release a fix soon.

Thank you, is it a code issue of Katalon itself?

This error also always comes up when run suite via Jenkins. (Katalon version: 7.6.1 & 7.6.2)

@ti.wang01
This issue is an internal bug and doesn’t not affect your test result. We will fix this in upcoming releases.

Thanks for your report.

Is this issue fixed or are there any workaround? We are facing the same issue.

@duyluong, may I know which version of Katalon contains this fix?

Hi @ti.wang01, @qatools

Please update to v7.7.2 for the fix.

Thanks

Hi @duyluong,
In fact, this issue is still reproducing on v7.7.2:
Start reloading plugins…
Katalon version: 7.7.2
Plugin info URL: https://store.katalon.com/api/products/ks?appVersion=7.7.2&appType=ENGINE&licenseType=ENTERPRISE

Fri Oct 16 11:23:23 CST 2020
java.lang.NullPointerException
** at com.kms.katalon.util.jdt.JDTUtil.findMethod(JDTUtil.java:47)**
** at com.kms.katalon.custom.parser.CustomKeywordParser.findJavadoc(CustomKeywordParser.java:299)**
** at com.kms.katalon.custom.parser.CustomKeywordParser.collectMethodJavadocs(CustomKeywordParser.java:292)**
** at com.kms.katalon.custom.parser.CustomKeywordParser.parseCustomKeywordFile(CustomKeywordParser.java:278)**
** at com.kms.katalon.custom.parser.CustomKeywordParser.parseProjectCustomKeywords(CustomKeywordParser.java:81)**
** at com.kms.katalon.controller.KeywordController.parseAllCustomKeywords(KeywordController.java:152)**
** at com.kms.katalon.activation.plugin.service.PluginService.refreshProjectClasspath(PluginService.java:402)**
** at com.kms.katalon.activation.plugin.service.PluginService.reloadPlugins(PluginService.java:231)**
** at com.kms.katalon.activation.plugin.handler.ConsoleModeReloadPluginsHandler.reload(ConsoleModeReloadPluginsHandler.java:22)**
** at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)**
** at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)**
** at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)**
** at java.lang.reflect.Method.invoke(Method.java:498)**
** at com.kms.katalon.execution.console.ConsoleMain.reloadPlugins(ConsoleMain.java:384)**
** at com.kms.katalon.execution.console.ConsoleMain.launch(ConsoleMain.java:311)**
** at com.kms.katalon.console.application.ConsoleApplicationStarter.start(ConsoleApplicationStarter.java:37)**
** at com.kms.katalon.application.Application.runConsole(Application.java:125)**
** at com.kms.katalon.application.Application.start(Application.java:88)**
** at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)**
** at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)**
** at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)**
** at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)**
** at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)**
** at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)**
** at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)**
** at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)**
** at java.lang.reflect.Method.invoke(Method.java:498)**
** at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)**
** at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)**
** at org.eclipse.equinox.launcher.Main.run(Main.java:1519)**

1 Like