-
1. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 3:10 AM (in response to ranujain)Hi Ranu,
This kind of error clearly indicates that you have classloading issue. Most likely two different versions of the same library. Please check if you bundle dom4j with your test archive and if it's already available in the conainer.
-
2. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
ranujain Apr 26, 2013 3:12 AM (in response to bmajsak)No I have check that and test war have only one dom4j library.
-
3. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 3:18 AM (in response to ranujain)What about container libs?
-
4. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 3:20 AM (in response to bmajsak)First two results from google after pasting this error look promising:
https://community.jboss.org/message/780106
http://canjur.blogspot.ch/2012/07/jboss-7-caused-by-orgdom4jdocumentexcep.html
-
5. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
ranujain Apr 26, 2013 3:42 AM (in response to bmajsak)As per second post i made the change in manifest but its not working because i thing Aruillian replacing my manifest file with the default file.
And for the first one we have not included the dom4j jar explicity its come in hibernate entity manager dependency.
Can You please tell me how i can use the user defined manifest file in Arquillian war.
-
6. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 3:51 AM (in response to ranujain)Can you try to remove it from your WAR just to check what would be the result? [eg. exclude from hibernate and put as provided dependency in pom]
For the manifest file, I believe you can simply do it through shrinkwrap API. Just create some other one, named TEST-MANIFEST.MF for example, and put in the archive with the proper name.
-
7. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
ranujain Apr 26, 2013 4:46 AM (in response to bmajsak)I did as you told, Now deployment started but my test is giving attached exception.
I am using the same orm.xml file which was working on application side.
-
error.txt.zip 2.1 KB
-
-
8. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 5:01 AM (in response to ranujain)I'm sorry but it looks to me like very much application specific error... I'm not even sure if it has something to do with Arquillian at all. I would suggest to analyze if your test deployment contains all what you need if the full blown app is easily deployable and works without this problem.
-
9. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
ranujain Apr 26, 2013 5:46 AM (in response to bmajsak)Thanks for your time.. Now my issue solved with some changes.
Thank you so much
-
10. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
bmajsak Apr 26, 2013 5:53 AM (in response to ranujain)No problem Didn't really helped a lot. Have fun!
Cheers,
Bartosz
-
11. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
skorejo Apr 13, 2018 1:01 PM (in response to bmajsak)What did you change to fix this issue
-
12. Re: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception
skorejo Apr 13, 2018 1:02 PM (in response to ranujain)What did you change to fix this issue