-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Exception d'initialisation
PostPosted: Tue Jul 21, 2009 12:08 pm 
Newbie

Joined: Fri Jun 19, 2009 8:10 am
Posts: 2
Bonjour tous,
J'ai crée une application web avec Hibernate et visual jsf.Au debut tout marche bien mais apres un certain temps un exception est generé dont je sais pas la cause.D'abord dans la structure de mon application j'ai ma base de données sur MYSQL et j'ai fait la génération automatique des fichiers de mapping (pojo).Et après j'utilise les composants offerts par jsf.
voila l'exception sachant que ça marche bien déjà :
Code:
Exception Handler


Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.

Exception Details: java.lang.NoClassDefFoundError
  Could not initialize class gestionfinale.HibernateUtil

Possible Source of Error:
   Class Name: gestionfinale.Login
   File Name: Login.java
   Method Name: conn_action
   Line Number: 177

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

gestionfinale.Login.conn_action(Login.java:177)
sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.el.parser.AstValue.invoke(AstValue.java:172)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
javax.faces.component.UICommand.broadcast(UICommand.java:383)
com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)

Le probleme qu'il ne trouve pas la classe HibernateUtil.java que j'ai déjà utilisé et il fonctionne bien et voila la classe :
Code:
package gestionfinale;

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

import org.hibernate.cfg.*;
import org.hibernate.SessionFactory;

/**
* Hibernate Utility class with a convenient method to get Session Factory object.
*
* @author AIT BENMOUH
*/
public class HibernateUtil {
    private static final SessionFactory sessionFactory;

    static {
        try {
            // Create the SessionFactory from standard (hibernate.cfg.xml)
            // config file.
            sessionFactory = new AnnotationConfiguration().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;
    }
}

Si vous avez une idée merci de m'aider.


Top
 Profile  
 
 Post subject: Re: Exception d'initialisation
PostPosted: Wed Nov 18, 2009 11:25 am 
Newbie

Joined: Wed Nov 18, 2009 11:21 am
Posts: 4
Bonjour,

j'ai exactement le meme probléme que toi . je me trouve bloqué depuis 2 jours à cause de ca.

si jamais t'a trouvé la solution peut tu m'aider stp ??


Top
 Profile  
 
 Post subject: Re: Exception d'initialisation
PostPosted: Thu Nov 19, 2009 10:28 am 
Newbie

Joined: Wed Nov 18, 2009 11:21 am
Posts: 4
il n'y a pas quelqu'un qui peut m'aider !(((((((((( j'ai lu tout les doc sur le net aucun n'a résolu mon problème .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.