Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:32:43+00:00 2026-05-27T23:32:43+00:00

I’m new to hibernate search and I just started to make a sample search

  • 0

I’m new to hibernate search and I just started to make a sample search project using internet “how-to s”. every thing seems fine except that when I try to run project I got the fallowing errors:

Jan 7, 2012 4:10:41 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Jan 7, 2012 4:10:41 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.0.0.Final}
Jan 7, 2012 4:10:41 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Jan 7, 2012 4:10:41 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Jan 7, 2012 4:10:41 PM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
Jan 7, 2012 4:10:41 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(4) Element type "hibernate-configuration" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(6) Element type "session-factory" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(11) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(13) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(16) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(17) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(18) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(21) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(25) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(27) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(31) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(32) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(34) Element type "property" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(36) Element type "listener" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(37) Element type "listener" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(38) Element type "listener" must be declared.
Jan 7, 2012 4:10:41 PM org.hibernate.internal.util.xml.XMLHelper$ErrorLogger error
ERROR: HHH000197: Error parsing XML: /hibernate.cfg.xml(40) Element type "mapping" must be declared.

but I declared all of the errors, here’s my cfg.xml file:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/">

<hibernate-configuration>

    <session-factory>

        <!-- 
        <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
         -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

        <property name="connection.url">
            jdbc:mysql://localhost:3306/hsearchexample
        </property>
        <property name="connection.username">root</property>
        <property name="connection.password"></property>
        <property name="connection.driver_class">
            com.mysql.jdbc.Driver
        </property>
        <property name="dialect">
            org.hibernate.dialect.MySQLDialect
        </property>

        <property name="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</property>

        <property name="hibernate.search.default.indexBase">
            ./searchTMP/indexes
        </property>

        <property name="current_session_context_class">thread</property>
        <property name="show_sql">true</property>

        <property name="hbm2ddl.auto">create-drop</property>

        <listener type="post-insert" class="org.hibernate.search.event.FullTextIndexEventListener"/> 
        <listener type="post-update" class="org.hibernate.search.event.FullTextIndexEventListener"/> 
        <listener type="post-delete" class="org.hibernate.search.event.FullTextIndexEventListener"/>

        <mapping class="ir.ehphan.search.Article" />
    </session-factory>
</hibernate-configuration>

I don’t know what to do? and I don’t seem to be finding answers using google… please help me. thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:32:44+00:00Added an answer on May 27, 2026 at 11:32 pm

    You’re using hibernate 4 and because of that us should not define your listeners in hibernate.cfg.xml instead you should use an org.hibernate.integrator.spi.Integrator which works based on “service discovery”, according to Hibernate Core Migration Guide : 4.0.
    and you should change your

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I want use html5's new tag to play a wav file (currently only supported
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.