[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - org.hibernate.hql.ast.QuerySyntaxException: Terms is not map

woezelmann do-not-reply at jboss.com
Thu Jul 24 08:59:38 EDT 2008


Hello,

I'm working on a dictionary-portlet and I'm using spring + hibernate.
For the SessionFactory I'm using the AnnotationSessionFactoryBean provied by spring. My application-context looks like this:



  | <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
  |         <property name="dataSource" ref="mssqlDataSource"/>
  |         <property name="hibernateProperties">
  |             <props>
  |                 <prop key="current_session_context_class">thread</prop>
  |                 <prop key="hbm2ddl.auto">validate</prop>
  |                 <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
  |             </props>
  |         </property>
  |         <property name="annotatedClasses">
  |             <list>
  |                 <value>com.os.intranet.dictionary.persistent.Terms</value>
  |             </list>
  |         </property>
  |     </bean>
  | 

Runnig a query with JUnit works just fine: e.g.
session.createQuery("from Term");

But if I deploy my portlet on JBoss and run the same query, I get this error:
org.hibernate.hql.ast.QuerySyntaxException: Terms is not mapped [from Term]

Do someone have an idea what's wrong?

Regards
Chris


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166416#4166416

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166416



More information about the jboss-user mailing list