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 8718343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:31:18+00:00 2026-06-13T06:31:18+00:00

I’m having the following problem while trying to execute unit tests. I’m working with

  • 0

I’m having the following problem while trying to execute unit tests. I’m working with a database in memory (I have used h2 and hsqldb for this purpose, but both of them drive me to the same error).

Having the following hibernate.cfg.xml file:

<hibernate-configuration>
<session-factory>
 <property name="hibernate.bytecode.use_reflection_optimizer">false</property>
 <property name="hibernate.connection.driver_class">org.h2.Driver</property>
 <property name="hibernate.connection.url">jdbc:h2:mem:news;INIT=create schema IF NOT EXISTS news</property>
 <property name="hibernate.c3p0.min_size">5</property>
 <property name="hibernate.c3p0.max_size">20</property>
 <property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
 <property name="hibernate.connection.autocommit">false</property>
 <property name="current_session_context_class">thread</property>
 <property name="hibernate.hbm2ddl.auto">create-drop</property>
 <property name="show_sql">false</property>
 <mapping resource="com/mycom/common/List.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/Info.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/User.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/Category.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/Topic.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/CategoryRelation.hbm.xml"></mapping>
 <mapping resource="com/mycom/common/TopicRelation.hbm.xml"></mapping>
</session-factory>
</hibernate-configuration>

The purpouse of CategoryRelation.hbm.xml and TopicRelation.hbm.xml are just intermediate tables which contains a mapping between Category/Topic tables (master data tables) and other tables.

While autogenerating through hbm2ddl the database during the sessionFactory creation the following problem is raised:

2012-10-16 16:36:35,448 DEBUG [main] com.mchange.v2.c3p0.impl.NewPooledConnection  - com.mchange.v2.c3p0.impl.NewPooledConnection@af4627 handling a throwable.
org.h2.jdbc.JdbcSQLException: Table "T_RELATIONTOCATEGORY" not found

And same for t_relationtoTopic.

Extrac of CategoryRelation.hbm.xml file

<hibernate-mapping>
 <class name="com.yell.news.model.CategoryRelation" table="t_relationToCategory">
...
</hibernate-mapping>

Extract of any other that has a fk to this

<hibernate-mapping>
 <class name="com.mycom.myapp.model.List" table="t_List">
  ...
  <set name="categoryRelation" fetch="join" table="t_relationToCategory" lazy="false"  inverse="true" >
   <key>
    <column name="rec_ListId"></column>
   </key>
   <one-to-many class="com.yell.news.model.CategoryRelation"/>
  </set>
 </class>
</hibernate-mapping>

Any idea what could be the problem?

  • 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-06-13T06:31:19+00:00Added an answer on June 13, 2026 at 6:31 am

    I found the solution. It seems to be a problem with the hibernate version. I was using 4.1.1.Final.

    A colleague of mine told me to use 3.6.0.Final, so I added it to maven (with required library: javassist – version 3.12.1.GA) and the problem was solved.

    Seems to be a problem with version 4.1.1.Final in Hibernate. Or maybe a configuration I didn’t found.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a reasonable size flat file database of text documents mostly saved in
I have a view passing on information from a database: def serve_article(request, id): served_article
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have a small JavaScript validation script that validates inputs based on Regex. I
I am trying to understand how to use SyndicationItem to display feed which is

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.