title: Time Weaver not work in Spring Boot 2 for Eclipselink
body: <p>I am using Spring Boot 2 + EclipseLink 2.7.1 and I am getting TimeWeaving exceptions when I boot up the Spring platform.</p>
  
  <p>I have followed the best practices around Spring + EclipseLink and it was working before on Spring Boot 1.5.8. Right after the migration to 2.0, I started getting issues around Weaving at boot time:</p>
  
  <p>Several issues and messages like the one below:
  <code>
  [EL Warning]: metadata: 2018-03-19 21:44:40.176--ServerSession(1687624275)--Reverting the lazy setting on the OneToOne or ManyToOne attribute [image] for the entity class
  </code></p>
  
  <p>The following configuration is being used:</p>
  
  <pre><code>@Configuration
  @ComponentScan
  @EnableAutoConfiguration
  public class EclipseLinkJPAConfiguration extends JpaBaseConfiguration {
  
      protected EclipseLinkJPAConfiguration(DataSource dataSource, JpaProperties properties,
              ObjectProvider&lt;JtaTransactionManager&gt; jtaTransactionManager,
              ObjectProvider&lt;TransactionManagerCustomizers&gt; transactionManagerCustomizers) {
          super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers);
          // TODO Auto-generated constructor stub
      }
  
      @Override
      protected AbstractJpaVendorAdapter createJpaVendorAdapter() {
          EclipseLinkJpaVendorAdapter adapter = new EclipseLinkJpaVendorAdapter();
          return adapter;
      }
  
      @Override
      protected Map&lt;String, Object&gt; getVendorProperties() {
          HashMap&lt;String, Object&gt; map = new HashMap&lt;String, Object&gt;();
          map.put(PersistenceUnitProperties.TARGET_DATABASE, TargetDatabase.MySQL);
          map.put(PersistenceUnitProperties.WEAVING, "true");
          return map;
      }
  
  }
  </code></pre>
  
  <p>My startup line command is:
  <code>
  -Xms656m -Xms656m -Djava.security.egd=file:/dev/./urandom -javaagent:.../.m2/repository/org/springframework/spring-instrument/5.0.4.RELEASE/spring-instrument-5.0.4.RELEASE.jar
  </code></p>
  
  <p>I made sure to remove the hibernate dependencies on the Spring JPA Packages.</p>
  
  <p>Anyway, everything is the same, however, it looks like that the weaving is not working for the Packages when EclipseLink weaving is turned on.</p>
  
  <p>I tried to turn EclipseLink WEAVING="off" and turning the AspectJ directly into spring, however the same result was achieved.</p>
  
  <p>When I do any query agains by objects, I get the following error from my @MappedSuperclass:
  <code>
  java.lang.NoSuchMethodError: xxx.base.BaseEntity._persistence_set
  </code></p>
  
  <p>Has somebody experienced the same behavior after upgrading to Spring Boot 2?
  (I have considered weaving statically, however I am using annotations instead of persistence.xml file)</p>
  
  <p><strong>UPDATE 1</strong>
  After days investigating, I turned on the FINEST debugging in EclipseLink, I found that the Weaving is not happening for my BaseEntity (it happens for some other classes). My BaseEntity is a @MappedSuperclass.</p>
  
  <p>I have checked and EclipseLink boot process and it lists around 41 classes to be weaved. However, besides the BaseEntity is listed to be Waived, the boot process is not picking it up when the TomCat lifecycle starts the DB Connections. Still investigating.</p>