java调用python代码出现java.lang.NullPointerException: null

Posted Icy Hunter

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java调用python代码出现java.lang.NullPointerException: null相关的知识,希望对你有一定的参考价值。

2022-03-02 10:10:08.010 ERROR 6628 — [nio-8080-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

java.lang.NullPointerException: null
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012) ~[na:1.8.0_291]
at java.lang.Runtime.exec(Runtime.java:621) ~[na:1.8.0_291]
at java.lang.Runtime.exec(Runtime.java:486) ~[na:1.8.0_291]
at com.zufe.sbx.controller.KnowledgeController P r o c e s s i n p u t . d a t a p r o c e s s ( K n o w l e d g e C o n t r o l l e r . j a v a : 59 )   [ c l a s s e s / : n a ] a t c o m . z u f e . s b x . c o n t r o l l e r . K n o w l e d g e C o n t r o l l e r . p r o g r e s s ( K n o w l e d g e C o n t r o l l e r . j a v a : 37 )   [ c l a s s e s / : n a ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d )   [ n a : 1.8. 0 2 91 ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 )   [ n a : 1.8. 0 2 91 ] a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 )   [ n a : 1.8. 0 2 91 ] a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 498 )   [ n a : 1.8. 0 2 91 ] a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . d o I n v o k e ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 197 )   [ s p r i n g − w e b − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . i n v o k e F o r R e q u e s t ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 141 )   [ s p r i n g − w e b − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . i n v o k e A n d H a n d l e ( S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . j a v a : 106 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . i n v o k e H a n d l e r M e t h o d ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 895 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . h a n d l e I n t e r n a l ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 808 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . A b s t r a c t H a n d l e r M e t h o d A d a p t e r . h a n d l e ( A b s t r a c t H a n d l e r M e t h o d A d a p t e r . j a v a : 87 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o D i s p a t c h ( D i s p a t c h e r S e r v l e t . j a v a : 1064 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o S e r v i c e ( D i s p a t c h e r S e r v l e t . j a v a : 963 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . p r o c e s s R e q u e s t ( F r a m e w o r k S e r v l e t . j a v a : 1006 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . d o P o s t ( F r a m e w o r k S e r v l e t . j a v a : 909 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t j a v a x . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 681 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r : 4.0. F R ] a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . s e r v i c e ( F r a m e w o r k S e r v l e t . j a v a : 883 )   [ s p r i n g − w e b m v c − 5.3.9. j a r : 5.3.9 ] a t j a v a x . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 764 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r : 4.0. F R ] a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 228 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r : 9.0.50 ] a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 163 )   [ t o m c a t − e m b e d − c o r e − 9.0.50. j a r : 9.0.50 ] a t o r g . a p a c h e . t o m c a t . w e b s o c k e t . s e r v e r . W s F i l t e r . d o F i l t e r ( W s F i l t e r . j a v a : 53 )   [ t o m c a t − e m b e d − w e b s o c k e t − 9.0.50. j a r : 9.0.50 ] a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a

以上是关于java调用python代码出现java.lang.NullPointerException: null的主要内容,如果未能解决你的问题,请参考以下文章

java.lang.NullPointerException异常

java调用jacob组件出现的问题。

调用android的getColor()方法出现 java.lang.NoSuchMethodError: android.content.res.Resources.getColor

java.lang.RuntimeException:无法在未调用 Looper.prepare() 的线程内创建处理程序,在 android 中出现运行时错误

使用java.lang.Runtime.getRuntime无法在matlab中调用多个python脚本实例

出现java.lang.Exception: java.lang.RuntimeException: java.lang.NoSuchMethodException: com.web.visit.ma