一个Weblogic的细节错误

<错误信息如下:>
<2009-11-12 下午03时49分05秒 CST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\bea\user_projects\workspaces\workshop\webService\build\jws\weboutput/WEB-INF/web.xml of module webService.war. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
	at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
	at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
	at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
	at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
	at weblogic.application.descriptor.AbstractDescriptorLoader2._mergeDescriptors(AbstractDescriptorLoader2.java:565)
	at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptors(AbstractDescriptorLoader2.java:486)
	at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptors(AbstractDescriptorLoader2.java:463)
	at weblogic.servlet.internal.WebAppDescriptor.mergeLibaryDescriptors(WebAppDescriptor.java:173)
	at weblogic.servlet.internal.WebAppModule.mergeLibraryDescriptors(WebAppModule.java:1086)
	at weblogic.servlet.internal.WebAppServletContext.mergeLibraryDescriptors(WebAppServletContext.java:2500)
	at weblogic.servlet.internal.WebAppServletContext.mergeLibraryDescriptors(WebAppServletContext.java:2479)
	at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:374)
	at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:429)
	at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:402)
	at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:573)
	at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:295)
	at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
	at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
	at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
	at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
	at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
	at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
	at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
	at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
	at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
	at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
	at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189)
	at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87)
	at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
	at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
	at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
Caused by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.ListenerBeanImpl@68992908(/Listeners[org.springframework.web.context.ContextLoaderListener])"
	at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:54)


<解决办法:>
去掉你的配置文件(像Web.xml)中的空格,原因是WebLogic并没有对空格进行处理导致错误,而在Tomcat中并不会出现问题.

你可能感兴趣的:(java,tomcat,servlet,weblogic,360)