У нас есть .ear файл, который работает нормально на сервере приложений WebLogic 10.3.6. . Использует Spring 3.0.5 и Hibernate 3.5.2.Weird ClassNotFoundException в WebLogic 10.3.6
Если мы разворачиваем тот же файл .ear на другом сервере WebLogic 10.3.6, мы получаем следующую ошибку.
org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterService': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private nl.surf.adapter.generic.dao.MessageFilterDAO nl.surf.adapter.generic.service.FilterService.messageFilterDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/domain-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private nl.surf.adapter.generic.dao.MessageFilterDAO nl.surf.adapter.generic.service.FilterService.messageFilterDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/domain-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/domain-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration
Я пробовал несколько решений:
- Место hibernate3.jar в .war/WEB-INF/Lib (все банки сейчас находятся в .ear/Lib)
- Использование < предпочитают -WEB-иНФ-классы > правда </предпочитать-веб-иНФ-классы > в .WAR/WEB-INF/weblogic.xml
Ничто не похоже на работу. Я как бы потерял здесь ...
решить эту проблему самостоятельно. Не могу ответить, поэтому ответ следует завтра. – tsluijter
Я вижу, что в исключенном случае в web.xml отсутствует загрузочный бутстрапинг спящего режима. Правильно? – Sam
У меня такая же проблема с Velocity. Мне интересен подход, чтобы обойти эту проблему NoClassDefFoundError для org/apache/velocity/app/VelocityEngine. –