Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity not mapped!

 
Daniel Figueiredo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks!

I'm using seam, jbpm, hibernate and all entities is being recognized normally. But recently i needed to use a cron trigger (with quartz) to make some things automatically, so when i start new threads they can't call the entityManager provided by seam, so i went by the rocks way, i did call the Persistence.createEntityManagerFactory and after this, i could get my EM.
Testing the class without starting the server, it's work normally, but my persistence.xml points to a RESOURCE_LOCAL instead of a DataSource file with JTA.
When i started the jboss server i changed back the persistence.xml to normal like this:



It works normally as ever in all application, i can get the jbpmContext to createProcess and start new processDefinitions, but when the job's cron calls my method and he get the entityManager, i can't do any operations with it, any select with any entity throws me an exception:

java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: Procedimento is not mapped [select o from Procedimento o]

but it's mapped, i really use it and it works, but out of the cron. My entity is:



any ideas? i'm lost


thanks for all
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic