Skip to main content

Adding empty beans.xml makes GlassFish say "Cannot load app"

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2007-12-09

My app is not using CDI so far, and it deploys and runs on GF 2.1.1 rather well. :-)

Now I want to start using CDI, so I add META-INF\beans.xml (zero length file) and redeploy. Now GF rejects to deploy, always says "Exception while loading the app" in server.log (without any stack trace)! ;-(

[#|2013-04-02T17:04:01.282+0200|SEVERE|glassfish3.1.1||_ThreadID=40;_ThreadName=Thread-2;|Exception while loading the app|#]

How can I find out what the problem is, and how I could solve it?

I noticed that it is a known bug in GF 2.x which prevents the stack trace to show up. On the other hand I don't see that I did any fault at all (how could I, as I did not do anything but add a beans.xml file but not using any CDI annotations so far). So what the heck...?