Hibernate version:3

<hibernate-mapping package="com.cl.pojo">
<class name="Address" table="ADDRESS">
<id name="id" type="long" column="ID" >
<generator class="increment"/>
</id>

<property name="std_id">
<column name="STD_ID" />
</property>
<property name="city">
<column name="CITY"/>
</property>
<property name="phone">
<column name="PHONE"/>
</property>


</class>
<query name="GetAllAddress">
<![CDATA[from com.cl.pojo.Address]]>
</query>

</hibernate-mapping>:

Code between sessionFactory.openSession() and session.close():

org.hibernate.MappingException: Named query not known: GetAllAddress
at org.hibernate.impl.AbstractSessionImpl.getNamedQue ry(AbstractSessionImpl.java:70)
at org.hibernate.impl.SessionImpl.getNamedQuery(Sessi onImpl.java:1224)
at _jsp._clzone._reports._erp._namedquery__jsp._jspSe rvice(/clzone/reports/erp/NamedQuery.jsp:32)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:571)
at com.caucho.server.dispatch.PageFilterChain.doFilte r(PageFilterChain.java:155)
at com.caucho.server.cache.CacheFilterChain.doFilter( CacheFilterChain.java:177)
at com.caucho.server.webapp.WebAppFilterChain.doFilte r(WebAppFilterChain.java:177)
at com.caucho.server.dispatch.ServletInvocation.servi ce(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(H ttpRequest.java:263)
at com.caucho.server.port.TcpConnection.run(TcpConnec tion.java:331)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.jav a:464)
at com.caucho.util.ThreadPool.run(ThreadPool.java:408 )
at java.lang.Thread.run(Thread.java:534)

:

Name and version of the database you are using:Oracle 10g

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


As u have seen the query named "GetAllAddress" is not been recognised.I tried use it within the class tag and outside it ...but could't able to run it.

So plz help me ... becoz for now i got stuck...
I used Query as ---
List addr = session2.getNamedQuery("GetAllAddress").list();
for(Iterator itr=addr.iterator();itr.hasNext();)
{
Address a = (Address)itr.next();
long ID = a.getId();
int FirstName = a.getStd_id();
String Phone = a.getPhone();
String City = a.getCity();
}
I have tried everything, but not able to run it.
In the mapping file I have written
<query name="allAddress">
<![CDATA[from com.cl.pojo.Address]]>
</query>
also tried
<![CDATA[ From Address ]]>
And in the jsp I have written:
List addr = session2.getNamedQuery("allAddress").list(); and
List addr = session2.getNamedQuery("com.cl.pojo.Address.allAdd ress").list();

But nothing seemed to work properly
Waiting for ur useful suggestions...

Regards
Abhishek