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

NPE when loading componentType side file with callbackInterface attribute defined

    XMLWordPrintableJSON

Details

    Description

      A Remote service that has a callback interface defined in a componentType file receives a NPE when loading the componentType side file. .

      [INFO] [tuscany-itest:start

      {execution: start}

      ]
      [INFO] Starting Tuscany...
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException
      at org.apache.tuscany.core.implementation.processor.ServiceProcessor.visitField(ServiceProcessor.java:149)
      at org.apache.tuscany.core.implementation.IntrospectionRegistryImpl.introspect(IntrospectionRegistryImpl.java:97)
      at org.apache.tuscany.core.implementation.java.JavaComponentTypeLoader.loadByIntrospection(JavaComponentTypeLoader.java:79)
      at org.apache.tuscany.core.implementation.java.JavaComponentTypeLoader.load(JavaComponentTypeLoader.java:66)
      at org.apache.tuscany.core.implementation.java.JavaComponentTypeLoader.load(JavaComponentTypeLoader.java:44)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.loadComponentType(LoaderRegistryImpl.java:163)
      at org.apache.tuscany.core.implementation.java.JavaImplementationLoader.load(JavaImplementationLoader.java:58)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.load(LoaderRegistryImpl.java:94)
      at org.apache.tuscany.core.loader.ComponentLoader.loadImplementation(ComponentLoader.java:184)
      at org.apache.tuscany.core.loader.ComponentLoader.load(ComponentLoader.java:128)
      at org.apache.tuscany.core.loader.ComponentLoader.load(ComponentLoader.java:70)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.load(LoaderRegistryImpl.java:94)
      at org.apache.tuscany.core.implementation.composite.CompositeLoader.load(CompositeLoader.java:81)
      at org.apache.tuscany.core.implementation.composite.CompositeLoader.load(CompositeLoader.java:55)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.load(LoaderRegistryImpl.java:94)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.load(LoaderRegistryImpl.java:112)
      at org.apache.tuscany.core.implementation.composite.CompositeComponentTypeLoader.loadFromSidefile(CompositeComponentTypeLoader.java:65)
      at org.apache.tuscany.core.implementation.composite.CompositeComponentTypeLoader.load(CompositeComponentTypeLoader.java:57)
      at org.apache.tuscany.core.implementation.composite.CompositeComponentTypeLoader.load(CompositeComponentTypeLoader.java:39)
      at org.apache.tuscany.core.loader.LoaderRegistryImpl.loadComponentType(LoaderRegistryImpl.java:163)
      at org.apache.tuscany.core.deployer.DeployerImpl.load(DeployerImpl.java:101)
      at org.apache.tuscany.core.deployer.DeployerImpl.deploy(DeployerImpl.java:76)
      at org.apache.tuscany.core.runtime.AbstractRuntime.deployApplicationScdl(AbstractRuntime.java:136)
      at org.apache.tuscany.sca.plugin.itest.MavenEmbeddedRuntime.initialize(MavenEmbeddedRuntime.java:85)
      at org.apache.tuscany.sca.plugin.itest.TuscanyStartMojo.execute(TuscanyStartMojo.java:102)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:615)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7 seconds
      [INFO] Finished at: Fri Dec 01 08:03:06 EST 2006
      [INFO] Final Memory: 6M/19M
      [INFO] ------------------------------------------------------------------------

      ComponentType file: CallBackCTypeServiceImpl.componentType

      <?xml version="1.0" encoding="ASCII"?>
      <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0" >
      <service name="CallBackCTypeService">
      <interface.java interface="org.apache.tuscany.sca.test.CallBackCTypeService"
      callbackInterface="org.apache.tuscany.sca.test.CallBackCTypeCallBack"/>
      </service>
      </componentType>

      package org.apache.tuscany.sca.test;
      import org.osoa.sca.annotations.Remotable;

      @Remotable

      public interface CallBackCTypeService {

      public void knockKnock(String aString);
      public void noCallBack(String aString);
      public void multiCallBack(String aString);

      }

      package org.apache.tuscany.sca.test;

      import org.osoa.sca.annotations.Callback;
      import org.osoa.sca.annotations.Remotable;
      import org.osoa.sca.annotations.Service;

      @Service(CallBackCTypeService.class)

      public class CallBackCTypeServiceImpl implements CallBackCTypeService {

      @Callback
      protected CallBackCTypeCallBack callback;

      Attachments

        Issue Links

          Activity

            People

              rfeng Zhaohui Feng
              lou.amodeo@gmail.com Lou Amodeo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: