title: querydsl: java.lang.NoSuchFieldError: TREATED_PATH
body: <p>springboot version is 2.51,
  java vsersion 1.8
  it will crash in selectFrom(),
  erro info: java.lang.NoSuchFieldError: TREATED_PATH</p>
  <p>how to resolve it,i cant find a way in web</p>
  <p>there is my code</p>
  <pre><code>@SpringBootTest
  class Demo4ApplicationTests {
      @Resource
      private BmsPostRepository bm;
      @Autowired
      private JPAQueryFactory queryFactory;
      @Test
      void contextLoads() {
          var tab=&quot;hot&quot;;
          var page = PageRequest.of(pageNo, pageSize);
          var t = QBmsPost.bmsPost;
          var u = QUmsUser.umsUser;
          var now = new Date();
          var tomorrow = DateUtils.addDays(now, 1);
          var query = queryFactory
                  .selectFrom(t)
                  .leftJoin(u)
                  .on(t.userId.eq(u.id));
          if (tab.equals(&quot;hot&quot;)) query = query.where(t.createTime.lt(tomorrow));
          var re = (!tab.equals(&quot;hot&quot;)) ?
                  query.orderBy(t.createTime.desc()) :
                  query.orderBy(t.view.desc(), t.createTime.desc());
          var er =re.fetch();
      }
  
  }
  </code></pre>
  <p>there is dependency</p>
  <pre><code>    &lt;dependency&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-jpa&lt;/artifactId&gt;
              &lt;version&gt;5.0.0.M1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;groupId&gt;com.querydsl&lt;/groupId&gt;
              &lt;artifactId&gt;querydsl-apt&lt;/artifactId&gt;
              &lt;version&gt;5.0.0.M1&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  <pre><code>java.lang.NoSuchFieldError: TREATED_PATH
  
      at com.querydsl.jpa.JPQLTemplates.&lt;init&gt;(JPQLTemplates.java:147)
      at com.querydsl.jpa.JPQLTemplates.&lt;init&gt;(JPQLTemplates.java:51)
      at com.querydsl.jpa.JPQLTemplates.&lt;clinit&gt;(JPQLTemplates.java:46)
      at com.querydsl.jpa.impl.JPAProvider.&lt;clinit&gt;(JPAProvider.java:59)
      at com.querydsl.jpa.impl.JPAQuery.&lt;init&gt;(JPAQuery.java:48)
      at com.querydsl.jpa.impl.JPAQueryFactory.query(JPAQueryFactory.java:138)
      at com.querydsl.jpa.impl.JPAQueryFactory.select(JPAQueryFactory.java:72)
      at com.querydsl.jpa.impl.JPAQueryFactory.selectFrom(JPAQueryFactory.java:102)
      at com.example.demo.Demo4ApplicationTests.contextLoads(Demo4ApplicationTests.java:31
  </code></pre>
   BmsPost.java