[jboss-user] [EJB 3.0] - NamedQuery problem: TABLE is not mapped

Daniel Winz do-not-reply at jboss.com
Wed Aug 25 12:28:16 EDT 2010

Daniel Winz [http://community.jboss.org/people/danwin] replied to the discussion

"NamedQuery problem: TABLE is not mapped"

To view the discussion, visit: http://community.jboss.org/message/558999#558999

I am getting the "TABLE is not mapped" exception when I don't map the table explicitily in my persistence.xml. Obviously the autodetection property doesn't work.

+<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
    xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="Employee-Details">+ 
+         <jta-data-source>java:/jdbc/employee</jta-data-source>
+         <properties> 
+             <!-- for detecting the Mapped Files -->
            <property name="hibernate.archive.autodetection" value="class" />
            <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
            <property name="hibernate.show_sql" value="true" />
            <property name="hibernate.format_sql" value="true" />             
+    +     +</properties>

When I add <class>employee.EmployeeEntity</class> I don't have any problem.
But I would like to generate the tables and entities. And therefore I don't want to add configuration everytime.

Can anyone help?


Reply to this message by going to Community

Start a new discussion in EJB 3.0 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100825/b68aa813/attachment.html 

More information about the jboss-user mailing list