我想编写一个弹簧启动应用程序,可以在wso2am中管理用户。因此,我尝试从wso2身份服务器文档运行该示例。 (https://docs.wso2.com/display/IS500/Managing+Users+and+Roles+with+APIs)
我已下载该示例,在IntelliJ中打开它,并在projektstructure中添加hole plugins-folder作为依赖项。但是当我编译示例时,我得到一个ClassNotFoundException。
org.apache.axis2.deployment.DeploymentException: org.apache.axis2.transport.tcp.TCPTransportSender
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:712)
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:124)
at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:887)
at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at org.wso2.identity.um.sample.IdentityServerClient.main(IdentityServerClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: org.apache.axis2.transport.tcp.TCPTransportSender
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:686)
... 11 more
我错了什么,即使这个例子没有运行?
答案 0 :(得分:0)
这是版本兼容性问题。 IS 5.0.0有axis2_1.6.1.wso2v10.jar
。但是APIM 2.0.0(我假设你正在使用的是axis2_1.6.1.wso2v19.jar
。出于某种原因,新版本没有org.apache.axis2.transport.tcp.TCPTransportSender
类。 See this
因此,如果您使用axis2_1.6.1.wso2v10.jar
,它应该有效。