Pages

Sunday 13 May 2012

Migrating Spring Application from Tomcat 7.0 to JBoss EAP 5.1

It may appear quite obvious that any Spring based web application that works under Tomcat should be working when deployed to JBoss EAP 5.1. In fact, this is further than the truth. Most often than not, the Spring based web application would just spew out tones of exception messages. This is exactly what happened when I tried to deploy a Spring 3.0.5/Hibernate 3.5.6 web application to JBoss EAP 5.1. I did finally get the application to work but not after spending many hours of trial and error to figure out the exceptions. Here are my eventual fixes.

1. Removed all the XML parsers under WEB-INF/lib directory, i.e. xmlParsers, xml-api, xalan, xerces.

2. Added hibernate-validator-4.1.0.Final.jar to WEB-INF/lib directory. For some unknown reason, JBoss EAP 5.1 absolutely need this.

3. Add 2 entries to hibernate.properties to pass into Spring. See text in red below.

hibernate.properties hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=true
hibernate.bytecode.use_reflection_optimizer=true
#hibernate.cglib.use_reflection_optimizer=true
#hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
hibernate.cache.use_second_level_cache=true
hibernate.cache.region.factory_class=net.sf.ehcache.hibernate.EhCacheRegionFactory
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.hbm2ddl.auto=update
hibernate.generate_statistics=true
hibernate.jdbc.batch_size=20
hibernate.validator.autoregister_listeners=false
hibernate.validator.apply_to_ddl=false

With these changes, the web application finally works.

66 comments:

  1. Thanks a lot for sharing. You have done a brilliant job. Your article is truly relevant to my study at this moment, and I am really happy I discovered your website. However, I would like to see more details about this topic. I'm going to keep coming back here.

    Logo Maker

    ReplyDelete
    Replies
    1. It has been awhile since I wrote this. What details would you like to know?

      Delete
  2. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

    java training in tambaram | java training in velachery

    java training in omr | oracle training in chennai

    java training in annanagar | java training in chennai

    ReplyDelete
  3. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
    python training in pune
    python online training
    python training in OMR

    ReplyDelete
  4. I am happy to find this post Very useful for me, as it contains lot of information

    payrollsolutionexperts
    Technology

    ReplyDelete
  5. I really thank you for your innovative post.I have never read a creative ideas like your posts.here after i will follow your posts which is very much help for my career.
    Java Courses in Sholinganallur
    Java Training in Guindy
    Java Training in Anna nagar
    core Java Training in Bangalore

    ReplyDelete
  6. It is a great post. Keep sharing such kind of useful information.

    zhosters
    Guest posting sites

    ReplyDelete

  7. I like viewing web sites which comprehend the price of delivering the excellent useful resource Python training in pune free of charge. I truly adored reading your posting. Thank you!

    ReplyDelete
  8. I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.

    oracle training in bangalore

    ReplyDelete
  9. Right here is the right site for everyone who really wants to understand this topic. You know a whole lot its almost tough to argue with you (not that I really will need to…HaHa). You certainly put a brand new spin on a subject which has tech been written about for a long time. Wonderful stuff, just excellent!

    ReplyDelete
  10. It's a very awesome article! Thanks a lot for sharing information...
    Oracle Training in Bangalore

    ReplyDelete
  11. This is a wonderful article, Given so much info in it, Thanks for sharing. CodeGnan offers courses in new technologies and makes sure students understand the flow keep it up.
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Movie-watching websites that are more than movie-watching websites Because we are the number 1 free movie site in Thailand for a long time, including new movies, Thai movies, Western movies, Asian movies, we have all kinds of ways for you Including new series Full of all stories without interstitial ads to keep annoying anymore. One place sa-movie.com.

    Android and IOS operating systems. Watch online movies, Thai movies, Western movies, Asian movies, Cartoon movies, Netflix Movie, Action Movies, Comedy Movies, Crime Movies, Drama Movies, Horror Movies, Adventure Movies, Crash Movies and still have many new movies to watch. You can watch for free anytime, anywhere 24 hours a day at see4k.com.


    GangManga read manga, read manga, read manga online for free, fast loading, clear images in HD quality, all titles, anywhere, anytime, on mobile, tablet, computer. Android and IOS operating systems. Read top comics, action dramas, comedy, adventure, horror and manga. New coming every day to watch many more. Can be read for free anytime anywhere 24 hours a day at gangmanga.com..

    It is no secret that football is among the most popular and widely watched sports. Everybody who likes football tries to find the best platform for free soccer streaming. So, what are the best free sports streaming sites? We are going to answer this question. On this page, you can find a detailed overview of the most widespread soccer streaming websites. Keep on reading and make the best choice for you live24th.me.

    ReplyDelete
  14. Probably the most genuine football betting UFABET that's beyond description Find fun, excitement and excitement with slot video games, hundred totally free recognition, quick withdrawal. If you desire to have fun slots for money No need to deposit a great deal, no minimum, no need to share, squander moment for the reason that UFABET is in fact reduced, given seriously, many great offers are waiting for you. Prepared to ensure pleasurable, regardless of whether it's Joker SlotXo fruit slot, we are able to phone it an internet slot website for you personally especially. Ready to have fun Like the support staff which is going to facilitate slot formulas as well as techniques of actively playing So you will be certain that each minute of fun and pleasure We will be there for one to give your customers the best appearance as well as fulfillment.
    บาคาร่า
    สล็อต
    ufa
    แทงบอล

    ReplyDelete
  15. Well-written blog! It was an extremely well-informed blog with in-depth information, and many updates will be encouraged by it.Colleges In Hyderabad For B.com


    ReplyDelete
  16. Your personal dedication to conveying the word effectively became rather potent and has continuously helped workers such as me reach their intended objectives. CA Coaching in Hyderabad

    ReplyDelete