We trying to move from ACF 2016 to Lucee 5.3.9 and facing issue (see below) when starting up Lucee.
Our existing appplication run the following:
- Java web service
- Spring 5.3.4
- Hibernate 5.4.28.Final
The issue appears to be failing on “ContextLoaderListener” defined in our web.xml.
Lucee runs if we comment out the listener “ContextLoaderListener”.
I tried the following but it didn’t work.
- Moved all JARS to \webapps\WEB-INF\lucee\lib
- Moved all JARS to \webapps\WEB-INF\lucee-server\context\lib
- Tried converting WAR file as OSGI bundle and dropped into \webapps\WEB-INF\lucee-server\bundles folder
- Uninstalled Hibernate extension that is pre-installed with Lucee (thinking that it is causing conflict during runtime).
Anybody have ideas why Lucee is failing during startup? to me it seems like the issue is caused by Lucee’s class loader being used instead of Tomcat’s. Tomcat is aware of the hibernate entities but Lucee’s is not?
Thank you and hoping somebody can shed some light.
2022-04-15T15:40:32,481|39812|Catalina-utility-1|INFO |Version|HHH000412: Hibernate ORM core version 5.4.28.Final
2022-04-15T15:40:32,851|40182|Catalina-utility-1|INFO |JavaReflectionManager|HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-04-15T15:40:33,992|41323|Catalina-utility-1|INFO |Dialect|HHH000400: Using dialect: org.hibernate.dialect.SQLServer2012Dialect
2022-04-15T15:40:34,672|42003|Catalina-utility-1|INFO |Version|HV000001: Hibernate Validator 6.0.22.Final
2022-04-15T15:40:35,180|42511|Catalina-utility-1|INFO |JtaPlatformInitiator|HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.WeblogicJtaPlatform]
2022-04-15 15:40:36,3231|Catalina-utility-1|ERROR|ContextLoader|Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘blockApiServiceImpl’: Unsatisfied dependency expressed through field ‘blockApiDAO’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘blockApiDAO’ defined in com.domain.accommodation.dao.BlockApiDAO defined in : Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.domain.model.HotelsToRoomType
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
Our stack:
OS: Linux
Java Version: 11
Tomcat Version: 9
Lucee Version: lucee-5.3.9.120-SNAPSHOT.war