小编Ash*_*pta的帖子

org.springframework.beans.factory.CannotLoadBeanClassException:找不到类

我从我的tomcat 6.0安装目录中用servle-api.com替换了j2ee.jar:这会产生下面的错误.我现在正试图找出原因.可能是什么问题.

我在配置文件中定义了一个bean:Sempedia-service.xml,如下所示

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    <bean id="sempediaSearchService"
        class="com.service.SempediaSearchManager" />


</beans>
Run Code Online (Sandbox Code Playgroud)

我的web.xml指定以下bean:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/Sempedia-service.xml,/WEB-INF/Sempedia-persistence.xml</param-value>
</context-param>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.service.SempediaSearchManager] for bean with name 'sempediaSearchService' defined in ServletContext resource [/WEB-INF/Sempedia-service.xml]; nested exception is java.lang.ClassNotFoundException: com.service.SempediaSearchManager
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
    at …
Run Code Online (Sandbox Code Playgroud)

java spring-mvc

10
推荐指数
1
解决办法
11万
查看次数

Apache Web 服务器:ProxyPass 和 ProxyPassReverse

我已经通过互联网和stackoverflow进行了扫描,但我仍然不确定proxypass和proxypassreverse的目的。

为什么我们需要proxypass(而不是使用mod_jk)让apache服务器连接到tomcat?

请问有人吗?

apache2 mod-proxy mod-jk

6
推荐指数
2
解决办法
1万
查看次数

安装额外的eclipse靛蓝文件

在干净的PC上下载Eclipse Indigo后,当我尝试从http://dl.google.com/eclipse/plugin/3.7 下载并下载SDK和Google插件时,大约35%的时间我开始收到错误.

Install download1
An internal error occurred during: "Install download1".
Comparison method violates its general contract!

Install download2
An internal error occurred during: "Install download1".
Comparison method violates its general contract!

Install download3
An internal error occurred during: "Install download1".
Comparison method violates its general contract!

Installing Software
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Multiple problems occurred while downloading.
Unable to write to repository: file:/C:/Users/erice/Downloads/eclipse-jee-indigo-win32-x86_64/eclipse/.
C:\Users\erice\Downloads\eclipse-jee-indigo-win32-x86_64\eclipse\plugins\com.ning.async-http-client_1.6.3.201112281337.jar (Access is …
Run Code Online (Sandbox Code Playgroud)

eclipse install eclipse-indigo

4
推荐指数
1
解决办法
1万
查看次数