I found the cause of the error. Deploying an app outside the deploy directory results in the lucene-core.jar jar file not being found while creating the EntityManager. That's bad.
The work-around is simple: deploy the app in the deploy directory. But that's not so good; I really would like to have all my apps in /srv/jboss or some other place outside the JBoss directory structure.
Is there some better solution to this? Is this a bug?
This is in JBoss AS 4.2.3 JDK6.