0

I am migrating my JBoss from 4.0.5 to WildFly 9.0.2 release, and my application has some dependency from JRE/lib/rt.jar, but when I deploy that application on WildFly, application gives error like ClassNotFoundException. If I add rt.jar as dependency in lib directory then application works.

So does anyone knows how to overcome from this problem.

Eg.

javax.xml.parsers.SAXParser.class which is available in rt.jar.

Sevan
  • 669
  • 1
  • 5
  • 18
Alpesh Jikadra
  • 1,692
  • 3
  • 18
  • 38
  • Could you share log file of WildFly? and Have you ever check JRE libraries on build path of your project? – Sevan Dec 22 '15 at 14:24
  • Please find a like to download log file. [Click Here](https://drive.google.com/file/d/0B6UHhxI12LRUWXAzLVREQ2NLSmM/view?usp=sharing) – Alpesh Jikadra Dec 23 '15 at 08:13
  • Did you add apache xerces on your WildFly as a module? I think that if you add as a module, exception will be solved. Also, I guess you controlled JRE library on build path of your project. – Sevan Dec 23 '15 at 09:16
  • After adding your suggestion I am getting one more exception, Please have a look in attached link [Click Here](https://drive.google.com/file/d/0B6UHhxI12LRUWXAzLVREQ2NLSmM/view?usp=sharing) – Alpesh Jikadra Dec 24 '15 at 05:55
  • I checked and made comparison but both files are same. Given exception from WildFly is same, too. Are you sure that you add apache xerces as a module? Could you update your question that shows module definition on WildFly? – Sevan Dec 24 '15 at 08:11
  • Sorry Sevan, I forgot to update the link, Here is the actual file link [Click](https://drive.google.com/file/d/0B6UHhxI12LRUaFpoekVhUWFIWWs/view) – Alpesh Jikadra Dec 24 '15 at 10:34
  • Did you add "Dependencies: javax.api" to MANIFEST.MF of your war/ear archive? – Rustam Dec 25 '15 at 13:40
  • I have added the Dependencies in MANIFEST.MF too, but still the same issue, If I add any other extension then also I am getting the same Failed to load module error, **xerces** this module already has a dependency for javax.api. – Alpesh Jikadra Jan 05 '16 at 07:02
  • As a general rule you do not need any XML jars (such as xerces, xalan or xml-apis) in your deployments. In fact their very presence can cause weird errors such as yours. Please check that your deployed app contains **none** of these artifacts. And you certainly do not need to specify WildFly module dependencies. – Steve C Jan 06 '16 at 05:25
  • Hi, I have added the sample application on git hub so you can also reproduce the same issue on your local too. [GitHub](https://github.com/alpesh-jikadra/wildfly9-issues-examples) – Alpesh Jikadra Jan 06 '16 at 12:34

0 Answers0