今天在部署WebLogic项目时,报了java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory异常。

查询报错原因后,发现该异常是由Jar包冲突导致的。

大多数开发人员在本地使用Tomcat开发,而Tomcat中并没有此Jar包,需要添加JAR包xml-apis.jar;然鹅WebLogic却自带该Jar包,所以在往WebLogic上部署时,Jar包自然就冲突了。

解决办法

删除war包内的xml-apis.jar即可。

WebLogic部署报java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory的更多相关文章

  1. java.lang.ClassCastException:weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

    java.lang.ClassCastException:weblogic.xml.jaxp.RegistryDocumentBuilderFactory cannot be cast to java ...

  2. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法

    严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java. ...

  3. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer

    A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.Li ...

  4. java.lang.ClassCastException: cn.itcase.serviceImpl.servicestudentImpl cannot be cast to javax.servlet.Servlet

    java.lang.ClassCastException: cn.itcase.serviceImpl.servicestudentImpl cannot be cast to javax.servl ...

  5. Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer。。。。。检查一下servlet-api是否冲突了?

    原因:jar包发生冲突.在我的pom.xml文件中 <dependency>      <groupId>javax.servlet</groupId>       ...

  6. Java-Spring:java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案

    java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***问题解决方案 临床表现: 病例: 定义代理类: @Tra ...

  7. java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext问题原因及解决方法

    一.错误信息 java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerFactory cannot be cast to ch.qos.logb ...

  8. java.lang.ClassCastException: com.sun.proxy.$Proxy32 cannot be cast to com.bkc.bpmp.core.cache.MemcachedManager

    java.lang.ClassCastException: com.sun.proxy.$Proxy32 cannot be cast to com.bkc.bpmp.core.cache.Memca ...

  9. java.lang.ClassCastException: com.sun.proxy.$Proxy27 cannot be cast to com.bbk.n002.service.QuestionService

    1 严重: Servlet /N002-1.0 threw load() exception 2 java.lang.ClassCastException: com.sun.proxy.$Proxy2 ...

随机推荐

  1. Strange fuction

    Strange fuction Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Tot ...

  2. Linux学习(十七)压缩与打包

    一.关于打包和压缩 打包和压缩的最大意义在于减少文件传输中需要的流量.打包的方式大概有tar命令,zip命令.压缩的方式有gzip,bzip2,xz.tar命令可以通过参数将压缩和打包在一起执行. 二 ...

  3. Python 读取某个目录下的文件

    读取某个目录下的文件,如'/Users/test/test_kmls'目录下有test1.txt.test2.txt. 第一种方法读出的all_files是test1.txt.test2.txt im ...

  4. HTML5 设备上的API

    一.Vibration API ,接受两种类型参数 vibrate (unsigned long time)   当参数是unsigned long的时候 此时参数表示震动时间.  NotSuppor ...

  5. Photoshop 学习中

    快捷键: f8打开信息调板,注意虽然数字最高是255,但0也是数值之一,因此共256级. f7开启图层调板 f6调出调色板,按D还原为默认颜色 ctrl + 放大,ctrl - 缩小 f 可以切换显示 ...

  6. js关闭子页面刷新父页面

    一.打开方式为window.open window.opener.location.reload(); 二.打开方式为window.showModalDialog 首先在打开时的时候要设置window ...

  7. 使用javax.script包实现Java设置JS脚本中的变量

    下面例子中,我们通过javax.script包ScriptEngine.put()方法设置JS脚本中的变量,JS把所有在线用户输出. package ajava.code.javase; import ...

  8. C# 插入排序(数据结构与算法)

    1                                                                   }

  9. Spring 高级依赖注入方式

    1.处理自动装配的歧义性 1.1 标记首选的bean ​ 使用@Primary 来说明一个bean是首选的. @Component @Primary public class GuoRongCD im ...

  10. APP后台API文档管理对接(APP后台框架五)

    这一章还是总结点API管理工具,也大都是组件来的,关于spring-rest-doc 以为很不错,其实还是有点局限性的: 1,每一个接口文档,都要自己手动设置文档的展示: 2,每一个接口就独立一个文档 ...