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

When a Component class implements an interfaces that extends other interface and use generics occur the error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Java-SCA-1.3.2
    • Java-SCA-1.4
    • None
    • SO: Ubuntu 8.04
      Java: BEA JRockit(R) JRE 5.0 Update 11 R27.3.1
    • Patch Available

    Description

      Hi,

      When a Component class implements an interfaces that extends other interface and use generics occur the error:

      Nov 19, 2008 11:12:09 PM org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
      WARNING: Incompatible interfaces on wire source and target : source = GenericServiceComponent/fiscalYearBO target = FiscalYearBO
      Nov 19, 2008 11:12:10 PM org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl
      WARNING: No targets for reference: Composite =

      {http://utrafe}

      GenericService Reference = fiscalYearBO

      And not inject de class implementation

      java.lang.NullPointerException
      at com.test.service.GenericService.print(GenericService.java:18)

      Java Interfaces:

      public interface IGenericBO<T, ID> {

      T persist(T any, List<ID> id);
      }

      public interface IFiscalYearBO extends IGenericBO<String, Long> {

      }

      Implementation class:

      public abstract class GenericBOImpl<T, ID> implements IGenericBO<T, ID> {

      private T x;

      public T persist(T any, List<ID> id)

      { x = any; System.out.println(id); System.out.println("Brazil " + x); return x; }

      }

      public class FiscalYearBO extends
      GenericBOImpl<String, Long> implements
      IFiscalYearBO {

      }

      I fixed the problem alter the JavaInterfaceIntrospectorImpl, but i have other error and alter the JavaInterfaceUtil code too.

      I put the patch and testcase.

      Sorry my english .

      Attachments

        1. tuscany-interface-java-1.3.2-JIRA-2681.jar
          27 kB
          Rodolfo Dias
        2. testcase.jar
          8 kB
          Rodolfo Dias
        3. tuscany-interface-java-1.3.2-JIRA-2681-src.zip
          15 kB
          Rodolfo Dias
        4. JavaInterfaceUtil.java
          7 kB
          Rodolfo Dias
        5. JIRA-2681-SRC-DIFF.zip
          16 kB
          Rodolfo Dias

        Activity

          People

            dias.rodolfo Rodolfo Dias
            dias.rodolfo Rodolfo Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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