注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

love3400wind的blog

like

 
 
 

日志

 
 
 
 

在WebLogic上部署使用xfire遇到问题解决方法 Error initializing XFireServlet. java.lang.NoSuchMethodError: javax.xml.namespace.QName: method <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)  

2011-11-15 10:38:32|  分类: IT |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

先说一下运行环境:AIX5.2++JDK1.4+WEBLOGIC8.1+ORACLE9I。当工程发不上去以后,启动WEBLOGIC,控制台报错:

<2011-11-15 上午02时31分19秒 GMT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_11-b06 from Sun Microsystems Inc.>
<2011-11-15 上午02时31分19秒 GMT> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
<2011-11-15 上午02时31分19秒 GMT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP6  Wed Jun 21 08:18:55 PDT 2006 781680
WebLogic XMLX Module 8.1 SP6  Wed Jun 21 08:18:55 PDT 2006 781680 >
<2011-11-15 上午02时31分19秒 GMT> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at C:\bea\user_projects\domains\mydomain\config.xml.>
<2011-11-15 上午02时31分21秒 GMT> <Notice> <Log Management> <BEA-170019> <The server log file C:\bea\user_projects\domains\mydomain\myserver\myserver.log is opened. All server side log events will be written to this file.>
<2011-11-15 上午02时31分22秒 GMT> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<2011-11-15 上午02时31分22秒 GMT> <Notice> <WebLogicServer> <BEA-000327> <Starting WebLogic Admin Server "myserver" for domain "mydomain">
<2011-11-15 上午02时31分26秒 GMT> <Warning> <HTTP> <BEA-101248> <[Application: 'C:\bea\user_projects\domains\mydomain\applications', Module: 'ServiceCrime']: Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'. (line 2, column 221).>
2011-11-15 02:31:29,285  INFO (ContextLoader.java:174) - Root WebApplicationContext: initialization started
 2011-11-15 02:31:29,554  INFO (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/applicationContext.xml]
 2011-11-15 02:31:29,557 DEBUG (XmlBeanDefinitionReader.java:219) - Using JAXP implementation [weblogic.xml.jaxp.RegistryDocumentBuilderFactory@a4911d]
 2011-11-15 02:31:29,561 DEBUG (BeansDtdResolver.java:50) - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
 2011-11-15 02:31:29,562 DEBUG (BeansDtdResolver.java:56) - Trying to locate [spring-beans.dtd] in Spring jar
 2011-11-15 02:31:29,564 DEBUG (BeansDtdResolver.java:64) - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath
 2011-11-15 02:31:29,572 DEBUG (DefaultXmlBeanDefinitionParser.java:180) - Loading bean definitions
 2011-11-15 02:31:29,574 DEBUG (DefaultXmlBeanDefinitionParser.java:185) - Default lazy init 'false'
 2011-11-15 02:31:29,575 DEBUG (DefaultXmlBeanDefinitionParser.java:186) - Default autowire 'no'
 2011-11-15 02:31:29,576 DEBUG (DefaultXmlBeanDefinitionParser.java:187) - Default dependency check 'none'
 2011-11-15 02:31:29,704 DEBUG (DefaultXmlBeanDefinitionParser.java:193) - Found 6 <bean> elements in ServletContext resource [/WEB-INF/classes/applicationContext.xml]
 2011-11-15 02:31:29,705 DEBUG (AbstractBeanDefinitionReader.java:144) - Loaded 6 bean definitions from location pattern [/WEB-INF/classes/applicationContext.xml]
 2011-11-15 02:31:29,706  INFO (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from ServletContext resource [/WEB-INF/xfire-servlet.xml]
 2011-11-15 02:31:29,708 DEBUG (XmlBeanDefinitionReader.java:219) - Using JAXP implementation [weblogic.xml.jaxp.RegistryDocumentBuilderFactory@1974028]
 2011-11-15 02:31:29,712 DEBUG (BeansDtdResolver.java:50) - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
 2011-11-15 02:31:29,713 DEBUG (BeansDtdResolver.java:56) - Trying to locate [spring-beans.dtd] in Spring jar
 2011-11-15 02:31:29,715 DEBUG (BeansDtdResolver.java:64) - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath
 2011-11-15 02:31:29,721 DEBUG (DefaultXmlBeanDefinitionParser.java:180) - Loading bean definitions
 2011-11-15 02:31:29,722 DEBUG (DefaultXmlBeanDefinitionParser.java:185) - Default lazy init 'false'
 2011-11-15 02:31:29,722 DEBUG (DefaultXmlBeanDefinitionParser.java:186) - Default autowire 'no'
 2011-11-15 02:31:29,723 DEBUG (DefaultXmlBeanDefinitionParser.java:187) - Default dependency check 'none'
 2011-11-15 02:31:29,734  INFO (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from class path resource [org/codehaus/xfire/spring/xfire.xml]
 2011-11-15 02:31:29,737 DEBUG (XmlBeanDefinitionReader.java:219) - Using JAXP implementation [weblogic.xml.jaxp.RegistryDocumentBuilderFactory@1da5d65]
 2011-11-15 02:31:29,741 DEBUG (BeansDtdResolver.java:50) - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
 2011-11-15 02:31:29,742 DEBUG (BeansDtdResolver.java:56) - Trying to locate [spring-beans.dtd] in Spring jar
 2011-11-15 02:31:29,744 DEBUG (BeansDtdResolver.java:64) - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath
 2011-11-15 02:31:29,750 DEBUG (DefaultXmlBeanDefinitionParser.java:180) - Loading bean definitions
 2011-11-15 02:31:29,751 DEBUG (DefaultXmlBeanDefinitionParser.java:185) - Default lazy init 'false'
 2011-11-15 02:31:29,753 DEBUG (DefaultXmlBeanDefinitionParser.java:186) - Default autowire 'no'
 2011-11-15 02:31:29,756 DEBUG (DefaultXmlBeanDefinitionParser.java:187) - Default dependency check 'none'
 2011-11-15 02:31:29,756  INFO (XmlBeanDefinitionReader.java:163) - Loading XML bean definitions from class path resource [org/codehaus/xfire/spring/customEditors.xml]
 2011-11-15 02:31:29,760 DEBUG (XmlBeanDefinitionReader.java:219) - Using JAXP implementation [weblogic.xml.jaxp.RegistryDocumentBuilderFactory@47e380]
 2011-11-15 02:31:29,763 DEBUG (BeansDtdResolver.java:50) - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
 2011-11-15 02:31:29,764 DEBUG (BeansDtdResolver.java:56) - Trying to locate [spring-beans.dtd] in Spring jar
 2011-11-15 02:31:29,766 DEBUG (BeansDtdResolver.java:64) - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath
 2011-11-15 02:31:29,772 DEBUG (DefaultXmlBeanDefinitionParser.java:180) - Loading bean definitions
 2011-11-15 02:31:29,773 DEBUG (DefaultXmlBeanDefinitionParser.java:185) - Default lazy init 'false'
 2011-11-15 02:31:29,774 DEBUG (DefaultXmlBeanDefinitionParser.java:186) - Default autowire 'no'
 2011-11-15 02:31:29,775 DEBUG (DefaultXmlBeanDefinitionParser.java:187) - Default dependency check 'none'
 2011-11-15 02:31:29,800  INFO (CollectionFactory.java:66) - JDK 1.4+ collections available
 2011-11-15 02:31:29,803 DEBUG (CollectionFactory.java:114) - Creating [java.util.LinkedHashMap]
 2011-11-15 02:31:29,824 DEBUG (DefaultXmlBeanDefinitionParser.java:398) - Neither XML 'id' nor 'name' specified - using generated bean name [org.codehaus.xfire.spring.editors.ServiceFactoryEditor#13954b1]
 2011-11-15 02:31:29,839 DEBUG (DefaultXmlBeanDefinitionParser.java:193) - Found 1 <bean> elements in class path resource [org/codehaus/xfire/spring/customEditors.xml]
 2011-11-15 02:31:29,840 DEBUG (DefaultXmlBeanDefinitionParser.java:336) - Imported 1 bean definitions from relative location [customEditors.xml]
 2011-11-15 02:31:30,151 ERROR (ContextLoader.java:210) - Context initialization failed
 java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
 at org.codehaus.xfire.aegis.type.DefaultTypeMappingRegistry.<clinit>(DefaultTypeMappingRegistry.java:66)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:219)
 at org.springframework.util.ClassUtils.forName(ClassUtils.java:108)
 at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:426)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:392)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:307)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.importBeanDefinitionResource(DefaultXmlBeanDefinitionParser.java:325)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:298)
 at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
 at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
 at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:134)
 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
 at weblogic.servlet.internal.WebAppServletContext$FireContextListenerAction.run(WebAppServletContext.java:7110)
 at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
 at weblogic.servlet.internal.WebAppServletContext.notifyCreated(WebAppServletContext.java:1757)
 at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3378)
 at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:6262)
 at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:892)
 at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2181)
 at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2222)
 at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2521)
 at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2439)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2156)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2255)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2150)
 at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2402)
 at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:884)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:592)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:501)
 at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
