It is similar to glassfish bug, but I am not sure .
Hard to say, especially since you didn't provide the stacktrace for the NoClassDefFoundError
, but the scenario seems different anyway.
Q1: is it passable to use ejb beans packaged in war (specification sad that is true)?
Definitely. You can either put EJB classes in WEB-INF/classes
or package them as EJB-JAR and put them in WEB-INF/lib
. I have several demo applications doing this.
Q2: should I describe some configuration by ejb-jar.xml ?
No, nothing forces you to do so.
Q3: what could be a cause of a problem?
The problem is that I couldn't reproduce the problem... I've deployed your EJB in a webapp with [ejb, jpa, web, webservices, weld]
engines enabled (I just modified it to insert an Entity of mine in the scheduled method) and it just works. Tested with an up-to-date version of GlassFish 3.0.1. So I suspect a mistake or configuration problem on your side.
Just in case, can you provide the output of jar xfv yourapp.war
(and also show your web.xml
)?