Having JRebel agent enabled, the application fails to start both on Tomcat and Jetty servers. Adding <absolute-ordering /> element into site/web.xml doesn't resolve the issue.
Here is the exception message:
Code: Select all
[ WARN] 21:28:04 MergeXmlWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in resource loaded from byte array: Cannot resolve reference to bean 'blPersistenceUnitManager' while setting bean property 'persistenceUnitManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blPersistenceUnitManager' defined in resource loaded from byte array: Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.IllegalStateException: The classes
are managed classes within the MergePersistenceUnitManager
but were not detected as being transformed by the EntityMarkerClassTransformer. These
classes are likely loaded earlier in the application startup lifecyle by the servlet
container. Verify that an empty <absolute-ordering /> element is contained in your
web.xml to disable scanning for ServletContainerInitializer classes by your servlet
container which can trigger early class loading. If the problem persists, ensure that
there are no bean references to your entity class anywhere else in your Spring applicationContext
and consult the documentation for your servlet container to determine if classes are loaded
prior to the Spring context initialization. Finally, ensure that Session Persistence is
also disabled by your Servlet Container. To do this in Tomcat, add <Manager pathname="" />
inside of the <Context> element in context.xml in your app's META-INF folder or your server's conf folder
Disabling JRebel gets rid of the exception.
Any ideas how this could be resolved while keeping JRebel enabled?