weblogic启动报错。使用tomcat运行良好。

时间:2022-02-14 15:59:56
最近开发的一个工程,在tomcat上跑的那叫一个欢实。但是因为公司服务器是weblogic的,所以必须移植到weblogic上面。在weblogic上启动的时候结果报了如下错误。请各位高手帮忙看看。不胜感谢!
注:weblogic是9.2版本,jdk是1.5的

错误如下:
 D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT\WEB-INF\web.xml:41:5:41:5: problem: cvc-complex-type.2.4a: Expected element 'dispatcher@http://java.sun.com/xml/ns/j2ee' instead of 'url-pattern@http://java.sun.com/xml/ns/j2ee' here in element filter-mapping@http://java.sun.com/xml/ns/j2ee:<D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT/WEB-INF/web.xml:41:5>
  D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT\WEB-INF\web.xml:46:5:46:5: problem: cvc-complex-type.2.4a: Expected element 'dispatcher@http://java.sun.com/xml/ns/j2ee' instead of 'url-pattern@http://java.sun.com/xml/ns/j2ee' here in element filter-mapping@http://java.sun.com/xml/ns/j2ee:<D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT/WEB-INF/web.xml:46:5>
  D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT\WEB-INF\web.xml:51:5:51:5: problem: cvc-complex-type.2.4a: Expected element 'dispatcher@http://java.sun.com/xml/ns/j2ee' instead of 'url-pattern@http://java.sun.com/xml/ns/j2ee' here in element filter-mapping@http://java.sun.com/xml/ns/j2ee:<D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT/WEB-INF/web.xml:51:5>
  D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT\WEB-INF\web.xml:56:5:56:5: problem: cvc-complex-type.2.4a: Expected element 'dispatcher@http://java.sun.com/xml/ns/j2ee' instead of 'url-pattern@http://java.sun.com/xml/ns/j2ee' here in element filter-mapping@http://java.sun.com/xml/ns/j2ee:<D:\bea\user_projects\domains\base_domain\.\autodeploy\ROOT/WEB-INF/web.xml:56:5>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:229)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:216)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:280)
at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:749)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:378)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:720)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:729)
at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:134)
at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:778)
at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:275)
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:621)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:208)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:131)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:38)
at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:177)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
.> 


web.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext.xml</param-value>
</context-param>
<listener> 
       <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener> 
    <listener> 
       <listener-class>com.sunloto.mobileservice.utils.InitListener</listener-class> 
    </listener> 
    <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter>
<filter-name>setCharacterEncoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter>
<filter-name>struts2-prepare</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
</filter>
<filter>
<filter-name>struts2-execute</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>setCharacterEncoding</filter-name>
<url-pattern>*.action</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-prepare</filter-name>
<url-pattern>*.action</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2-execute</filter-name>
<url-pattern>*.action</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
</web-app>

9 个解决方案

#1


另外,我把所有的<filter>去掉后就不会报这个错误。加上之后就会报。已经折腾我快一周了。请大侠们帮忙看看到底是咋回事。

#2


是不是框架的class文件的编译不是用JDK5的,而是其他的呢。。有没有这种可能性。

#3


顶楼主,最近也遇到这个问题
我这边是spring的filter报错了,百思不得其解啊
怀疑是不是这些框架的某些地方和weblogic冲突了

#4


回2楼~确实全都是用的jdk1.5。
有木有高手来指点迷津?

#5


去掉这个试试

<url-pattern>*.jsp</url-pattern>

#6


引用 5 楼 mingr6370 的回复:
去掉这个试试

<url-pattern>*.jsp</url-pattern>


我觉得他回答的对

#7


按照5楼的办法重新部署了一下,原来的问题解决了。又出现新的问题。

An error occurred during activation of changes, please see the log for details.
[HTTP:101064][WebAppModule(wap:wap)] Error parsing descriptor in Web appplication "/sunloto/appdir/wap" weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:784) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:275) 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:621) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:208) 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:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at

weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:229) at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:216) at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141) at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:280) at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248) at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:749) at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:378) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:720) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:729) at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:134) at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:778) ... 25 more weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:
VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:


找了新资料,有人说把web.xml重新存为utf-8格式的就可以。试了一下没什么作用。

#8


哥们,解决了没有,我也碰到了类似问题。

#9


你好,请参考这2篇文章,希望对你有帮助
http://blog.csdn.net/shimiso/article/details/6045162
http://blog.csdn.net/shimiso/article/details/6045160

#1


另外,我把所有的<filter>去掉后就不会报这个错误。加上之后就会报。已经折腾我快一周了。请大侠们帮忙看看到底是咋回事。

#2


是不是框架的class文件的编译不是用JDK5的,而是其他的呢。。有没有这种可能性。

#3


顶楼主,最近也遇到这个问题
我这边是spring的filter报错了,百思不得其解啊
怀疑是不是这些框架的某些地方和weblogic冲突了

#4


回2楼~确实全都是用的jdk1.5。
有木有高手来指点迷津?

#5


去掉这个试试

<url-pattern>*.jsp</url-pattern>

#6


引用 5 楼 mingr6370 的回复:
去掉这个试试

<url-pattern>*.jsp</url-pattern>


我觉得他回答的对

#7


按照5楼的办法重新部署了一下,原来的问题解决了。又出现新的问题。

An error occurred during activation of changes, please see the log for details.
[HTTP:101064][WebAppModule(wap:wap)] Error parsing descriptor in Web appplication "/sunloto/appdir/wap" weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:784) at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:275) 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:621) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:208) 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:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at

weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) Caused by: weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:229) at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:216) at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141) at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:280) at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:248) at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:749) at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:378) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:720) at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:729) at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:134) at weblogic.servlet.internal.WebAppModule.loadDescriptor(WebAppModule.java:778) ... 25 more weblogic.application.ModuleException: VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:
VALIDATION PROBLEMS WERE FOUND /sunloto/appdir/wap/WEB-INF/web.xml:1:5:1:5: problem: No content type provided for validation of a content model.:


找了新资料,有人说把web.xml重新存为utf-8格式的就可以。试了一下没什么作用。

#8


哥们,解决了没有,我也碰到了类似问题。

#9


你好,请参考这2篇文章,希望对你有帮助
http://blog.csdn.net/shimiso/article/details/6045162
http://blog.csdn.net/shimiso/article/details/6045160