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

I am experiencing the same problem using KRE and version 7.7.2.

EDIT: Tried version 7.8.0, same problem.

Hi @Nilau,
Thank you for your report. We will have a look into this issue again.

I can confirm this issue with 7.7.2 as well

hallo @huynguyen

any update about this issue? i try at jenkins katalon v7.7.2

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)

Hi @ti.wang01, @yoyox98, @qatools, @Nilau, @clif.molina, @Alwan_Firdaus,
We have built the package 7.7.8.rc2 including the fix for this issue. Please download it at https://github.com/katalon-studio/katalon-studio/releases/tag/v7.7.8.rc2 and try again.

1 Like

hallo @huynguyen

thank you. i will try and soon to report it again

Glad to hear that, @Alwan_Firdaus. If the problem still persists, please share with us your whole project, via private messages, for further investigation.

sorry @huynguyen

this version just application of katalon? how if i want to update on docker image? because my problem when running on jenkins with docker image

this is my sample

Hi @Alwan_Firdaus,
We haven’t built the Docker image for this version, as it is still the release candidate. To have the fix available in the official release, I need to be confirmed that the fix actually works when you use the standalone KRE.