Is “NullPointerException” a kind of bug?

Hi,
I am having problem with nullpointerexception error.

I create and utilize a workflow related to deep learning(keras), and suddenly the error occurs in all workflows.

ERROR Keras Network Learner 3:13 Execute failed: (“NullPointerException”): null

What I’m most curious about is that one day the error occurred suddenly, and it still works on other computers.

Please answer what is the cause of this problem and if there is a solution.

1 Like

Hi @zhddhkdn,

Can you provide a stack trace for the error? You can find it in the KNIME log (View -> Open KNIME log). Also, is there a difference in KNIME versions between the computers?

1 Like

Hi bwilhelm,

Sure,

There is no difference in KNIME versions(version: 4.2.0)

Here is a stack trace for error.

2020-09-24 20:26:03,697 : ERROR : main : : WindowsDefenderExceptionHandler : : : PowerShell command powershell -inputformat none -outputformat text -NonInteractive -Command Get-MpComputerStatus -ErrorAction Stop | select -ExpandProperty AMServiceEnabled did not terminate successfully.
2020-09-24 20:26:03,706 : ERROR : main : : WindowsDefenderExceptionHandler : : : Stderr is:
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : Get-MpComputerStatus : 쇅遺 硫붿꽌 뱶瑜 떎 뻾 븷 닔 뾾 뒿 땲 떎.
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : 쐞移 以 :1 臾몄옄:1
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : + Get-MpComputerStatus -ErrorAction Stop | select -ExpandProperty AMSer …
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : + CategoryInfo : MetadataError: (MSFT_MpComputerStatus:ROOT\Microsoft…pComputerStatus) [Get-MpComputer
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : Status], CimException
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : : + FullyQualifiedErrorId : MI RESULT 16,Get-MpComputerStatus
2020-09-24 20:26:03,707 : ERROR : main : : WindowsDefenderExceptionHandler : : :
2020-09-24 20:26:48,826 : WARN : ModalContext : : Node : Line Plot (local) : 0:18 : Some columns are ignored: bounds missing.
2020-09-24 20:27:07,535 : ERROR : KNIME-Worker-3-Keras Network Learner 0:13 : : Node : Keras Network Learner : 0:13 : Execute failed: Selected Keras back end ‘Keras (TensorFlow)’ is not available anymore. Please check your local installation.
Details: Installation test for Python back end ‘org.knime.dl.keras.tensorflow.core.DLKerasTensorFlowNetwork’ timed out. Please make sure your Python environment is properly set up and consider increasing the timeout (currently 25000 ms) using the VM option ‘-Dknime.dl.installationtesttimeout=’.
org.knime.core.node.InvalidSettingsException: Selected Keras back end ‘Keras (TensorFlow)’ is not available anymore. Please check your local installation.
Details: Installation test for Python back end ‘org.knime.dl.keras.tensorflow.core.DLKerasTensorFlowNetwork’ timed out. Please make sure your Python environment is properly set up and consider increasing the timeout (currently 25000 ms) using the VM option ‘-Dknime.dl.installationtesttimeout=’.
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.executeInternal(DLKerasLearnerNodeModel.java:642)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.execute(DLKerasLearnerNodeModel.java:303)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Thank you.

Hi @zhddhkdn,

Sorry for the late reply. I can’t find the “NullPointerException” that you mentioned earlier in your log. Your log suggests that your Python setup is not correct. How did you set up your Python environment? See here for a guide. If you can’t find an issue with your Python environment, can you post the output of conda list -n <environment_name>?

Hi,
I am sorry for omitting some part of log.
This is whole stack trace for the error.

2020-09-29 18:56:09,488 : ERROR : KNIME-Worker-8-Keras Network Learner 3:13 : : Node : Keras Network Learner : 3:13 : Execute failed: (“NullPointerException”): null
java.lang.NullPointerException
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.createLossFunctionMap(DLKerasLearnerNodeModel.java:896)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.createTrainingConfig(DLKerasLearnerNodeModel.java:871)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.executeInternal(DLKerasLearnerNodeModel.java:647)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.execute(DLKerasLearnerNodeModel.java:303)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1236)
at org.knime.core.node.Node.execute(Node.java:1016)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Also I checked the python environment in python deep learning(preferences).
There is no supplement message for executing deep learning nodes.

