Uploaded image for project: 'VPMS Web Application'
  1. OVPMS-1840

NPE thrown when saving medication with no List Price

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.9.1
    • Component/s: None
    • Labels:
      None
    • Sprint:

      Description

      From a 1.8.1 error report:

      org.openvpms.component.business.service.ruleengine.RuleEngineException: Failed to execute the business rules for URI archetypeService.save.product.medication.before.
      	at org.openvpms.component.business.service.ruleengine.RuleEngine.executeRules(RuleEngine.java:75)
      	at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.executeRules(ArchetypeRuleService.java:232)
      	at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.access$300(ArchetypeRuleService.java:45)
      	at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService$5.doInTransaction(ArchetypeRuleService.java:199)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      	at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.execute(ArchetypeRuleService.java:196)
      	at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.save(ArchetypeRuleService.java:134)
      	at org.openvpms.component.business.service.archetype.DelegatingArchetypeService.save(DelegatingArchetypeService.java:223)
      	at org.openvpms.web.component.im.edit.SaveHelper.save(SaveHelper.java:196)
      	at org.openvpms.web.component.im.edit.SaveHelper.save(SaveHelper.java:173)
      	at org.openvpms.web.component.im.edit.SaveHelper.save(SaveHelper.java:141)
      	at org.openvpms.web.component.im.edit.SaveHelper.save(SaveHelper.java:130)
      	at org.openvpms.web.component.im.util.IMObjectDeleter.doDeactivate(IMObjectDeleter.java:181)
      	at org.openvpms.web.component.im.util.DefaultIMObjectDeleter$1.onOK(DefaultIMObjectDeleter.java:75)
      	at org.openvpms.web.echo.dialog.PopupDialogListener.onAction(PopupDialogListener.java:129)
      	at org.openvpms.web.echo.dialog.PopupDialogListener.onClose(PopupDialogListener.java:40)
      	at org.openvpms.web.echo.event.WindowPaneListener.windowPaneClosing(WindowPaneListener.java:37)
      	at nextapp.echo2.app.WindowPane.fireWindowClosing(WindowPane.java:154)
      	at org.openvpms.web.echo.dialog.PopupWindow.fireWindowClosing(PopupWindow.java:215)
      	at nextapp.echo2.app.WindowPane.userClose(WindowPane.java:795)
      	at org.openvpms.web.echo.dialog.PopupDialog.userClose(PopupDialog.java:267)
      	at org.openvpms.web.echo.dialog.MessageDialog.userClose(MessageDialog.java:109)
      	at org.openvpms.web.echo.dialog.PopupWindow.close(PopupWindow.java:142)
      	at org.openvpms.web.echo.dialog.PopupDialog.close(PopupDialog.java:422)
      	at org.openvpms.web.echo.dialog.PopupDialog.onOK(PopupDialog.java:328)
      	at org.openvpms.web.echo.dialog.PopupDialog.onButton(PopupDialog.java:299)
      	at org.openvpms.web.echo.dialog.PopupDialog.onButtonProtected(PopupDialog.java:466)
      	at org.openvpms.web.echo.dialog.PopupDialog.access$000(PopupDialog.java:34)
      	at org.openvpms.web.echo.dialog.PopupDialog$3.onAction(PopupDialog.java:453)
      	at org.openvpms.web.echo.event.ActionListener.actionPerformed(ActionListener.java:40)
      	at nextapp.echo2.app.button.AbstractButton.fireActionPerformed(AbstractButton.java:135)
      	at echopointng.ButtonEx$1.actionPerformed(ButtonEx.java:120)
      	at nextapp.echo2.app.button.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:70)
      	at echopointng.model.DefaultButtonModelEx.doAction(DefaultButtonModelEx.java:51)
      	at echopointng.ButtonEx.processInput(ButtonEx.java:202)
      	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:178)
      	at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
      	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.openvpms.web.echo.servlet.Log4JMDCUserFilter.doFilter(Log4JMDCUserFilter.java:58)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	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)
      Caused by: org.springmodules.jsr94.Jsr94InvalidRuleSessionException: java.lang.NullPointerException; nested exception is RuleException(javax.rules.InvalidRuleSessionException: java.lang.NullPointerException), root cause(org.drools.spi.ConsequenceException: java.lang.NullPointerException)
      	at org.springmodules.jsr94.core.Jsr94Template.executeStateless(Jsr94Template.java:149)
      	at org.springmodules.jsr94.core.Jsr94RuleSupport.executeStateless(Jsr94RuleSupport.java:108)
      	at org.springmodules.jsr94.core.Jsr94RuleSupport.executeStateless(Jsr94RuleSupport.java:148)
      	at org.openvpms.component.business.service.ruleengine.RuleEngine.executeRules(RuleEngine.java:73)
      	... 75 more
      Caused by: javax.rules.InvalidRuleSessionException: java.lang.NullPointerException
      	at org.drools.jsr94.rules.StatelessRuleSessionImpl.executeRules(StatelessRuleSessionImpl.java:169)
      	at org.drools.jsr94.rules.StatelessRuleSessionImpl.executeRules(StatelessRuleSessionImpl.java:126)
      	at org.springmodules.jsr94.core.Jsr94RuleSupport$1.execute(Jsr94RuleSupport.java:115)
      	at org.springmodules.jsr94.core.Jsr94Template.executeStateless(Jsr94Template.java:146)
      	... 78 more
      Caused by: org.drools.spi.ConsequenceException: java.lang.NullPointerException
      	at org.drools.semantics.java.JavaBlockConsequence.invoke(JavaBlockConsequence.java:150)
      	at org.drools.reteoo.AgendaItem.fire(AgendaItem.java:168)
      	at org.drools.reteoo.Agenda.fireNextItem(Agenda.java:476)
      	at org.drools.reteoo.WorkingMemoryImpl.fireAllRules(WorkingMemoryImpl.java:253)
      	at org.drools.reteoo.WorkingMemoryImpl.fireAllRules(WorkingMemoryImpl.java:268)
      	at org.drools.jsr94.rules.StatelessRuleSessionImpl.executeRules(StatelessRuleSessionImpl.java:165)
      	... 81 more
      Caused by: java.lang.NullPointerException
      	at org.openvpms.archetype.rules.product.ProductPriceUpdater.checkEquals(ProductPriceUpdater.java:245)
      	at org.openvpms.archetype.rules.product.ProductPriceUpdater.needsUpdate(ProductPriceUpdater.java:225)
      	at org.openvpms.archetype.rules.product.ProductPriceUpdater.update(ProductPriceUpdater.java:119)
      	at org.openvpms.archetype.rules.product.ProductPriceUpdater.update(ProductPriceUpdater.java:105)
      	at Consequence_0.invoke(ANONYMOUS.java:9)
      	at org.drools.semantics.java.JavaBlockConsequence.invoke(JavaBlockConsequence.java:130)
      	... 86 more
      

      This is caused by a entityRelationship.productSupplier having no list price.

        Attachments

          Activity

            People

            • Assignee:
              tanderson Tim Anderson
              Reporter:
              tanderson Tim Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h
                4h

                  Who's Looking?