Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3087

Using JPA inheritance with solr search causes compile errors due to name conflicts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2.1.RELEASE
    • Fix Version/s: 1.2.2.RELEASE
    • Component/s: @ ROO SHELL
    • Labels:
    • Environment:
      STS 2.8.1.RELEASE (64 bit running on 64 bit Windows 7 Professional) wwith Roo1.2.1.RELEASE

      Description

      The following is an excerpt from a script that produces the problem:

      /* ====== Asset ====== */
      entity jpa --class com.bigcorp.domain.assets.Asset --inheritanceType SINGLE_TABLE --testAutomatically
      field string --fieldName name --sizeMax 60
      /* ====== FixedAsset ====== */
      entity jpa --class com.bigcorp.domain.assets.FixedAsset --extends com.lyniad.domain.assets.Asset --inheritanceType SINGLE_TABLE --testAutomatically
      solr setup
      solr all

      At build time the resulting error is:
      [ERROR] D:\EclipseWorkspace\SAMPLE\src\main\java\com\bigcorp\domain\assets\FixedAsset_Roo_SolrSearch.aj:105:0::0 Ca
      nnot override the final method from Asset

      where line 105 is:
      public static final SolrServer FixedAsset.solrServer()

      { SolrServer _solrServer = new FixedAsset().solrServer; if (_solrServer == null) throw new IllegalStateException("Solr server has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); return _solrServer; }

      which conflicts the the same method define in the superclass, Asset:
      public static final SolrServer Asset.solrServer()

      { SolrServer _solrServer = new Asset().solrServer; if (_solrServer == null) throw new IllegalStateException("Solr server has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); return _solrServer; }

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            briancarroll Brian Carroll
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: