Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory 少jar包?

解决方案 »

  1.   

    我在网上搜了两个相关jar包,然后倒入,还是报同样错误
      

  2.   

    那你看下 你导入后 部署到服务起里面的文件夹里有没有那个jar
      

  3.   

    你说你加了相应的jar包,
    那你在你的jar包中打开看看
    org.slf4j.LoggerFactory
    在这个路径下是否有这个类,如果有你把项目重新发布如果问题还在再找别的问题。
      

  4.   

    部署的服务器的文件夹里面有jar包
      

  5.   

    另外我部署然后启动服务器的时候,总是提示
    JBAS014775:    New missing/unsatisfied dependencies:
          service jboss.jdbc-driver.sqljdbc4_jar (missing) dependents: [service jboss.data-source.java:/datasources/Lmsptest2013DS] 
    10:15:25,937 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "SSH_Library.war"
    10:15:28,921 WARN  [org.jboss.as.ee] (MSC service thread 1-3) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.web.context.request.async.StandardServletAsyncWebRequest
    这是什么错误?
      

  6.   

    已经弄好了,原来我倒错包,到的是source结尾的包
      

  7.   

     JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.web.context.request.async.StandardServletAsyncWebRequest我也遇到了这个问题啊。。找了一天没找到好方法。。求教
      

  8.   

    在使用Jboss开发spring项目时,在启动是出现警告信息: 
    WARN  [org.jboss.as.ee] (MSC service thread 1-2) JBAS011006: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.springframework.web.context.request.async.StandardServletAsyncWebRequest
    网上搜索了解决方案是去除debug信息,但是这样不是根本解决办法,我们根据错误信息,来修改。
    下面的解决办法是修改源码,添加默认构造器
     根据错误信息,找到spring-web 下面的StandardServletAsyncWebRequest类,当然是.java 文件
     修改后,会自动生成.class文件,这样用压缩软件打开jar包,把这个class文件拷贝过去。再重新
    启动就不会报 WARN :
        /**
        * 新增的默认构造器
        */
    public StandardServletAsyncWebRequest() {}
    public StandardServletAsyncWebRequest(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse) {}