DTStack / Taier

Taier is a big data development platform for submission, scheduling, operation and maintenance, and indicator information display
https://dtstack.github.io/Taier/
Apache License 2.0
1.33k stars 334 forks source link

[bug]spark sql 执行npe #1100

Closed vainhope closed 1 year ago

vainhope commented 1 year ago

Search before asking

What happened

java.lang.reflect.UndeclaredThrowableException at com.sun.proxy.$Proxy241.getCon(Unknown Source) at com.dtstack.taier.develop.utils.develop.service.impl.JdbcServiceImpl.executeQueryWithVariables(JdbcServiceImpl.java:79) at com.dtstack.taier.develop.utils.develop.service.impl.JdbcServiceImpl.executeQuery(JdbcServiceImpl.java:53) at com.dtstack.taier.develop.service.develop.runner.JdbcTaskRunner.startSqlImmediately(JdbcTaskRunner.java:92) at com.dtstack.taier.develop.service.develop.runner.HadoopJdbcTaskRunner.startSqlImmediately(HadoopJdbcTaskRunner.java:113) at com.dtstack.taier.develop.service.develop.impl.DevelopJobService.startSqlImmediately(DevelopJobService.java:276) at com.dtstack.taier.develop.controller.develop.DevelopJobController$4.process(DevelopJobController.java:95) at com.dtstack.taier.develop.controller.develop.DevelopJobController$4.process(DevelopJobController.java:92) at com.dtstack.taier.common.lang.coc.APITemplate.execute(APITemplate.java:107) at com.dtstack.taier.develop.controller.develop.DevelopJobController.startSqlImmediately(DevelopJobController.java:98) 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.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.dtstack.taier.develop.filter.DtRequestWrapperFilter.doFilterInternal(DtRequestWrapperFilter.java:96) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: com.dtstack.taier.datasource.api.exception.SourceException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:206) at com.dtstack.taier.datasource.api.utils.RetryUtils$AsyncRetry.call(RetryUtils.java:183) at com.dtstack.taier.datasource.api.utils.RetryUtils$Retry.doRetry(RetryUtils.java:99) at com.dtstack.taier.datasource.api.utils.RetryUtils.asyncExecuteWithRetry(RetryUtils.java:65) at com.dtstack.taier.datasource.api.proxy.ClientProxyInvocationHandle.invokeMethod(ClientProxyInvocationHandle.java:77) at com.dtstack.taier.datasource.api.proxy.ClientProxyInvocationHandle.invoke(ClientProxyInvocationHandle.java:58) ... 56 more Caused by: java.lang.Exception: com.dtstack.taier.datasource.api.exception.SourceException at com.dtstack.taier.datasource.api.proxy.ClientProxyInvocationHandle.lambda$invokeMethod$0(ClientProxyInvocationHandle.java:82) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ... 1 more Caused by: com.dtstack.taier.datasource.api.exception.SourceException at com.dtstack.taier.datasource.plugin.rdbms.AbsRdbmsClient.getCon(AbsRdbmsClient.java:158) 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.dtstack.taier.datasource.api.proxy.ClientProxyInvocationHandle.lambda$invokeMethod$0(ClientProxyInvocationHandle.java:79) ... 4 more Caused by: java.lang.NullPointerException at java.lang.String.startsWith(String.java:1405) at java.lang.String.startsWith(String.java:1434) at com.dtstack.taier.datasource.plugin.common.utils.PropertiesUtil.convertToProp(PropertiesUtil.java:63) at com.dtstack.taier.datasource.plugin.common.utils.PropertiesUtil.convertToProp(PropertiesUtil.java:38) at com.dtstack.taier.datasource.plugin.spark.SparkConnFactory.lambda$getConn$0(SparkConnFactory.java:60) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:360) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1678) at com.dtstack.taier.datasource.plugin.spark.SparkConnFactory.getConn(SparkConnFactory.java:55) at com.dtstack.taier.datasource.plugin.rdbms.AbsRdbmsClient.getCon(AbsRdbmsClient.java:154) ... 9 more

What you expected to happen

正常执行

How to reproduce

执行spark sql

Anything else

No response

Version

master

Are you willing to submit PR?

Code of Conduct