Série da semana: Primeiros passos no React

Veja mais

WebService em Java + Axis2 + Tomcat 7

24/02/2016

1

Prezados, sou novo no desenvolvimento e estou dese[img:descricao=Localhost]http://arquivo.devmedia.com.br/forum/imagem/476913-20160224-173856.png[/img]nvolvendo um webservice para consumir no android. Desenvolvi a webservice e consegui abrir o localhost.

Entretanto quando eu clico em "Services" estou recebendo o erro abaixo:

type Exception report
message Servlet.init() for servlet AxisServlet threw exception
description The server encountered an internal error that prevented it from fulfilling this request.


exception

javax.servlet.ServletException: Servlet.init() for servlet AxisServlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver
org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:128)
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:144)
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:66)
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:61)
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:152)
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:233)
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)


root cause

java.lang.ClassNotFoundException: org.apache.ws.commons.schema.resolver.URIResolver
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:128)
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:144)
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:264)
org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:66)
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:61)
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEngine.java:152)
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguration(WarBasedAxisConfigurator.java:233)
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)


Se alguém puder me ajudar!
Muito obrigado.
Responder

Posts

31/03/2016

Tiago Fonseca

Não achei a data deste tópico, mas vamos lá:

Eu estava com o mesmo problema, e como já passei por problemas semelhantes anteriormente, acreditei que ele se resolveria da mesma forma...
Eu baixei esse jar:

xmlschema-core-2.1.0-bin


no link: http://ftp.unicamp.br/pub/apache/ws/xmlschema/2.1.0/


Alguns tópicos de fóruns gringos falaram para baixa-lo, falaram sobre dependências.

Depois você adiciona no build path.

Quando eu baixei, eu extrai o jar na pasta lib do meu projeto (pasta lib que eu criei), e dentro do eclipse, cliquei com o botão direito e add no build path, mas o problema continuou a persistir, então eu fui em:

run>run configuration>classpath>

em "User Entries", add External Jars...

E funcionou ;)
Responder
Valeu! Funcionou aqui!
Responder

05/04/2016

Alex Oliveira

Cara , eu ainda estou começando a brincar com o Maven, mas acho que ele resolveria seu problema.
Responder

05/04/2016

Tiago Fonseca

Aqui, só abriu essa tela:
[img]http://arquivo.devmedia.com.br/forum/imagem/476913-20160224-173856.png[/img]



Mas depois disso, ainda teve erro, no XML gerado u.u
Responder