We're updating the issue view to help you get more done. 

NPE viewing customer appointment in a different location to the current one

Description

From a 1.7 error report:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 java.lang.NullPointerException at org.openvpms.web.workspace.workflow.scheduling.ScheduleBrowser.getEvent(ScheduleBrowser.java:336) at org.openvpms.web.workspace.workflow.appointment.AppointmentWorkspace.update(AppointmentWorkspace.java:106) at org.openvpms.web.workspace.MainPane.changeContext(MainPane.java:316) at org.openvpms.web.workspace.OpenVPMSApp.switchTo(OpenVPMSApp.java:179) at org.openvpms.web.component.app.DefaultContextSwitchListener.switchTo(DefaultContextSwitchListener.java:49) at org.openvpms.web.workspace.customer.info.CustomerViewLayoutStrategy$1.selected(CustomerViewLayoutStrategy.java:89) at org.openvpms.web.workspace.customer.info.CustomerViewLayoutStrategy$1.selected(CustomerViewLayoutStrategy.java:86) at org.openvpms.web.component.im.query.AbstractBrowser.notifySelected(AbstractBrowser.java:111) at org.openvpms.web.component.im.query.TableBrowser.onSelect(TableBrowser.java:401) at org.openvpms.web.component.im.query.TableBrowser.access$100(TableBrowser.java:50) at org.openvpms.web.component.im.query.TableBrowser$1.onAction(TableBrowser.java:289) at org.openvpms.web.echo.event.ActionListener.actionPerformed(ActionListener.java:40) at nextapp.echo2.app.Table.fireActionEvent(Table.java:332) at nextapp.echo2.app.Table.processInput(Table.java:586) at org.openvpms.web.echo.table.KeyTable.processInput(KeyTable.java:136) at nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:116) at nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89) at nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471) at nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279) at nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273) at org.openvpms.web.echo.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:174) at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189) 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.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) 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.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source)

To reproduce:
1. create an appointment for a customer at Location A
2. switch to Location B, where the schedule view doesn't exist
3. In Customer|Information|Appointments select the appointment. An NPE will be generated

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

1.7

Priority

Minor