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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:13:02+00:00 2026-05-22T23:13:02+00:00

We developing web services with Axis2 framework (legacy system). With jdbc it working fine,

  • 0

We developing web services with Axis2 framework (legacy system). With jdbc it working fine, but I need to use it with hibernate.
I tried 2 approaches:

  1. (Outside aar) I put hibernate*.jars to EARContent/lib and hibernate.cfg.xml to WEB-ING/classes
  2. (inside aar) I put hibernate.cfg.xml to aar/META-INF/ and added to service.xml parameter
    <parameter name="ServiceTCCL">composite</parameter>

In first case I couldn’t reach hibernate.cfg.xml
java.lang.RuntimeException: java.lang.RuntimeException: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml

in 2nd case I lost access to JNDII seem to lose the container wide (jboss) jndi context.
java.lang.RuntimeException: javax.naming.NameNotFoundException: UserTransaction not bound

Thanks

  • 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-22T23:13:02+00:00Added an answer on May 22, 2026 at 11:13 pm

    Actually, I fixed this issue with following code from my hibernate SessionFactoryUtils

     // Create the initial SessionFactory from the default configuration files
            log.debug("Initializing Hibernate");
    
            AxisService axisService = MessageContext.getCurrentMessageContext().getAxisService();
            ClassLoader serviceClassLoader = axisService.getClassLoader();
    
            URL configURL = serviceClassLoader.getResource("hibernate.cfg.xml");
            configuration = new AnnotationConfiguration();
            // Use annotations: configuration = new AnnotationConfiguration();
    
            // Read hibernate.cfg.xml (has to be present)
            configuration.configure(configURL);
    
            // Build and store (either in JNDI or static variable)
            rebuildSessionFactory(configuration);
    

    So, I’m staing with hibernate.cfg.xml in my WebContent/WEB-INF/classes and with all libs in EAR.

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

Sidebar

Related Questions

Hi all We are developing a web service that will be available through SOAP
I want to do a POST request to a web service in grails, but
When we are developing web applications frequently we have a lot of code in
I'm developing a WCF Service with a custom UserNamePasswordValidator with a basicHttpBinding. This configuration,
Sometime ago for my asp.net application I have added a web service. After some
I am working on creating a CAM (custom authentication module/provider) for Cognos 10. Various
We are developing a mobile application(iPhone, Android, WM) which mainly connects with the server
I'm currently developing an application that needs to communicate with a webservice on the
I'm developing a windows form application. Could any one please advise what are the

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.