I think there is no problem in python environment.

I also attach my output of conda list -n environment name.

Name Version Build Channel

_ipyw_jlab_nb_ext_conf 0.1.0 py36_0
_tflow_select 2.2.0 eigen
absl-py 0.9.0 py36_0
anaconda-client 1.7.2 py36_0
anaconda-navigator 1.9.12 py36_0
astor 0.8.1 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
attrs 19.3.0 py_0
backcall 0.2.0 py_0
backports 1.0 py_2
backports.functools_lru_cache 1.6.1 py_0
backports.tempfile 1.0 py_1
backports.weakref 1.0.post1 py_1
beautifulsoup4 4.9.1 py36_0
blas 1.0 mkl
bleach 1.5.0 pypi_0 pypi
blinker 1.4 py36_0
brotlipy 0.7.0 py36he774522_1000
bzip2 1.0.8 he774522_0
ca-certificates 2020.6.24 0
cachetools 4.1.1 pypi_0 pypi
certifi 2020.6.20 py36_0
cffi 1.14.0 py36h7a1dbc1_0
chardet 3.0.4 py36_1003
click 7.1.2 py_0
clyent 1.2.2 py36_1
colorama 0.4.3 py_0
conda 4.8.3 py36_0
conda-build 3.18.11 py36_0
conda-env 2.6.0 1
conda-package-handling 1.6.1 py36h62dcd97_0
conda-verify 3.4.2 py_1
console_shortcut 0.1.1 4
cryptography 2.9.2 py36h7a1dbc1_0
decorator 4.4.2 py_0
defusedxml 0.6.0 py_0
entrypoints 0.3 py36_0
filelock 3.0.12 py_0
freetype 2.10.2 hd328e21_0
future 0.18.2 py36_1
gast 0.3.3 pypi_0 pypi
git 2.23.0 h6bb4b03_0
glob2 0.7 py_0
google-auth 1.20.0 pypi_0 pypi
google-auth-oauthlib 0.4.1 py_2
google-pasta 0.2.0 py_0
grpcio 1.30.0 pypi_0 pypi
h5py 2.10.0 py36h5e291fa_0
hdf5 1.10.4 h7ebc959_0
html5lib 0.9999999 pypi_0 pypi
icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha925a31_3
idna 2.10 py_0
importlib-metadata 1.7.0 py36_0
importlib_metadata 1.7.0 0
intel-openmp 2020.1 216
ipykernel 5.3.4 py36h5ca1d4c_0
ipython 7.16.1 py36h5ca1d4c_0
ipython_genutils 0.2.0 py36_0
ipywidgets 7.5.1 py_0
jedi 0.17.2 py36_0
jinja2 2.11.2 py_0
jpeg 9b hb83a4c4_2
json5 0.9.5 py_0
jsonschema 3.2.0 py36_0
jupyter_client 6.1.6 py_0
jupyter_core 4.6.3 py36_0
jupyterlab 2.1.5 py_0
jupyterlab_server 1.2.0 py_0
keras 2.4.3 pypi_0 pypi
keras-applications 1.0.8 py_1
keras-preprocessing 1.1.2 pypi_0 pypi
libarchive 3.4.2 h5e25573_0
libiconv 1.15 h1df5818_7
liblief 0.10.1 ha925a31_0
libpng 1.6.37 h2a8f88b_0
libprotobuf 3.12.3 h7bd577a_0
libsodium 1.0.18 h62dcd97_0
libtiff 4.1.0 h56a325e_1
libxml2 2.9.10 h464c3ec_1
lz4-c 1.9.2 h62dcd97_1
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
markdown 3.2.2 pypi_0 pypi
markupsafe 1.1.1 py36he774522_0
menuinst 1.4.16 py36he774522_1
mistune 0.8.4 py36he774522_0
mkl 2020.1 216
mkl-service 2.3.0 py36hb782905_0
mkl_fft 1.1.0 py36h45dec08_0
mkl_random 1.1.1 py36h47e9c7a_0
mock 4.0.2 pypi_0 pypi
msys2-conda-epoch 20160418 1
navigator-updater 0.2.1 py36_0
nbconvert 5.6.1 py36_0
nbformat 5.0.7 py_0
notebook 6.0.3 py36_0
numpy 1.18.5 pypi_0 pypi
oauthlib 3.1.0 py_0
olefile 0.46 py36_0
onnx 1.7.0 pypi_0 pypi
onnx-tf 1.6.0 dev_0
openssl 1.1.1g he774522_0
opt-einsum 3.3.0 pypi_0 pypi
opt_einsum 3.1.0 py_0
packaging 20.4 py_0
pandas 1.1.0 pypi_0 pypi
pandoc 2.10 0
pandocfilters 1.4.2 py36_1
parso 0.7.0 py_0
pickleshare 0.7.5 py36_0
pillow 7.2.0 py36hcc1f983_0
pip 20.1.1 py36_1
pkginfo 1.5.0.1 py36_0
powershell_shortcut 0.0.1 3
prometheus_client 0.8.0 py_0
prompt-toolkit 3.0.5 py_0
protobuf 3.12.4 pypi_0 pypi
psutil 5.7.0 py36he774522_0
py-lief 0.10.1 py36ha925a31_0
pyasn1 0.4.8 py_0
pyasn1-modules 0.2.8 pypi_0 pypi
pycosat 0.6.3 py36he774522_0
pycparser 2.20 py_2
pygments 2.6.1 py_0
pyjwt 1.7.1 py36_0
pyopenssl 19.1.0 py_1
pyparsing 2.4.7 py_0
pyqt 5.9.2 py36h6538335_2
pyreadline 2.1 py36_1
pyrsistent 0.16.0 py36he774522_0
pysocks 1.7.1 py36_0
python 3.6.10 h9f7ef89_2
python-dateutil 2.8.1 py_0
python-libarchive-c 2.9 py_0
pytz 2020.1 py_0
pywin32 227 py36he774522_1
pywinpty 0.5.7 py36_0
pyyaml 5.3.1 py36he774522_1
pyzmq 19.0.1 py36ha925a31_1
qt 5.9.7 vc14h73c81de_0
qtpy 1.9.0 py_0
requests 2.24.0 py_0
requests-oauthlib 1.3.0 py_0
rsa 4.6 pypi_0 pypi
ruamel_yaml 0.15.87 py36he774522_1
scipy 1.4.1 pypi_0 pypi
send2trash 1.5.0 py36_0
setuptools 49.2.0 py36_0
sip 4.19.8 py36h6538335_0
six 1.15.0 py_0
soupsieve 2.0.1 py_0
sqlite 3.32.3 h2a8f88b_0
tensorboard 2.3.0 pypi_0 pypi
tensorboard-plugin-wit 1.7.0 pypi_0 pypi
tensorflow 2.3.0 pypi_0 pypi
tensorflow-addons 0.10.0 pypi_0 pypi
tensorflow-estimator 1.13.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
terminado 0.8.3 py36_0
testpath 0.4.4 py_0
tk 8.6.10 he774522_0
tornado 6.0.4 py36he774522_1
tqdm 4.47.0 py_0
traitlets 4.3.3 py36_0
typeguard 2.9.1 pypi_0 pypi
typing-extensions 3.7.4.2 pypi_0 pypi
urllib3 1.25.9 py_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
wcwidth 0.2.5 py_0
webencodings 0.5.1 py36_1
werkzeug 0.16.1 py_0
wheel 0.34.2 py36_0
widgetsnbextension 3.5.1 py36_0
win_inet_pton 1.1.0 py36_0
wincertstore 0.2 py36h7fe50ca_0
winpty 0.4.3 4
wrapt 1.12.1 py36he774522_1
xmltodict 0.12.0 py_0
xz 5.2.5 h62dcd97_0
yaml 0.2.5 he774522_0
zeromq 4.3.2 ha925a31_2
zipp 3.1.0 py_0
zlib 1.2.11 h62dcd97_4
zstd 1.4.5 h04227a9_0

Any help would be appreciated.

Thank you.