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

  • Home
  • SEARCH
  • 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 518489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:56:33+00:00 2026-05-13T07:56:33+00:00

I use Hibernate in an extension-like server-side application, and I put my binaries to

  • 0

I use Hibernate in an extension-like server-side application, and I put my binaries to the Extensions folder of the server application.
The problem is, that if I run the server, the root folder is the root folder of the server application, and not the root of the binaries. Thus, Hibernate searches the config file in that folder, and it tries to find the classes from that folder. I guess this is related to the JVM, as the server launches it. The config file is not a problem though, because I can just copy my config files there, but all the paths gone invalid.
As a result, in my generated mapping file, I have a class org.gmate.data.SomeClass.java, but it won’t find it.

My question: Is there any way, solution or workaround, that I can set the root folder of Hibernate to be the Extension folder, so it starts to get the classes from there?

Thanks for all the replies in advance,
gmate

  • 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-13T07:56:33+00:00Added an answer on May 13, 2026 at 7:56 am

    I finally found the solution for my problem. The problem was not the assumed root folder as I thought, but the Class Loader that the server uses. As it was in my Extensions folder, a CustomClassLoader loaded my classes. and they did not appear in the classpath. As I moved my clsses into a jar file, and added that jar file to the classpath, I managed to use hibernate. Adding the Extension folder to the classpath resulted in loading these classes with SystemClassLoader, but then the advantages of the Custom ClassLoader dissappeared.

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

Sidebar

Related Questions

I have a Web Application that use Hibernate 3.0. When I restart my database
I am trying to use Hibernate to do save/load objects that look like this
We use hibernate in our application and like to use DAO pattern to implement
I have some EJBs that use Hibernate to persist data to the database. I
I would like to use hibernate-3.5-1.Final along with this plugin, what should be my
I would like to use hibernate for persisting objects through web services and am
I can use MySQL views in Hibernate by treating them like tables - ie.
I want to use Infinispan with hibernate second level cache. My application is running
I have figured out that I can use hibernate to get the sum of
I use Hibernate (through JPA) configured by Spring and when I launch my application

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.