gpt4 book ai didi

java - 为什么我无法通过 axis2 localhost 查看此数据库中的服务?

转载 作者:行者123 更新时间:2023-11-28 22:27:36 26 4
gpt4 key购买 nike

我一直在学习网络服务和其他东西,终于能够构建我的第一个 gimmick 代码,但是每当我尝试在 eclipse 上创建我的 DAO 类的网络服务时,我最终无法访问它的 session (服务、验证、管理)在本地主机上。

附加信息:我将 axis2 与 tomcat 6.0.41 一起使用(出于教程目的)并尝试通过 http://localhost:8080/ExemploWS/ 访问最近创建的 MySQL 数据库“ExemploWS” ,在我尝试浏览它之前一切正常。

还开始使用带有 Apache 和 MySQL 的 XAMPP 控制面板。所以我要离开连接类,然后在访问 http://localhost:8080/ExemploWS/services/listServices 时出现错误.

package br.com.ExemploWS;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConectaMySQL {
private static final String url = "jdcb:mysql://localhost/exemplows";
private static final String user = "root";
private static final String pass = "";

public static Connection obtemConexao() throws SQLException {
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
return DriverManager.getConnection(url,user,pass);
}
}

HTTP Status 500 - Servlet.init() for servlet AxisServlet threw exception

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.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) 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.(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.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Unknown Source) root cause

java.lang.ClassNotFoundException: org.apache.ws.commons.schema.resolver.URIResolver org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) 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.(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.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Unknown Source) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.41 logs.

Apache Tomcat/6.0.41'

最佳答案

将这个类添加到您的应用程序中,它丢失了:

java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver 

它在 commons-xmlschema 中,在这里找到它:http://mvnrepository.com/artifact/org.apache.ws.commons.schema/XmlSchema

关于java - 为什么我无法通过 axis2 localhost 查看此数据库中的服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35996878/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com