title: Error while starting Hibernate Search in Web app
body: <p>can someone help, I placing hibernate search in my web app and getting the following error:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;
  &lt;hibernate-configuration&gt;
      &lt;session-factory&gt;
          &lt;property name="hibernate.connection.driver_class"&gt;org.postgresql.Driver&lt;/property&gt;
          &lt;property name="hibernate.connection.url"&gt;jdbc:postgresql://localhost/postgres&lt;/property&gt;
          &lt;property name="hibernate.connection.username"&gt;postgres&lt;/property&gt;
          &lt;property name="hibernate.connection.password"&gt;noor&lt;/property&gt;
          &lt;property name="hibernate.connection.pool_size"&gt;10&lt;/property&gt;
          &lt;property name="show_sql"&gt;true&lt;/property&gt;
          &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/property&gt;
          &lt;property name="hibernate.hbm2ddl.auto"&gt;update&lt;/property&gt;
          &lt;property name="current_session_context_class"&gt;thread&lt;/property&gt; 
  
          &lt;property name="hibernate.search.default.indexBase"&gt; 
              /users/application/indexes 
          &lt;/property&gt; 
          &lt;property name="hibernate.search.default.indexBase"&gt; 
              /users/application/indexes 
          &lt;/property&gt;
  
          &lt;mapping resource="com/BiddingSystem/Models/Users.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/ForumTopic.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/ForumMessage.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Administrator.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/PersonalUser.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/BusinessUser.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/BusinessContactNumbers.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Attribute.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/AttributeOption.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Category.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Item.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Auction.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Picture.hbm.xml"/&gt;
          &lt;mapping resource="com/BiddingSystem/Models/Bid.hbm.xml"/&gt;
  
  
      &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p><strong>Stack Trace:</strong></p>
  
  <pre><code>org.hibernate.HibernateException: could not init listeners
   at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:205)
   at org.hibernate.cfg.Configuration.getInitializedEventListeners(Configuration.java:1980)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842)
   at com.BiddingSystem.server.ServiceImpl.&lt;init&gt;(ServiceImpl.java:87)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.Class.newInstance0(Class.java:355)
   at java.lang.Class.newInstance(Class.java:308)
   at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
   at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
   at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
   at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
   at org.mortbay.jetty.Server.handle(Server.java:324)
   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
   at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
   at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
   at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
  Caused by: org.hibernate.search.SearchException: Unable to initialize directory provider: com.BiddingSystem.Models.ForumMessage
   at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:169)
   at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProviders(DirectoryProviderFactory.java:100)
   at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:375)
   at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:262)
   at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:144)
   at org.hibernate.search.event.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:137)
   at org.hibernate.event.EventListeners$1.processListener(EventListeners.java:198)
   at org.hibernate.event.EventListeners.processListeners(EventListeners.java:181)
   at org.hibernate.event.EventListeners.initializeListeners(EventListeners.java:194)
   ... 28 more
  Caused by: org.hibernate.search.SearchException: Unable to create index directory: C:\users\application\indexes for index com.BiddingSystem.Models.ForumMessage
   at org.hibernate.search.store.DirectoryProviderHelper.makeSanityCheckedDirectory(DirectoryProviderHelper.java:252)
   at org.hibernate.search.store.DirectoryProviderHelper.getVerifiedIndexDir(DirectoryProviderHelper.java:234)
   at org.hibernate.search.store.FSDirectoryProvider.initialize(FSDirectoryProvider.java:62)
   at org.hibernate.search.store.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:166)
   ... 36 more
  </code></pre>