HTTP 500 InvocationTargetException

HTTP 500 InvocationTargetException - Java - Programmation

Marsh Posté le 23-11-2012 à 12:06:54    

j'ai un probleme d'ajout dans la base donnée quand j'appui sur ajouter cette erreur s'affiche j'utlise struts 2 et hibernate 3.2

Code :
  1. Etat HTTP 500 -
  2. --------------------------------------------------------------------------------
  3. type Rapport d'exception
  4. message
  5. description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
  6. exception
  7. java.lang.reflect.InvocationTargetException
  8. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  9. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  10. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  11. java.lang.reflect.Method.invoke(Method.java:597)
  12. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
  13. com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
  14. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
  15. com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
  16. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  17. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  18. com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
  19. org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
  20. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  21. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  22. com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
  23. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  24. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
  25. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  26. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  27. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
  28. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  29. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  30. com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
  31. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  32. org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
  33. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  34. org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
  35. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  36. org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
  37. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  38. com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
  39. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  40. com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
  41. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  42. org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
  43. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  44. com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
  45. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  46. com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
  47. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  48. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  49. com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
  50. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  51. org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
  52. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  53. com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
  54. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  55. com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
  56. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  57. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
  58. org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
  59. org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
  60. cause mère
  61. java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I
  62. org.hibernate.hql.ast.HqlSqlWalker.generatePositionalParameter(HqlSqlWalker.java:876)
  63. org.hibernate.hql.antlr.HqlSqlBaseWalker.parameter(HqlSqlBaseWalker.java:4819)
  64. org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1373)
  65. org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4243)
  66. org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3725)
  67. org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1864)
  68. org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:818)
  69. org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:604)
  70. org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:288)
  71. org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:231)
  72. org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:231)
  73. org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:162)
  74. org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:113)
  75. org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
  76. org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
  77. org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
  78. org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
  79. org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
  80. org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1624)
  81. com.loadb2.hibernate.UserDAO.findByProperty(UserDAO.java:88)
  82. com.loadb2.hibernate.UserDAO.findByNomUser(UserDAO.java:102)
  83. com.loadb2.struts.user.AjoutuserAction.execute(AjoutuserAction.java:51)
  84. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  85. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  86. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  87. java.lang.reflect.Method.invoke(Method.java:597)
  88. com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
  89. com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
  90. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
  91. com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
  92. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  93. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  94. com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
  95. org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
  96. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  97. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  98. com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
  99. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  100. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
  101. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  102. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  103. com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
  104. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  105. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  106. com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
  107. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  108. org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
  109. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  110. org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
  111. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  112. org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
  113. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  114. com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
  115. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  116. com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
  117. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  118. org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
  119. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  120. com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
  121. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  122. com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
  123. com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
  124. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  125. com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
  126. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  127. org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
  128. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  129. com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
  130. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  131. com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
  132. com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
  133. org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
  134. org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
  135. org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
  136. 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.
  137. --------------------------------------------------------------------------------
  138. 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 :
  1. public String execute() throws Exception {
  2.  String nom = getNom_user();
  3.  String prenom = getPrenom_user() ;
  4.  UserDAO daos = new UserDAO() ;
  5.  User user = new User();
  6.  System.out.println("**on va ajouter user**" );
  7.  //daos.getSession().beginTransaction();
  8.  List l_user = daos.findByNomUser(nom);
  9.  System.out.println("user size  = "+l_user.size());
  10.  user=(User) l_user.get(0);
  11.  System.out.println("user.getPrenomUser() = "+user.getPrenomUser());
  12.  if(l_user.size()== 0 && prenom == user.getPrenomUser())
  13.  {System.out.println("**erreur d'ajout user**" );
  14.  return ERROR;
  15.  }
  16.  else
  17.  {
  18.  user = new User();
  19.  user.setNomUser(nom);
  20.  user.setIpUser(getIp_user());
  21.  user.setPrenomUser(getPrenom_user());
  22.  user.setLogin(getLogin_user());
  23.  user.setPassword(getPassword());
  24.  daos.save(user);
  25.  Privilege priv = new Privilege();
  26.  PrivilegeDAO privDAO = new PrivilegeDAO();
  27.  priv.setLibellePriv(getPriv());
  28.  priv.setIdUser(user.getIdUser());
  29.  privDAO.save(priv);
  30.  daos.getSession().close();
  31.  privDAO.getSession().close(); 
  32.  System.out.println("**succes ajout user**" );
  33.  return SUCCESS;
  34.  }
  35. }

aidez moi SVP  :(

Reply

Marsh Posté le 23-11-2012 à 12:06:54   

Reply

Marsh Posté le 23-11-2012 à 12:47:55    

Tu google "java.lang.NoSuchMethodError: antlr.collections.AST.getLine()"
 
Conflit sur la librairie antlr, elle est contenue dans hibernate, et dans un autre framework (struts ?)

Reply

Marsh Posté le 23-11-2012 à 12:58:50    

willy le kid a écrit :

Tu google "java.lang.NoSuchMethodError: antlr.collections.AST.getLine()"
 
Conflit sur la librairie antlr, elle est contenue dans hibernate, et dans un autre framework (struts ?)


     
oui j'ai essayé de la supprimé antlr de struts mais rien n'a changé :(

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed