I just wanted to make a small post regarding an issue I spent almost a day getting rid off. I have a quite typical web architecture :

  • jar module encapsulating business logic (EJBs)
  • war module providing front end web access
  • war module for web service access (using JAX-RS)

The headache

Each war module depends on the ejb-client counterpart present in WEB-INF/lib. The problem I faced is that my @EJB injections was raising ClassNotFoundExceptions. I tried bypassing automatic injection with manual JNDI lookups but the same errors occurred. Playing with the debugger I found that the jars present in lib folder were not added into the web application's classloader.

The workaround

I spent a lot of time trying many things to fix this and found out the trick by downloading Jersey's sample. You simply have to have a sun-web.xml with the following content :

  <class-loader delegate="true"></class-loader>

I hope it will help someone else!

Dark Mode iOS Snapshot

# Dark mode supportAs you might know, iOS supports Dark mode since iOS 12. It is pretty straightforward to implement it by using dynamic ...… Continue reading


Published on December 31, 2020

macOS tools checklist

Published on December 06, 2020