解决方案 »

  1.   

    这点信息勉为其那那,你自己先debug吧!
      

  2.   


    ava.lang.NullPointerException
            at com.test.service.ProductServiceImpl.saveBranch(ProductServiceImpl.java:829)
            at com.test.service.ProductServiceImpl.saveProduct(ProductServiceImpl.java:245)
            at sun.reflect.GeneratedMethodAccessor3369.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            at $Proxy462.saveProduct(Unknown Source)
            at com.test.service.PProductServiceImpl.prodProductAuditPass(PProductServiceImpl.java:385)
            at sun.reflect.GeneratedMethodAccessor3368.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            at $Proxy465.prodProductAuditPass(Unknown Source)
            at com.test.service.PAuditServiceProxy.auditPassByUser(PAuditServiceProxy.java:66)
            at sun.reflect.GeneratedMethodAccessor3262.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            at $Proxy468.auditPassByUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor3262.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:77)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
            at $Proxy468.auditPassByUser(Unknown Source)
            at sun.reflect.GeneratedMethodAccessor3262.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:306)
            at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:221)
            at org.springframework.remoting.caucho.HessianExporter.doInvoke(HessianExporter.java:198)
            at org.springframework.remoting.caucho.HessianExporter.invoke(HessianExporter.java:118)
            at org.springframework.remoting.caucho.HessianServiceExporter.handleRequest(HessianServiceExporter.java:66)
            at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:774)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
            at java.lang.Thread.run(Thread.java:662)
    不要跟我说那个出错的行数的地方
      

  3.   

    at com.test.service.ProductServiceImpl.saveBranch(ProductServiceImpl.java:829)
            at com.test.service.ProductServiceImpl.saveProduct(ProductServiceImpl.java:245)还是从这两行下手分析吧。看saveBranch 需要什么参数,看方法内部是否需要某一个参数项为非空的,但实际却给了空值。从这个思路分析下吧。
      

  4.   


    错误指向的代码行数 是简单的对象set属性值,并且值是一个常量
    这个是线上出现的问题。。不是测试环境
      

  5.   


    很明显 你线上代码和你本地代码不一致。。把线上代码ProductServiceImpl的class文件拉回来 然后反编译。。再看是什么原因
      

  6.   

    8楼说的对。刚想起来是代码不一致,让现场提供jar,反编译,分析问题。
    提一个建议,方法进去时可以打上日志,带上入参,这样出异常时,可以帮助分析。
    当然,希望楼主尽快解决线上的问题。
      

  7.   

    模拟线上数据测试一下。观察每个点号之前的对象有没有可能null