The JBoss problem has led me to understand the clean project

Source: Internet
Author: User
Tags jboss

Recent company projects are migrating from WS above to JBoss, because many of the previous projects rely on WS, so the changes are great. I'm in charge of WebService's module changes recently. The new project was completely disconnected from WS, and there was no problem with Tomcat, but there was a lot of problems with JBoss.

Javax.servlet.ServletException:java.lang.LinkageError:loader constraint Violation:loader (instance of Org/jboss/web /tomcat/service/webctxloader$encloader) previously initiated loading for a different type with name "javax/xml/soap/
	Attachmentpart "Org.apache.struts.actions.DispatchAction.dispatchMethod (dispatchaction.java:298)
	Org.apache.struts.actions.DispatchAction.execute (dispatchaction.java:194)
	Org.apache.struts.action.RequestProcessor.processActionPerform (requestprocessor.java:419)
	Org.apache.struts.action.RequestProcessor.process (requestprocessor.java:224)
	Org.apache.struts.action.ActionServlet.process (actionservlet.java:1194) Org.apache.struts.action.ActionServlet.doGet (actionservlet.java:414) Javax.servlet.http.HttpServlet.service (
	httpservlet.java:617) Javax.servlet.http.HttpServlet.service (httpservlet.java:717) Com.zhx.zhb.application.common.pageFilter.RequestEncodeConversionFilter.doFilter ( REQUESTENCODECONVERSIONFILTER.JAVA:20) Org.jboss.web.tomcat.filters.ReplyHEaderfilter.dofilter (replyheaderfilter.java:96)
 

Look at the above is JBoss and a class in the project conflict, I find this class found JDK1.6, This class exists in the jar package of JavaEE5.0 and a WS in the project, I deleted the jar package first, but I found the project still problematic, and then I deleted the Java EE and JDK classes, and the project was the wrong one, and I restored the classes removed in JDK and Java EE to remove the conflicting classes in JBoss. Found that JBoss failed to start properly. There is no way, the Internet to check a lot of information, many of the JDK and JBoss inside the jar pack conflict, need to put the jar in JBoss in the JRE bin endorsed folder, but still not good, a whole troubled me for two days, really to the brink of collapse.

Then I suddenly wondered why the project would still report the problem of removing the JDK and Java EE and WS jar packages. Do other places have this class, I looked up the whole project found no, that is why, all of a sudden think that is not deleted the jar package, the project did not recompile it, To test my conjecture, I manually recompiled the project and found that it was really okay. The reason is that after the WS jar package was deleted, MyEclipse was not automatically recompiled for some reason. It has nothing to do with the classes in JDK or Java EE.

So, kids, if you have a problem with your project and you're on the verge of breaking down, try my way to recompile the project, and it's probably a pretty good idea that the development tool did not recompile for some reason when you re changing the project.

Figure 1.0


Figure 2.0


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.