<2011-11-15 上午02时31分30秒 GMT> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V.>
<2011-11-15 上午02时31分30秒 GMT> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V.>
<2011-11-15 上午02时31分30秒 GMT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating Deploy task for application _appsdir_ServiceCrime_dir.>
<2011-11-15 上午02时31分30秒 GMT> <Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID 0 for the application _appsdir_ServiceCrime_dir.
weblogic.management.DeploymentException:
Exception:weblogic.management.ApplicationException: start() failed.
 Module: ServiceCrime Error: weblogic.management.DeploymentException: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - with nested exception:
[java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V]

 at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2441)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2156)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2255)
 at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2150)
 at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2402)
 at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:884)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:592)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:501)
 at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
--------------- nested within: ------------------
weblogic.management.ManagementException:  - with nested exception:
[weblogic.management.DeploymentException:
Exception:weblogic.management.ApplicationException: start() failed.
 Module: ServiceCrime Error: weblogic.management.DeploymentException: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - with nested exception:
[java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V]
]
 at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2414)
 at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:884)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:592)
 at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:501)
 at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
>
<2011-11-15 上午02时31分34秒 GMT> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "myserver" for domain "mydomain" running in Development Mode>
<2011-11-15 上午02时31分34秒 GMT> <Warning> <WebLogicServer> <BEA-000372> <HostName: 0.0.0.0, maps to multiple IP addresses:192.168.8.20,192.168.56.1>
<2011-11-15 上午02时31分34秒 GMT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
<2011-11-15 上午02时31分34秒 GMT> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>

 

What is this java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String);V Exception?

Several application servers (WebSphere and WebLogic, for example) include an older version of the QName class. XFire (as well as XMLBeans and Stax) require the new version. Weblogic usage has been documented, WebSphere will be similar.


 XFire on Weblogic 8.1:

XFire requires a newer version of the javax.xml.namespace.QName than is included in weblogic.jar. The QName jar can be found here

To override the weblogic.jar with your own QName.jar, your need to do the following:


1. Add the QName JAR file (qname.jar) into the WEB-INF/lib folder in your WAR file
2. Add a file weblogic.xml into the WEB-INF folder in your WAR file

Below is an example weblogic.xml file:

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
 <container-descriptor>
  <prefer-web-inf-classes>true</prefer-web-inf-classes>
 </container-descriptor>
</weblogic-web-app>

  评论这张
 
阅读(4323)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017