[jboss-user] [jBPM] - Re: hibernate.cfg.xml not found (JBPM5 / Install.demo)
Touil Imad
do-not-reply at jboss.com
Mon Aug 13 19:01:27 EDT 2012
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&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120813/59a446b8/attachment.html
More information about the jboss-user
mailing list