StackDoc

StackDoc

當前位置: 主頁 > 服務器軟件 > Apache >

java.lang.ClassNotFoundException: org.apache.commons.beanutils.Converter

時間:2011-02-11 22:31來源:互聯網 作者:互聯網 點擊:
當用maven構建struts的web項目時,容器拋出如下錯誤: java.lang.ClassNotFoundException: org.apache.commons.beanutils.Con
?

當用maven構建struts的web項目時,容器拋出如下錯誤:

java.lang.ClassNotFoundException: org.apache.commons.beanutils.Converter

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

at java.lang.Class.getConstructor0(Class.java:2699)

at java.lang.Class.newInstance0(Class.java:326)

at java.lang.Class.newInstance(Class.java:308)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1116)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)

at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)

at org.apache.catalina.core.StandardService.start(StandardService.java:519)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:581)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

經檢查,是struts中引用了一個jar包(xml-api)的衝突導致, 所以excluse掉就可以了,如下:

 <dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts-core</artifactId>
			<version>1.3.5</version>
			<exclusions>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
				</exclusion>
			</exclusions>
		</dependency> 

That's fine!


本文摘自:http://sunxboy.javaeye.com/blog/888988
頂一下
(0)
0%
踩一下
(0)
0%
------分隔線----------------------------
發表評論
請自覺遵守互聯網相關的政策法規,嚴禁發布色情、暴力、反動的言論。
評價:
表情:
用戶名: 驗證碼:點擊我更換圖片
欄目列表
推薦內容
GOOGLE提供的廣告