0 Replies Latest reply on Jul 24, 2008 8:59 AM by Christoph Wozniak

    org.hibernate.hql.ast.QuerySyntaxException: Terms is not map

    Christoph Wozniak Newbie

      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