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 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 : 190 )   [ 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 . s p r i n g f r a m e w o r k . w e b . f i l t e r . R e q u e s t C o n t e x t F i l t e r . d o F i l t e r I n t e r n a l ( R e q u e s t C o n t e x t F i l t e r . j a v a : 100 )   [ 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 . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 119 )   [ s p r i n g − w e b − 5.3.9. j a r : 5.3.9 ] 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 : 190 )   [ 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 . s p r i n g f r a m e w o r k . w e b . f i l t e r . F o r m C o n t e n t F i l t e r . d o F i l t e r I n t e r n a l ( F o r m C o n t e n t F i l t e r . j a v a : 93 )   [ 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 . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 119 )   [ s p r i n g − w e b − 5.3.9. j a r : 5.3.9 ] 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 : 190 )   [ 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 . s p r i n g f r a m e w o r k . w e b . f i l t e r . C h a r a c t e r E n c o d i n g F i l t e r . d o F i l t e r I n t e r n a l ( C h a r a c t e r E n c o d i n g F i l t e r . j a v a : 201 )   [ 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 . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 119 )   [ s p r i n g − w e b − 5.3.9. j a r : 5.3.9 ] 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 : 190 )   [ 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 . c a t a l i n a . c o r e . S t a n d a r d W r a p p e r V a l v e . i n v o k e ( S t a n d a r d W r a p p e r V a l v e . j a v a : 202 )   [ 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 . S t a n d a r d C o n t e x t V a l v e . i n v o k e ( S t a n d a r d C o n t e x t V a l v e . j a v a : 97 ) [ 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 . a u t h e n t i c a t o r . A u t h e n t i c a t o r B a s e . i n v o k e ( A u t h e n t i c a t o r B a s e . j a v a : 542 ) [ 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 . S t a n d a r d H o s t V a l v e . i n v o k e ( S t a n d a r d H o s t V a l v e . j a v a : 143 ) [ 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 . v a l v e s . E r r o r R e p o r t V a l v e . i n v o k e ( E r r o r R e p o r t V a l v e . j a v a : 92 ) [ 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 . S t a n d a r d E n g i n e V a l v e . i n v o k e ( S t a n d a r d E n g i n e V a l v e . j a v a : 78 ) [ 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 n n e c t o r . C o y o t e A d a p t e r . s e r v i c e ( C o y o t e A d a p t e r . j a v a : 357 ) [ 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 o y o t e . h t t p 11. H t t p 11 P r o c e s s o r . s e r v i c e ( H t t p 11 P r o c e s s o r . j a v a : 382 ) [ 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 o y o t e . A b s t r a c t P r o c e s s o r L i g h t . p r o c e s s ( A b s t r a c t P r o c e s s o r L i g h t . j a v a : 65 ) [ 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 o y o t e . A b s t r a c t P r o t o c o l Process_input.data_process(KnowledgeController.java:59) ~[classes/:na] at com.zufe.sbx.controller.KnowledgeController.progress(KnowledgeController.java:37) ~[classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_291] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_291] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_291] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_291] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.9.jar:5.3.9] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.9.jar:5.3.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.50.jar:4.0.FR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.9.jar:5.3.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.50.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.9.jar:5.3.9] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar:5.3.9] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.coyote.AbstractProtocol Processinput.dataprocess(KnowledgeController.java:59) [classes/:na]atcom.zufe.sbx.controller.KnowledgeController.progress(KnowledgeController.java:37) [classes/:na]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [na:1.8.0291]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0291]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0291]atjava.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0291]atorg.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) [springweb5.3.9.jar:5.3.9]atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) [springweb5.3.9.jar:5.3.9]atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) [springwebmvc5.3.9.jar:5.3.9]atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) [springwebmvc5.3.9.jar:5.3.9]atjavax.servlet.http.HttpServlet.service(HttpServlet.java:681) [tomcatembedcore9.0.50.jar:4.0.FR]atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) [springwebmvc5.3.9.jar:5.3.9]atjavax.servlet.http.HttpServlet.service(HttpServlet.java:764) [tomcatembedcore9.0.50.jar:4.0.FR]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcatembedwebsocket9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) [tomcatembedcore9.0.50.jar:9.0.50]atorg.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) [springweb5.3.9.jar:5.3.9]atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [springweb5.3.9.jar:5.3.9]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) [tomcatembedcore9.0.50.jar:9.0.50]atorg.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) [springweb5.3.9.jar:5.3.9]atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [springweb5.3.9.jar:5.3.9]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) [tomcatembedcore9.0.50.jar:9.0.50]atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) [springweb5.3.9.jar:5.3.9]atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) [springweb5.3.9.jar:5.3.9]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:190) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.coyote.AbstractProtocolConnectionHandler.process(AbstractProtocol.java:893) [tomcat-embed-core-9.0.50.jar:9.0.50]
at org.apache.tomcat.util.net.NioEndpoint S o c k e t P r o c e s s o r . d o R u n ( N i o E n d p o i n t . j a v a : 1723 ) [ 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 . u t i l . n e t . S o c k e t P r o c e s s o r B a s e . r u n ( S o c k e t P r o c e s s o r B a s e . j a v a : 49 ) [ 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 j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1149 ) [ n a : 1.8. 0 2 91 ] a t j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r SocketProcessor.doRun(NioEndpoint.java:1723) [tomcat-embed-core-9.0.50.jar:9.0.50] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.50.jar:9.0.50] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_291] at java.util.concurrent.ThreadPoolExecutor SocketProcessor.doRun(NioEndpoint.java:1723)[tomcatembedcore9.0.50.jar:9.0.50]atorg.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcatembedcore9.0.50.jar:9.0.50]atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[na:1.8.0291]atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624) [na:1.8.0_291]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.50.jar:9.0.50]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_291]

这个错误莫名其妙地出现,最后发现是因为传参数组开大了导致的。
当传参数组为3时,我只使用了第一和第二个,第三个为空,就报了上面地错误

            String[] args1 = new String[3];  
            args1[0] = "D:\\anaconda\\envs\\TF2.1\\python.exe";//配置编译器路径
            args1[1] = "D:\\pcham\\a.py";//配置运行py文件路径
            proc = Runtime.getRuntime().exec(args1);//执行调用

解决办法

            String[] args1 = new String[2];//开多少用多少  
            args1[0] = "D:\\anaconda\\envs\\TF2.1\\python.exe";//配置编译器路径
            args1[1] = "D:\\pcham\\a.py";//配置运行py文件路径
            proc = Runtime.getRuntime().exec(args1);//执行调用

你可能感兴趣的:(BUG解决,java)