Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Etat HTTP 500 InvocationTargetException
PostPosted: Fri Nov 23, 2012 6:46 am 
Newbie

Joined: Fri Nov 23, 2012 6:37 am
Posts: 2
j'ai un problème d'ajout dans la base donnée quand j'appui sur ajouter cette erreur s'affiche j’utilise struts 2 et hibernate 3.2
Code:
Etat HTTP 500 -

--------------------------------------------------------------------------------

type Rapport d'exception

message

description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.

exception

java.lang.reflect.InvocationTargetException
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
   com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
   com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
   org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
   org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
   org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
   org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)


cause mère

java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
   org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:876)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288)
   org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)
   org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:231)
   org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:162)
   org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:113)
   org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
   org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
   org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
   org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
   org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
   org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1624)
   com.loadb2.hibernate.UserDAO.findByProperty(UserDAO.java:88)
   com.loadb2.hibernate.UserDAO.findByNomUser(UserDAO.java:102)
   com.loadb2.struts.user.AjoutuserAction.execute(AjoutuserAction.java:51)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
   com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
   com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
   org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
   com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
   com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
   org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
   org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
   org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
   org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)


note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/6.0.13.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.13

j'ai fait un test dans lajoutaction pour savoir le debut de l'erreur l'afficheur de myeclipse affiche que "**on va ajouter user**"
voici mon ajout action
Code:

public String execute() throws Exception {
      String nom = getNom_user();
      String prenom = getPrenom_user() ;
      UserDAO daos = new UserDAO() ;
      User user = new User();
      System.out.println("**on va ajouter user**");
      //daos.getSession().beginTransaction();
      List l_user = daos.findByNomUser(nom);
      System.out.println("user size  = "+l_user.size());
      user=(User) l_user.get(0);
      System.out.println("user.getPrenomUser() = "+user.getPrenomUser());
      if(l_user.size()== 0 && prenom == user.getPrenomUser())
      {System.out.println("**erreur d'ajout user**");
      return ERROR;
      }
      else
      {
      user = new User();
      user.setNomUser(nom);
      user.setIpUser(getIp_user());
      user.setPrenomUser(getPrenom_user());
      user.setLogin(getLogin_user());
      user.setPassword(getPassword());
      daos.save(user);
      Privilege priv = new Privilege();
      PrivilegeDAO privDAO = new PrivilegeDAO();
      priv.setLibellePriv(getPriv());
      priv.setIdUser(user.getIdUser());
      privDAO.save(priv);
      daos.getSession().close();
      privDAO.getSession().close(); 
      System.out.println("**succes ajout user**");
      return SUCCESS;
      }
   }


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

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.