尝试从Confluence 3.0访问Web服务时获取SLF4JLogFactory异常 [英] Getting SLF4JLogFactory exception while trying to access web services from Confluence 3.0

查看:263
本文介绍了尝试从Confluence 3.0访问Web服务时获取SLF4JLogFactory异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经能够理解在朋友的帮助下将Jar文件添加到Confluence项目中的依赖关系和过程。
但是我在添加这些JAR时遇到了错误。
看到错误的确切原因是:

I have been able to understand about the dependencies and procedures to add Jar files into a Confluence project with the help of a friend from here. But I am facing an error with the addition of these JAR's. The exact cause of the error seen is :

javax.servlet.ServletException: Servlet execution threw an exception
 at      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313) 

caused by: java.lang.ExceptionInInitializerError
 at org.apache.axis.attachments.AttachmentsImpl.<clinit>(AttachmentsImpl.java:39) 

caused by: java.lang.ClassCastException:   org.apache.commons.logging.impl.SLF4JLogFactory cannot be cast to org.apache.commons.logging.LogFactory  
 at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)

我要做的是:


  1. 编写自定义插件。

  2. 修改用户界面,以便我可以接受用户输入的值,例如For Eg Credentials。

  3. 使用这些凭据并点击Web服务方法并获取有效用户的票证。 / li>
  1. Write a custom plugin.
  2. Modify the UI so that i can accept user entered values say For Eg Credentials.
  3. Use those credentials and hit a web service method and obtain a ticket for the valid user.

现在我只能使用我无权修改它们的Web服务。因此,它可以与8个必需的罐子一起使用。其中我用不是由我创造的是
受欢迎的那些。

Now i can only consume the web services I do not have the authority to modify them. As a result it does work with 8 essential jars. Of these the ones which I use not created by me are the popular ones.

 commons-discovery 0.2
 commons-logging 1.1
 jaxrpc 1.0
 log4j 1.0
 wsdl4j
 1.0 axis 1.4

如果我使用轴1.2.1而不是1.4;我收到错误。

If i use axis 1.2.1 instead of 1.4 ; i get the error .

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axis.description.ParameterDesc.setOmittable(Z)V

但是使用轴1.4在我当地的NON CONFLUENCE测试中给出了所需的票证示例java项目。
(我将我的代码放在粘贴bin中,以免问题变得非常长)

But using axis 1.4 gives me the required ticket in my local NON CONFLUENCE test sample java project. (I am putting my code in paste bin lest the question becomes extremely long)

这是我的POM.xml

这是我写的课程。事实上,我能够在高级区域中添加自定义选项卡,然后单击选项卡会触发执行方法。

This is the class I have written. I have infact been able to add my custom tab in the 'Advanced' area and clicking on the tab triggers the execute method.

是我在结果上看到的错误系统错误(标题为Oops的错误 - 发生错误。)

This is the error i am seeing on the resulting System Error (the one with the title Oops - an error has occured.)

希望得到您的任何提示,这可以极大地帮助您了解需要做什么摆脱这个错误。
我确信从Confluence调用Web服务必须是一个不复杂的家务活。是JAR的组合,我依赖于那些给我带来麻烦的东西。任何导致同样的东西都会有很大的帮助。

Would like to have any hints from you which can greatly help understand what needs to be done to get out of this error. I am sure calling web services from Confluence must be a not a complex chore. Is it the combination of JAR's i am reliant on thats givving me the trouble .Any leads to the same will be immensly helpful.

推荐答案

Atlassian分叉轴库,Jira现在使用axis-1.3-atlassian-1而不是Apache的最新轴-1.4; axis-1.3-atlassian-1使用1.0.4版本的commons-logging,而不是1.1.1版本的axis-1.4。

Atlassian forked the axis library and Jira now uses axis-1.3-atlassian-1 and not the latest axis-1.4 from Apache; axis-1.3-atlassian-1 uses the 1.0.4 version of commons-logging, not 1.1.1 like axis-1.4.

更改插件与轴的依赖关系-1.4到轴-1.3-atlassian-1为我解决了类似的问题。我怀疑SLF4JLogFactory可以在1.0.4中转换为org.apache.commons.logging.LogFactory而不是1.1.1,但我没有测试过。

Changing the dependency of the plugin from axis-1.4 to axis-1.3-atlassian-1 solved a similar problem for me. It is my suspicion that SLF4JLogFactory could cast to org.apache.commons.logging.LogFactory in 1.0.4 but not 1.1.1, but I haven't tested that.

编辑:这里是你可以在哪里获得jar和来源

这篇关于尝试从Confluence 3.0访问Web服务时获取SLF4JLogFactory异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