Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1377

issue with @Repository + @Query annotation and clustered wildfly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.9.1
    • Data-Module
    • None

    Description

      Setup:   2 x wildfly 15.0.1.Final (weld-core updated to 3.0.6)

      Clustered standalone-full-ha setup,  same machine with a port offset for the second machine.

       

      Repo:

      @Repository
      @ApplicationScoped
      public interface AnimalRepo extends EntityRepository<Animal, String>
      {
      
         @Query( value = "select a from Animal a where ?1 = a.name" )
         Animal findByName(String name);
      }
      

      Session bean:

      @SessionScoped
      @Named
      public class MyBean implements Serializable
      {
        private static final long serialVersionUID = 1L;
      
        @Inject
        private AnimalRepo animalRepo;
      
        public Long getTest()
        {
          return animalRepo.count();
        }
      }
      

      index.xhtml

      <h:form>
      #{myBean.test}
      </h:form>
      

      Visiting the first server yields no error, but upon visiting the second server:

      WELD-001500: Failed to deserialize proxy object with beanId org.apache.deltaspike.core.util.bean.ImmutableBeanWrapper:AnimalRepo[@javax.enterprise.context.ApplicationScoped()@org.apache.deltaspike.data.api.Repository(forEntity=class java.lang.Object,methodPrefix=)]{AnimalRepo.findByName[@org.apache.deltaspike.data.api.Query(hints=[Ljavax.persistence.QueryHint;@774c6737,isNative=false,lock=NONE,max=0,named=,singleResult=JPA,value=select a from Animal where ?1 = a.name)](java.lang.String);}
      
      

      Interestingly,  If the @Query annotation is removed from the findByName query, there is no issue.

      See attached project.

      Attachments

        1. stack.txt
          8 kB
          Andrew Schmidt
        2. cdri-test.zip
          30 kB
          Andrew Schmidt

        Issue Links

          Activity

            People

              struberg Mark Struberg
              andrew.schmidt Andrew Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 20m
                  20m