title: Eclipse, consuming a web service gives java.lang.reflect.InvocationTargetException
body: <p>Would like some help. I already spent a lot of hours trying to solve this problem, searching in the web, some sites - and some questions here - but still no answer for this. Any help will be greatly appreciated.</p>
  
  <p>I'm not by that means a specialist in this, so some information may be vague I'll try to be to use the best terms to describe the problem.</p>
  
  <p>When I try to consume a webservice I myself created using Eclipse, in Java language, using Apache Tomcat 6, it gives me an error:</p>
  
  <blockquote>
    <p>The content of the body cannot be displayed in the form view. Please switch to the source view to examine the raw content.</p>
  </blockquote>
  
  <p>I tested the webservice (the 11 methods) as an Java application and JUnit Test and it was fine. The methods delete, add, modify, and search for some information in a database on MYSQL. As I said, the methods run properly as an Java application. </p>
  
  <p>I tried to generate a client on a different project. If I try to consume the web service from the client, it gives me this error:</p>
  
  <pre><code>AxisFault
   faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
   faultSubcode: 
   faultString: java.lang.reflect.InvocationTargetException
   faultActor: 
   faultNode: 
   faultDetail: 
      {http://xml.apache.org/axis/}hostname:Mauricio-PC
  
  java.lang.reflect.InvocationTargetException
      at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)  at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
  at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
  at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
  at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
  at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
  at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
  at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
  at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
  at org.apache.axis.client.Call.invoke(Call.java:2767)
  at org.apache.axis.client.Call.invoke(Call.java:2443)
  at org.apache.axis.client.Call.invoke(Call.java:2366)
  at org.apache.axis.client.Call.invoke(Call.java:1812)
  at client.ServicioSoapBindingStub.ingresarAlumnoCurso(ServicioSoapBindingStub.java:488)
  at client.ServicioProxy.ingresarAlumnoCurso(ServicioProxy.java:80)
  at client.Prueba.main(Prueba.java:19) 
  </code></pre>
  
  <p>I remember someone saying it was cause my hostname is called "Mauricio-PC" and Tomcat couldn't recognize it. But I don't really know if that's true.</p>
  
  <p>So, any help is greatly appreciated. Feel free to ask any questions.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: I had created another project with another name, ServicioCapacitacion instead of SistemaCapacitacion. Same files. I reimported the .jars.</p>
  
  <p>So I have this libraries:</p>
  
  <pre><code>Library Apache Tomcat v6.0:
    annotations-api.jar
    catalina-ant.jar
    catalina-ha.jar
    catalina-tribes.jar
    catalina.jar
    ecj-3.7.2.jar
    el-api.jar
    gson-2.2.3.jar
    jasper-el.jar
    jasper.jar
    jsp-api.jar
    mysql-connector-java-5.1.25-bin.jar
    orm.jar
    servlet-api.jar
    tomcat-coyote.jar
    tomcat-dbcp.jar
    tomcat-i18n-es.jar
    tomcat-i18n-fr.jar
    tomcat-i18n-ja.jar
  
  JRE System Library:
    resources.jar
    rt.jar
    jsse.jar
    jce.jar
    charsets.jar
    jfr.jar
    access-bridge-64.jar
    dnsns.jar
    jaccess.jar
    localedata.jar
    sunec.jar
    sunjce_provider.jar
    sunmscapi.jar
    zipfs.jar
  
  JUnit 4:
  
    junit.jar
    org.hamcrest.core_1.1.0.v20090501071000.jar
  
  Web App Libraries:
    axis.jar
    commons-discovery-0.2.jar
    commons-logging.jar
    jaxrpc.jar
    saaj.jar
    wsdl4j.jar
  
  
  
  gwt-dev.jar    &lt;- These are alone, not inside any Library
  gwt-servlet.jar
  mail.jar
  </code></pre>
  
  <p>AND inside the directory WebContent>WEB-INF>lib there are these libraries:</p>
  
  <pre><code>axis.jar
  commons-discovery-0.2.jar
  commons-logging.jar
  jaxrpc.jar
  saaj.jar
  wsdl4j.jar
  </code></pre>
  
  <p>I know already these libraries are repeated, my question is, do I have to delete one of these groups? what group do I eliminate/move and what group I keep? is there a "good" method to remove them?</p>
  
  <p>NEW Display of the localhost:8080/ServicioCapacitacion/index.jsp</p>
  
  <pre><code>Estado HTTP 500 - javax.servlet.ServletException: java.lang.ExceptionInInitializerError
  
  type Informe de Excepción
  
  mensaje javax.servlet.ServletException: java.lang.ExceptionInInitializerError
  
  descripción El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento.
  
  excepción
  
  org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  causa raíz
  
  javax.servlet.ServletException: java.lang.ExceptionInInitializerError
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  causa raíz
  
  java.lang.ExceptionInInitializerError
      negocio.Capacitacion.verActa(Capacitacion.java:329)
      servicio.Servicio.verActa(Servicio.java:70)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  causa raíz
  
  org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
      org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
      org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
      org.orm.PersistentManager.&lt;clinit&gt;(PersistentManager.java:34)
      negocio.Capacitacion.verActa(Capacitacion.java:329)
      servicio.Servicio.verActa(Servicio.java:70)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  causa raíz
  
  org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
      org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
      org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
      org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
      org.orm.PersistentManager.&lt;clinit&gt;(PersistentManager.java:34)
      negocio.Capacitacion.verActa(Capacitacion.java:329)
      servicio.Servicio.verActa(Servicio.java:70)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  causa raíz
  
  org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy.  You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
      org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385)
      org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
      org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
      org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
      org.orm.PersistentManager.&lt;clinit&gt;(PersistentManager.java:34)
      negocio.Capacitacion.verActa(Capacitacion.java:329)
      servicio.Servicio.verActa(Servicio.java:70)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  nota La traza completa de la causa de este error se encuentra en los archivos de diario de Apache Tomcat/6.0.36.
  
  Apache Tomcat/6.0.36
  </code></pre>