Touil Imad [
https://community.jboss.org/people/imadt] created the discussion
"Re: hibernate.cfg.xml not found (JBPM5 / Install.demo)"
To view the discussion, visit:
https://community.jboss.org/message/753437#753437
--------------------------------------------------------------
Demain,
I have Jbpm5 with jBoss 7 well configured, right now i'm trying to excute a query that
will Insert "a simple row" in my database table "users".
*Here is my code with JPA :*
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
EntityManager em = emf.createEntityManager();
Query query = em.createQuery("SELECT c FROM users c");
List results = query.getResultList();
System.out.println(results);
When i run this i get this error :
java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: users is
not mapped [SELECT c FROM users c]
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:601)
at
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:96)
at com.sample.ProcessTest.testProcess(ProcessTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
...
I'm confused now i'm Using JPA but i get
*org.hibernate.hql.ast.QuerySyntaxException: users is not mapped* Error.
Hope that thinsg get clear for you now.
And i really appreciate your help. Thank you in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/753437#753437]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]