当前位置: 首页 > 知识库问答 >
问题:

WebLogic 10.3.6中奇怪的ClassNotFoundException

帅雅逸
2023-03-14

我们有一个在WebLogic10.3.6应用服务器中正常运行的.ear文件。ear使用Spring 3.0.5和Hibernate 3.5.2。

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
    null

好像什么都不管用。我有点迷路了...

共有1个答案

郁宾鸿
2023-03-14

在web上进行了大量的搜索,并在.ear上进行了反复的修改,我找到了解决问题的方法

我已经更改了文件meta-inf/weblogic-application.xml并在标记 下面添加了标记

<prefer-application-packages>
  <package-name>org.apache.*</package-name>
  <package-name>antlr.*</package-name>
</prefer-application-packages>
 类似资料:
  • 问题内容: 所有! 我在LinkedBlockingQueue中发现了奇怪的代码: 谁能解释为什么我们需要局部变量h?它对GC有什么帮助? 问题答案: 为了更好地了解发生了什么,让我们看看执行代码后列表的样子。首先考虑一个初始列表: 然后指向和指向: 然后指向和指向: 现在,实际上我们知道只有一个指向第一个元素的活动引用,它本身就是(),并且我们还知道GC收集的对象不再具有活动引用,所以当方法结束

  • 我在http://www.nodebeginner.org上读了一篇教程,我在数据输出中有一个奇怪的行为。我知道,Stackoverflow也有类似的问题,但没有答案。所以我有这个Web-Server的代码: 调用RequestHandler.Upload的Router.js代码-我的buggy函数 和RequestHandler.Upload的代码 假设POST数据中有一个字符串。该函数的第一行

  • 我有以下代码来解析一个JSON文件: 要处理以下JSON文件: 如果我执行此代码,我将收到以下错误: 所以我开始一步一步地调试应用程序,看看part processing()中的哪个代码部分抛出了这个异常。令人惊讶的是,那里的所有代码都正常执行:没有抛出异常,也没有返回结果I except。 更让我惊讶的是,当我稍微改变第一种方法的代码时,它可以在不产生异常的情况下工作。 我不知道println方

  • 我正在编写一个DocumentFilter,它将输入JTextField的所有单词“top”替换为逻辑top符号。 使用此代码很好,但是它很烦人,因为用户必须重新键入他们的空间,他们可以这样做,并且文本继续在同一行上 当用户继续键入文本时,使用此代码并在空格中添加替换符会导致顶部符号和JTextField中的所有文本稍微向上推,然后转到下面并开始一行新的内容 有人能解释一下这种行为,并希望能提供一

  • 我在做Maven项目。我用log4j做了一个日志。但它在给定的文件中显示了一些starnge日志。我试图理解,为什么会出现这种奇怪的日志,但我不明白。请帮助我,为什么这些不需要的行会进入日志文件。 请帮我把这个拿开。 log.properties 我通过阅读这个链接创建了这个文件。 代码是 日志txt-(log.txt的一些起始行)

  • 使用方式如下: 这是有效的解决方案吗?如果删除未使用的“魔术”变量 - 我在返回字符串后有分割错误。做错了什么? $gcc--version gcc(Debian 4.4.5-8)4.4.5 $uname-Linux深度站(挤压)2.6.32-5-686#1 SMP 5月10日星期五08:33:48 UTC 2013 i686 GNU/Linux