关于java.lang.NullPointerException的问题

提示的错误是:
严重: Servlet.service() for servlet Shopping threw exception
java.lang.NullPointerException
at cn.itcast.Shopping.doGet(Shopping.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
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.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
代码如下
图片说明
图片说明
图片说明
图片说明
图片说明
一开始打完之后是可以正常运行的,但当我去打另外一个跳转的Servlet打完之后就出错误了,另一个Servlet的代码是这样的
图片说明
![图片说明
图片说明

8个回答

at cn.itcast.Shopping.doGet(Shopping.java:45)

这句话,告诉你,shopping类45行,没有取到值,然后你有个习惯非常不好,在java类左边上,没有行数标记,你最好设置一下

我都不知道45行是啥,而且好多类都在shopping这一个类里面了。。。。你应该这样反推,然后确定是哪里的问题,

z707872880
z707872880 反推了一个下午,终于搞定了,是我自己第二个Servlet的名字定义成了Cookie,导致出了这一系列的错误,改过来之后就可以了
4 年多之前 回复

__


在Java中对值为null的指针调用任何方法,就会引发空指针异常(java.lang.NullPointerException)。空指针异常绝对是Java中最难查找和调试的一种异常,你永远无法得到任何有用的调试信息。通过个人日常总结和网上搜集整理,归纳如下,供大家参考。空指针异常产生的主要原因如下:所以在Java中一般报空指针异常的原因有以下几种: 
1字符串变量未初始化; 
2接口类型的对象......
答案就在这里:java.lang.NullPointerException的各种问题
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

怎么只有两张图片。。。我补充下代码图片吧
图片说明
图片说明
图片说明
图片说明

图片说明
这是第45行的代码

shopping里的第45行出错了,你最好debug调试一下,看看哪里出错了

java.lang.NullPointerException 空指针异常,是.前面的变量为空了,debug看看哪行报错

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException
第一次着手项目,springboot+mybatis,项目搭建是跟着教程做的。项目搭建好之后项目能正常运行,但是启动后报: Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:106) Caused by: java.lang.NullPointerException at com.mysql.jdbc.ConnectionImpl.abortInternal(ConnectionImpl.java:1240) at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:104) 启动Console: 2019-08-05 10:29:12.921 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : Starting App on DESKTOP-J57CTN6 with PID 7416 (D:\JAVA\eclipse\TaxHandwritingRecognition\target\classes started by Administrator in D:\JAVA\eclipse\TaxHandwritingRecognition) 2019-08-05 10:29:12.921 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : No active profile set, falling back to default profiles: default 2019-08-05 10:29:12.958 INFO 7416 --- [ restartedMain] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6070b0bb: startup date [Mon Aug 05 10:29:12 CST 2019]; root of context hierarchy 2019-08-05 10:29:13.450 INFO 7416 --- [ restartedMain] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [mybatis-config.xml] 2019-08-05 10:29:13.503 INFO 7416 --- [ restartedMain] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'sqlSessionFactory' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=app; factoryMethodName=sqlSessionFactoryBean; initMethodName=null; destroyMethodName=(inferred); defined in com.xintujiuzhang.aimanagement.App] with [Generic bean: class [org.mybatis.spring.SqlSessionFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [mybatis-config.xml]] 2019-08-05 10:29:13.599 WARN 7416 --- [ restartedMain] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.xintujiuzhang.aimanagement]' package. Please check your configuration. 2019-08-05 10:29:13.958 INFO 7416 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$b535b905] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-08-05 10:29:14.332 INFO 7416 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2019-08-05 10:29:14.348 INFO 7416 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2019-08-05 10:29:14.349 INFO 7416 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.28 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 2019-08-05 10:29:14.355 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 2019-08-05 10:29:14.357 INFO 7416 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 2019-08-05 10:29:14.418 INFO 7416 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2019-08-05 10:29:14.418 INFO 7416 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1462 ms 2019-08-05 10:29:14.514 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*] 2019-08-05 10:29:14.517 INFO 7416 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*] 2019-08-05 10:29:14.631 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2019-08-05 10:29:19.625 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Driver does not support get/set network timeout for connections. (com.mysql.jdbc.JDBC4Connection.getNetworkTimeout()I) 2019-08-05 10:29:19.629 INFO 7416 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2019-08-05 10:29:19.670 INFO 7416 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2019-08-05 10:29:19.684 INFO 7416 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2019-08-05 10:29:19.738 INFO 7416 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.2.10.Final} 2019-08-05 10:29:19.739 INFO 7416 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2019-08-05 10:29:19.770 INFO 7416 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2019-08-05 10:29:19.874 INFO 7416 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 2019-08-05 10:29:19.897 INFO 7416 --- [ restartedMain] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4 2019-08-05 10:29:20.037 INFO 7416 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 10:29:20,543 INFO App:32-org.springframework.orm.jpa.JpaTransactionManager 2019-08-05 10:29:20.796 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6070b0bb: startup date [Mon Aug 05 10:29:12 CST 2019]; root of context hierarchy 2019-08-05 10:29:20.824 WARN 7416 --- [ restartedMain] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2019-08-05 10:29:20.846 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/application/handwriting_authorization],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ApplicationAuthorizationController.joinHWA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/application/handwriting_information],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ApplicationInformationController.joinHWI(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/background_management_login],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.BackgroundManagementLoginController.joinHWI(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/computer_login],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ComputerLoginController.jumpDEM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.847 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/department_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.DepartmentManagementController.jumpDEM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/dictionary_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.DictionaryManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/equipment/hardware_devices],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.EquipmentManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryGetServerStatusInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.GetServerStatusInterfaceController.queryGetServerStatus(java.lang.String,java.lang.String) 2019-08-05 10:29:20.848 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryHandwritingInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.HandwritingInterfaceController.queryHandwriting(java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/identity/identity_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.IdentityManagementController.jumpDM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryInstallationRequest],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.InstallationRequestInterfaceController.queryInstallationRequest(java.lang.String,java.lang.String,java.lang.String) 2019-08-05 10:29:20.849 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryLicenseInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.LicenseInterfaceController.queryLicense(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.Date) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.main(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.xintujiuzhang.aimanagement.controller.MainController.login() 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[POST]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.login(java.lang.String,java.lang.String,java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.851 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/main],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MainController.jumpmain(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/menu_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.MenuManagementController.jumpMM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/module_browsing],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ModuleBrowsingController.jumpTM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/module_operation],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ModuleOperationController.jumpMM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/deletehandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.deletehandwriting(java.lang.String) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/updatehandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.updatehandwriting(com.xintujiuzhang.aimanagement.pojo.Handwriting) 2019-08-05 10:29:20.852 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/addhandwriting],methods=[POST]}" onto public void com.xintujiuzhang.aimanagement.controller.NotesController.addhandwriting(com.xintujiuzhang.aimanagement.pojo.Handwriting) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/querynotes],methods=[GET]}" onto public com.xintujiuzhang.aimanagement.pojo.Handwriting com.xintujiuzhang.aimanagement.controller.NotesController.querynotes(java.lang.String) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/parameter_settings],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.parameterSettingsController.jumpPS(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/role_authorization],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.RoleAuthorizationController.jumpRA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/log/service_call],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.ServiceCallController.jumpRA(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.853 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/task_management],methods=[GET]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.TaskManagementController.jumpTM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/authority/user_management]}" onto public java.lang.String com.xintujiuzhang.aimanagement.controller.UserController.jnmpUM(java.util.Map<java.lang.String, java.lang.Object>) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryUserInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.UserInterfaceController.queryLicense(java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryVersionCheckingInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.VersionCheckingInterfaceController.queryVersionChecking(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Integer,java.util.Date) 2019-08-05 10:29:20.854 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/queryVersionupdateInterface],methods=[GET]}" onto public java.util.Map<java.lang.String, java.lang.Object> com.xintujiuzhang.aimanagement.controller.VersionUpdateInterfaceController.queryVersionupdate(java.lang.String,java.lang.String,java.lang.String,java.util.Date) 2019-08-05 10:29:20.857 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2019-08-05 10:29:20.857 INFO 7416 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2019-08-05 10:29:20.881 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:20.881 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:20.906 INFO 7416 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2019-08-05 10:29:21.115 INFO 7416 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2019-08-05 10:29:21.164 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2019-08-05 10:29:21.165 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'dataSource' has been autodetected for JMX exposure 2019-08-05 10:29:21.170 INFO 7416 --- [ restartedMain] o.s.j.e.a.AnnotationMBeanExporter : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource] 2019-08-05 10:29:21.196 INFO 7416 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' 2019-08-05 10:29:21.198 INFO 7416 --- [ restartedMain] com.xintujiuzhang.aimanagement.App : Started App in 8.458 seconds (JVM running for 8.828) Exception in thread "Thread-12" java.lang.RuntimeException: java.lang.NullPointerException at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:106) Caused by: java.lang.NullPointerException at com.mysql.jdbc.ConnectionImpl.abortInternal(ConnectionImpl.java:1240) at com.mysql.jdbc.JDBC4Connection$1$1.run(JDBC4Connection.java:104) **在执行一些方法后“Thread-12”会不断增加** **ps:“Thread-668"**
Java编程关于 java.lang.NullPointerException的问题
package student_system_new; public class Student { public Student() { this.studentID = 0; this.Name = ""; Math = 0.0; Chinese = 0.0; English = 0.0; } public Student(int studentID, String name, double math, double chinese, double english) { this.studentID = studentID; this.Name = name; Math = math; Chinese = chinese; English = english; } private int studentID; private String Name; private double Math; private double Chinese; private double English; public void setName(String name) { Name = name; } public void setStudentID(int ID) { studentID = ID; } public void setMath(double math) { Math = math; } public void setChinese(double chinese) { Chinese = chinese; } public void setEnglish(double english) { English = english; } } package student_system_new; import java.util.*; public class Classes { public Classes() { super(); } final static int SIZE = 5; private Student[] class1 = new Student[SIZE]; public void setData() { System.out.println("输入学生数据:学号、姓名、数学、语文、英语"); Scanner data = new Scanner(System.in); for(Student a: class1) { a.setStudentID(data.nextInt()); a.setName(data.next()); a.setMath(data.nextDouble()); a.setChinese(data.nextDouble()); a.setEnglish(data.nextDouble()); } data.close(); } } package student_system_new; public class Texter { public static void main(String[] args) { // TODO Auto-generated method stub Classes first = new Classes(); first.setData(); } } 有三个类,setData目的是想输入五个学生数据,可是在输入的时候显示了一个错误。这个错误好像是跟数组有关,可是我弄了好久没搞清楚,哪位大神能帮一下....![图片说明](https://img-ask.csdn.net/upload/201711/04/1509804677_348405.png)![图片说明](https://img-ask.csdn.net/upload/201711/04/1509804746_767090.png)
java.lang.NullPointerException
java.lang.NullPointerException java.lang.String.<init>(String.java:228) com.huawei.support.mobile.module.web.jsintf.WebIntf.AesDecrypt(Unknown Source) com.huawei.support.mobile.module.web.jsintf.WebIntf.login(Unknown Source) com.huawei.support.mobile.module.web.ui.HWSupportMobileWebContainer.sendNetState(Unknown Source) com.huawei.support.mobile.module.web.ui.j.onPageFinished(Unknown Source) com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:488) com.android.org.chromium.android_webview.AwContentsClient$AwWebContentsObserver$1.run(AwContentsClient.java:76) android.os.Handler.handleCallback(Handler.java:733) android.os.Handler.dispatchMessage(Handler.java:95) android.os.Looper.loop(Looper.java:136) android.app.ActivityThread.main(ActivityThread.java:5314) java.lang.reflect.Method.invokeNative(Native Method) java.lang.reflect.Method.invoke(Method.java:515) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) dalvik.system.NativeStart.main(Native Method) 求大神解答这个错误是怎么出来的 ,现在就出现了一次
java 中出现 java.lang.nullpointerexception异常
java 中出现 java.lang.nullpointerexception异常,哪位大神能帮忙处理一下 http://pan.baidu.com/share/link?shareid=3804041701&uk=840289731
struts1.2 运行提示java.lang.NullPointerException错误
java.lang.NullPointerException org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:289)
安卓:java.lang.NullPointerException:
logcat显示错误: FATAL EXCEPTION: main Process: org.droidplanner, PID: 21924 java.lang.RuntimeException: Unable to resume activity {org.droidplanner/org.droidplanner.android.activities.FlightActivity}: java.lang.NullPointerException: Attempt to read from field 'android.content.SharedPreferences org.droidplanner.android.utils.prefs.DroidPlannerPrefs.prefs' on a null object reference at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3019) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3050) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2425) at android.app.ActivityThread.access$900(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5294) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
java.lang.String[] java.lang.String.split
Error, Qchat service has not been published java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference![图片说明](https://img-ask.csdn.net/upload/201704/21/1492741965_735268.png) 这个问题怎么解决,求神助。。。
win8 安装oracle11g时报出java.lang.nullpointerexception
win8 安装oracle11g时报出java.lang.nullpointerexception,无法进入安装界面,求解决! 谢谢
Error querying database. Cause: java.lang.NullPointerException
###错误日志 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: java.lang.NullPointerException Cause: java.lang.NullPointerException at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447) at com.sun.proxy.$Proxy82.selectOne(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:167) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) at com.sun.proxy.$Proxy180.shareRewardList(Unknown Source) at com.cn.ym.live.hottalk.service.common.impl.UserInfoServiceImpl.shareRewardList(UserInfoServiceImpl.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy178.shareRewardList(Unknown Source) at com.cn.ym.live.hottalk.controller.UserInfoController.shareRewardList(UserInfoController.java:119) at com.cn.ym.live.hottalk.controller.UserInfoController$$FastClassBySpringCGLIB$$728252b4.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:139) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) at com.cn.ym.live.hottalk.aop.WebControllerAop.doAround(WebControllerAop.java:46) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673) at com.cn.ym.live.hottalk.controller.UserInfoController$$EnhancerBySpringCGLIB$$e47575b0.shareRewardList(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) at com.cn.ym.live.hottalk.aop.MyFilter.doFilter(MyFilter.java:62) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NullPointerException ### Cause: java.lang.NullPointerException at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434) ... 104 common frames omitted Caused by: java.lang.NullPointerException: null at com.cn.ym.live.hottalk.config.db.MyAbstractRoutingDataSource.determineCurrentLookupKey(MyAbstractRoutingDataSource.java:24) at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.determineTargetDataSource(AbstractRoutingDataSource.java:196) at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:164) at com.github.pagehelper.PageHelper.getUrl(PageHelper.java:281) at com.github.pagehelper.PageHelper.getSqlUtil(PageHelper.java:305) at com.github.pagehelper.PageHelper.initSqlUtil(PageHelper.java:263) at com.github.pagehelper.PageHelper.intercept(PageHelper.java:250) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) at com.sun.proxy.$Proxy168.query(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ... 111 common frames omitted 2018-12-20 17:20:15.347 WARN 9616 --- [ XNIO-3 task-1] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: Error querying database. Cause: java.lang.NullPointerException Cause: java.lang.NullPointerException ###mapper.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN" "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd"> <mapper namespace="com.cn.ym.live.hottalk.dao.UserInviteLogDAO"> <!-- --> <select id="shareRewardList" resultType="ShareReward"> SELECT COUNT(invite_id) as number, SUM(coin) as money FROM hot_user_invite_log </select> ###dao层 public interface UserInviteLogDAO { /** * 日志增加用户邀请奖励 奖励金额 * * @param inviteLog */ public void addCoin(InviteLog inviteLog); /** * 获取邀请码 用户信息 * * @param map uid * @return */ public UserInfo userInviteLogDao(Map<String, Object> map1); /** * 用户获取邀请信息 * * @param uid * @param start_time * @param end_time * @return */ public ShareReward shareRewardList(); ###service @Autowired private UserInviteLogDAO userInviteLogDao; @Autowired private PayOrderDAO payOrderDAO; private static final Logger logger = LoggerFactory.getLogger(UserInfoService.class); /** * 用户获取邀请信息 * @param uid * @param start_time * @param end_time * @return */ public ShareReward shareRewardList(String uid, Long start_time, Long end_time) { Map<String , Object> map =new HashMap<>(); map.put("uid", uid); map.put("start_time", start_time); map.put("end_time", end_time); ShareReward shareReward = userInviteLogDao.shareRewardList(); return shareReward; }
多线程 java.lang.NullPointerException
``` Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.plaf.basic.BasicListUI.paintImpl(BasicListUI.java:266) at javax.swing.plaf.basic.BasicListUI.paint(BasicListUI.java:240) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at javax.swing.JComponent.paintComponent(JComponent.java:780) at javax.swing.JComponent.paint(JComponent.java:1056) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1572) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1495) at javax.swing.RepaintManager.paint(RepaintManager.java:1265) at javax.swing.JComponent._paintImmediately(JComponent.java:5167) at javax.swing.JComponent.paintImmediately(JComponent.java:4978) at javax.swing.RepaintManager$4.run(RepaintManager.java:824) at javax.swing.RepaintManager$4.run(RepaintManager.java:807) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:807) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:782) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:731) at javax.swing.RepaintManager.access$1300(RepaintManager.java:64) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1720) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) ``` ## 我写了个socket通信的小程序,,每次启动一个客户端就创建一个线程专门用来读取Server回复的信息,主线程用来往Server发信息。 ## 有时 ,当我启动到第多个客户端时就会报出该异常,但是程序还是正常运行的。。只是在该客户端控制台输出了这些异常信息,有时一个一个关闭客户端时也会报该异常, 而这些不是我的代码里的东西,,求指导。这是异常是关于什么的。??
java web java.lang.NullPointerException
严重: Servlet.service() for servlet [selectServlet] in context with path [/Exercise] threw exception java.lang.NullPointerException at DB.DataBaseConnection.selectOperation1(DataBaseConnection.java:45) at Servlet.Select.doPost(Select.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:619) 代码: public class DataBaseConnection { static String driverString="com.mysql.jdbc.Driver"; static String urlString="jdbc:mysql://localhost:3306/book"; static String username="root"; static String password="123"; public static Connection getConnection() { Connection connection; try { Class.forName(driverString); } catch (ClassNotFoundException e) { e.printStackTrace(); return null; // TODO: handle exception } try { connection=DriverManager.getConnection(urlString, username, password); } catch (SQLException e) { e.printStackTrace(); return null; // TODO: handle exception } return connection; } public static ResultSet selectOperation1(String Content,String SelectWay) { Connection connection=getConnection(); Statement statement=null; try { statement=connection.createStatement();//这一行报错。。 String sqlString="select * from bookinfo where 1=1"; if(Content!=""&&SelectWay!="") { sqlString+="and"+SelectWay+"='"+Content+"'"; } ResultSet rs=statement.executeQuery(sqlString); return rs; } catch (SQLException e) { e.printStackTrace(); return null; // TODO: handle exception } }
新人求助 java.lang.NullPointerException
04-26 21:42:40.039: E/AndroidRuntime(1125): FATAL EXCEPTION: main 04-26 21:42:40.039: E/AndroidRuntime(1125): Process: com.example.remotecontrol, PID: 1125 04-26 21:42:40.039: E/AndroidRuntime(1125): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.remotecontrol/com.example.remotecontrol.RemoteControlActivity}: java.lang.NullPointerException 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.access$700(ActivityThread.java:135) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.os.Handler.dispatchMessage(Handler.java:102) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.os.Looper.loop(Looper.java:137) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.main(ActivityThread.java:4998) 04-26 21:42:40.039: E/AndroidRuntime(1125): at java.lang.reflect.Method.invokeNative(Native Method) 04-26 21:42:40.039: E/AndroidRuntime(1125): at java.lang.reflect.Method.invoke(Method.java:515) 04-26 21:42:40.039: E/AndroidRuntime(1125): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777) 04-26 21:42:40.039: E/AndroidRuntime(1125): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593) 04-26 21:42:40.039: E/AndroidRuntime(1125): at dalvik.system.NativeStart.main(Native Method) 04-26 21:42:40.039: E/AndroidRuntime(1125): Caused by: java.lang.NullPointerException 04-26 21:42:40.039: E/AndroidRuntime(1125): at com.example.remotecontrol.RemoteControlFragment.onCreateView(RemoteControlFragment.java:43) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.Activity.performStart(Activity.java:5253) 04-26 21:42:40.039: E/AndroidRuntime(1125): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2149) 04-26 21:42:40.039: E/AndroidRuntime(1125): ... 11 more
java List做函数参数 出现空指针错误java.lang.NullPointerException,错误的语句如下:
java List做函数参数 出现空指针错误java.lang.NullPointerException,错误的语句如下: boolean result = getVmAllocationPolicySimple().allocateHostForVmList(vmList); 经测试传进去的vmList不为空。
java.lang.NullPointerException希望各位大佬帮帮忙,找了半天真的不晓得咋弄了
![程序代码](https://img-ask.csdn.net/upload/201811/27/1543252825_648938.png) HTTP Status 500 – Internal Server Error Type Exception Report Message java.lang.NullPointerException Description The server encountered an unexpected condition that prevented it from fulfilling the request. Exception org.apache.jasper.JasperException: java.lang.NullPointerException org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Root Cause java.lang.NullPointerException service.userservice.valiUser(userservice.java:18) org.apache.jsp.validate_jsp._jspService(validate_jsp.java:139) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329) javax.servlet.http.HttpServlet.service(HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) Note The full stack trace of the root cause is available in the server logs. Apache Tomcat/8.5.20
AxisFault 错误 java.lang.NullPointerException
报错行是UserInfo userinfo = (UserInfo) call.invoke(new Object[] {sid,sysno,ip }); ``` AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.NullPointerException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:xiaoming-PC java.lang.NullPointerException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.asidel.web.webservice.Axis_Client_GetAuths.getAuths(Axis_Client_GetAuths.java:35) at com.asidel.web.controller.IndexController.login(IndexController.java:100) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 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.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703) at java.lang.Thread.run(Thread.java:619) ```
java.lang.ClassNotFoundException
java.lang.ClassNotFoundException: com.example.zhenyi.common.SocketRequest at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at java.io.ObjectInputStream.resolveClass(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at net.android.hospital.util.SocketUtil.getRequest(SocketUtil.java:16) at net.android.hospital.MainServer$ThreadHandler.run(MainServer.java:52) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception in thread "pool-1-thread-1" java.lang.NullPointerException at net.android.hospital.MainServer$ThreadHandler.run(MainServer.java:62) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Android java.lang.NullPointerException
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { initAdData(); View view = inflater.inflate(R.layout.fragment_travel, container, false); dot0 = view.findViewById(R.id.v_dot0); dot1 = view.findViewById(R.id.v_dot1); dot2 = view.findViewById(R.id.v_dot2); dot3 = view.findViewById(R.id.v_dot3); dot4 = view.findViewById(R.id.v_dot4); tv_title = (TextView)view.findViewById(R.id.tv_title); adViewPager = (ViewPager)this.getActivity().findViewById(R.id.vp); return view; } private void initAdData() { // 广告数据 adList = getBannerAd(); imageViews = new ArrayList<ImageView>(); // 点 dots = new ArrayList<View>(); dotList = new ArrayList<View>(); dots.add(dot0); dots.add(dot1); dots.add(dot2); dots.add(dot3); dots.add(dot4); ViewPager adViewPager = new ViewPager(getActivity()); adViewPager.setAdapter(new MyAdapter());// 设置填充ViewPager页面的适配器 // 设置一个监听器,当ViewPager中的页面改变时调用 adViewPager.setOnPageChangeListener(new MyPageChangeListener()); addDynamicView(); } private void addDynamicView() { // 动态添加图片和下面指示的圆点 // 初始化图片资源 for (int i = 0; i < adList.size(); i++) { ImageView imageView = new ImageView(getActivity()); // 异步加载图片 mImageLoader.displayImage(adList.get(i).getImgUrl(), imageView, options); imageView.setScaleType(ScaleType.CENTER_CROP); imageViews.add(imageView); dots.get(i).setVisibility(View.VISIBLE);//这行java.lang.NullPointerException dotList.add(dots.get(i)); } } dots.get(i).setVisibility(View.VISIBLE);//这行java.lang.NullPointerException
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
【JSON解析】浅谈JSONObject的使用
简介 在程序开发过程中,在参数传递,函数返回值等方面,越来越多的使用JSON。JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,同时也易于机器解析和生成、易于理解、阅读和撰写,而且Json采用完全独立于语言的文本格式,这使得Json成为理想的数据交换语言。 JSON建构于两种结构: “名称/值”对的集合(A Collection of name/va...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
只因接了一个电话,程序员被骗 30 万!
今天想给大家说一个刚刚发生在我身边的一起真实的诈骗经历,我的朋友因此被骗走30万。注:为了保护当事人隐私,部分情节进行了修改。1平安夜突来的电话开始以为就像普通的诈骗一样,想办法让你把钱...
我一个37岁的程序员朋友
周末了,人一旦没有点事情干,心里就瞎想,而且跟几个老男人坐在一起,更容易瞎想,我自己现在也是 30 岁了,也是无时无刻在担心自己的职业生涯,担心丢掉工作没有收入,担心身体机能下降,担心突...
python自动下载图片
近日闲来无事,总有一种无形的力量萦绕在朕身边,让朕精神涣散,昏昏欲睡。 可是,像朕这么有职业操守的社畜怎么能在上班期间睡瞌睡呢,我不禁陷入了沉思。。。。 突然旁边的IOS同事问:‘嘿,兄弟,我发现一个网站的图片很有意思啊,能不能帮我保存下来提升我的开发灵感?’ 作为一个坚强的社畜怎么能说自己不行呢,当时朕就不假思索的答应:‘oh, It’s simple. Wait for me for a ...
一名大专同学的四个问题
【前言】   收到一封来信,赶上各种事情拖了几日,利用今天要放下工作的时机,做个回复。   2020年到了,就以这一封信,作为开年标志吧。 【正文】   您好,我是一名现在有很多困惑的大二学生。有一些问题想要向您请教。   先说一下我的基本情况,高考失利,不想复读,来到广州一所大专读计算机应用技术专业。学校是偏艺术类的,计算机专业没有实验室更不用说工作室了。而且学校的学风也不好。但我很想在计算机领...
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
立即提问