问题描述
我用mysql数据库连接时都没有问题,当连接数据库后,在建图层的时候获取坐标范围时出错点击computefromdata就出错了,上面已经填写完毕EPSG:4326,错误信息如下:Oops,somethingwentwrong...Sorry,somethingunexpectedhappenedontheserver.Here'sanerrorreportyoucanincludeinaJIRAbugreportaboutthisissue:java.lang.NullPointerExceptionatorg.geoserver.catalog.CatalogBuilder.getNativeBoundsCatalogBuilder.java:467)atorg.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResourceConfig.java:123)atorg.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:94)atorg.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:128)atorg.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:163)atorg.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297)atorg.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:104)atorg.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)atorg.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1239)atorg.apache.wicket.RequestCycle.step(RequestCycle.java:1316)atorg.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)atorg.apache.wicket.RequestCycle.request(RequestCycle.java:532)atorg.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:356)atorg.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)atorg.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)atorg.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)atorg.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)atorg.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)atorg.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)atorg.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)atorg.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:619)
解决方案
解决方案二:
你代码写错了吧java.lang.NullPointerException这个是空指针异常啊。打个断点调试一下,出错的地方应该是对象为空了
解决方案三:
楼主解决没哦?我也遇到这个问题了,来个大虾指点下啊
解决方案四:
建议楼主查一下geoserver源代码,看看getNativeBoundsCatalogBuilder.java的467行写的什么