Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2345

NPE from implementation.resource for missing location attribute

    XMLWordPrintableJSON

Details

    Description

      java.lang.NullPointerException
      at org.apache.tuscany.sca.implementation.resource.provider.ResourceImplementationProvider.createInvoker(ResourceImplementationProvider.java:49)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addImplementationInterceptor(RuntimeWireImpl.java:315)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:188)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChain(RuntimeWireImpl.java:115)
      at org.apache.tuscany.sca.core.assembly.RuntimeComponentServiceImpl.getInvocationChain(RuntimeComponentServiceImpl.java:125)
      at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.getInvoker(RuntimeSCAReferenceBindingProvider.java:182)
      at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:195)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:228)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:167)
      at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:243)
      at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:148)
      at $Proxy0.get(Unknown Source)

      NPE is thrown from ResourceImplementationProvider, when the composite is provided with missing location attribute. Need to catch this exception and throw a meaningful message for the user.

      Attachments

        1. TUSCANY-2345.patch
          13 kB
          Ramkumar Ramalingam

        Activity

          People

            ramkumar.rj Ramkumar Ramalingam
            ramkumar.rj Ramkumar Ramalingam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: