Stormpath runtime error: com.stormpath.sdk.servlet.filter.StormpathFilter was found, but is missing another required class

Stormpath runtime error: com.stormpath.sdk.servlet.filter.StormpathFilter was found, but is missing another required class

我正在尝试 运行 一个 java Web 应用程序,包括用于用户注册的 Stormpath。

我已将以下库添加到 WebContent/WEB-INF/lib

-javax.servlet-api-3.1.0.jar
-stormpath-sdk-api-1.0.RC3.1.jar
-stormpath-sdk-servlet-1.0.RC3.1.jar
-stormpath-servlet-plugin-1.0.RC3.1.jar

但是,在运行时间(部署后)我收到以下错误:

Error 500: javax.servlet.ServletException: Filter [StormpathFilter]: com.stormpath.sdk.servlet.filter.StormpathFilter was found, but is missing another required class.

有人可以帮忙吗?
我是网络开发的新手。

谢谢。

您应该使用 Maven 来管理您的依赖项,因为您添加的 jar 依赖于许多其他的。

如果您仍想手动执行:

1.Check 从 GitHub:

中取出项目
$ git clone https://github.com/stormpath/stormpath-sdk-java.git

2。构建项目:

$ mvn clean install

3。下载所有运行时依赖项:

$ mvn dependency:copy-dependencies -DincludeScope=runtime

4。输入您将使用的模块的 target/dependency 目录。 例如,对于 Stormpath Java SDK,默认选项是基于 Apache HTTP 客户端的运行时:

$ cd extensions/httpclient/target/dependency

在这里您可以找到模块所需的所有运行时依赖项的列表。

请注意,Stormpath 和 Shiro 使用 SLF4J 日志记录 API 而不是 commons-logging。但是,Commons-logging 在运行时依赖列表中,因为 HTTPClient 需要它。由于这种冲突,您可能希望排除 commons-logging.jar 并包含 jcl-over-slf4j.jar (从 maven central 下载),它与 SLF4J 日志兼容并满足 HTTPClient 的需求。