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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:08:47+00:00 2026-06-07T04:08:47+00:00

I am using netbeans, and want to integrate struts and hibernate for a simple

  • 0

I am using netbeans,
and want to integrate struts and hibernate for a simple application to display all the data of a table on a jsp page.

But i am getting the following error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.reflect.InvocationTargetException

At the logs of glassfish server i get following error

    SEVERE: Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
SEVERE: Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V

HibernateUtil.java:

package controller;

import org.hibernate.cfg.Configuration;
import org.hibernate.SessionFactory;

/**
 * Hibernate Utility class with a convenient method to get Session Factory
 * object.
 *
 * @author ROMO
 */
public class HibernateUtil {

    private static final SessionFactory sessionFactory;

    static {
        try {
            // Create the SessionFactory from standard (hibernate.cfg.xml) 
            // config file.
            sessionFactory = new Configuration().configure().buildSessionFactory();
        } catch (Throwable ex) {
            // Log the exception. 
            System.err.println("Initial SessionFactory creation failed." + ex);
            throw new ExceptionInInitializerError(ex);
        }
    }

    public static SessionFactory getSessionFactory() {
        return sessionFactory;
    }
}

FindQuestion.java:

package controller;

import beans.Question;
import com.opensymphony.xwork2.ActionSupport;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.Session;

/*
 * @author ROMO
 */
public class FindQuestion extends ActionSupport {

    private String q = null;
    private String categoryname = null;
    private List questionList = new ArrayList();

    @Override
    public String execute() throws Exception {
        q = "Question";
        categoryname = "Category";
        try {
            Session session = HibernateUtil.getSessionFactory().getCurrentSession();
            session.beginTransaction();
            this.questionList = (List<Question>) session.createQuery("from Question").list();
            session.getTransaction().commit();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return SUCCESS;
    }

}

Can someone please Help me out.

  • 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-07T04:08:48+00:00Added an answer on June 7, 2026 at 4:08 am

    You have asm version that is incompatible with your Hibernate version. One way to check for compatible versions is to take a look to the maven dependencies, here for example for hibernate-core. It is usable way even if you do not maven builds.

    One working combination for example is:

    • Hibernate 3.6.10,
    • cglib 2.2
    • asm 3.1.

    If you need answer that is more suited for you, you have to share information about which libraries are included at the moment.

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

Sidebar

Related Questions

I want to write a java web application using NetBeans 7.0.1, but i can't
I am populating Employee Data in JTable using Netbeans. I want to add Radiobutton
I'm using Netbeans and I want to grab the latest hibernate artifact from the
I want to debug a form submit using netbeans but cannot find the option
I'm using Netbeans to develop a Java application and I want to create a
I make a java application using netbeans that connect to database , but i
I want to upgrade to Zend Studio (currently using Netbeans), but I am slightly
I have created an application using Netbeans 6.9. In the application I want that
I've created a stand alone java desktop application using Netbeans. I want a way
I want to write a simple client-server application using corba and java. I'm using

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.