| 
					
						 Hi,
 Thanks for the reply.
 I am using hibernate-2.0. The problem was in the DOCTYPE declaration in hibernate.cfg.xml I was mistakenly specifying "...hibernate-configuration-3.0.dtd" though I am using 2.0, I corrected that and it worked fine but now stucked on the next step. 
 Now its giving me error in the mapping file which I am using.
 The error is as follows:
  net.sf.hibernate.MappingException: Error reading resource: keyword.hbm.xml
      at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:339)
      at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:1013)
      at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:969)
      at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:897)
      at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:883)
      at Main.main(Unknown Source)
  Caused by: net.sf.hibernate.MappingException: duplicate import: Keyword
      at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85)
      at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126)
      at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221)
      at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1256)
      at net.sf.hibernate.cfg.Configuration.add(Configuration.java:252)
      at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:288)
      at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:336)
      ... 5 more
  Exception in thread "main"
  Java Result: 1
 
 Any inputs on this??
 
 Code in mapping file:
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
           "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
           "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
 <hibernate-mapping>
   <!-- table created by: CREATE TABLE KEYWORDS ( ID IDENTITY, NAME VARCHAR(25) ); -->
   <class name="Keyword" 
          table="keywords">    
            <id name="id" 
         type="integer"
         column="id">
       <generator class="increment"/>
     </id>    
 	<property name="name" 
               column="NAME" 
               not-null="true"
               unique="true"
       />
   </class>
 </hibernate-mapping>
 
 thnks,
 Medhavi. 
					
  
						
					 |