获取com.sun.xml.wss.XWSSecurityException的NoClassDefFoundError

时间:2016-09-13 06:31:32

标签: java spring web-services maven-3 spring-ws

我将Spring从1.5.8升级到版本4.2.3.RELEASE和Spring WS 1.5.8升级到2.2.0.RELEASE。项目编译很好但是当我启动tomcat时我得到以下错误。我使用的是CXF 2.6.0。我正在使用xwssecurityinterceptor。

<div onClick="test();" class="product-inner">
  <h5 class="product-title height-40-px">


    title

    </p>
  </h5>
<hr class="mt8 mb8">
<div class="product-meta">
  <ul class="product-price-list">

    <li><span class="product-save dir-to-right"><strong>7500</strong></span>
    </li>
    <li><span class="product-old-price dir-to-right">120,000</span>
    </li>
    <li><span class="product-price">%95</span>
    </li>
  </ul>
  <hr class="mt0 mb0 mr6 hr-blue">
  <div class="col-md-12 mt10">

    <span class="col-md-6">
      ۹&nbsp;<i class="fa fa-users"></i>
    </span>

    <span class="col-md-6">

      <p class="font-size-12 display-inline">


        zone
        &nbsp;<i class="fa fa-map-marker"></i>


      </p>

    </span>

  </div>

  <ul class="product-actions-list mt35">

    <li><a data-original-title="add cart" class="btn btn-cart btn-sm popup-text" href="#product-quick-view-add-to-cart" onclick="quickView(18730, event); " data-effect="mfp-move-from-top" data-toggle="tooltip" data-placement="top" title="">cart&nbsp;<i class="fa fa-shopping-cart"></i></a>
    </li><li><a href="" class="btn btn-buy btn-sm">details&nbsp;<i class="fa fa-eye"></i></a>
    </li>
  </ul>
</div>
</div>

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

<dependency>
        <groupId>com.sun.xml.wss</groupId>
        <artifactId>xws-security</artifactId>
        <version>3.0</version>
        <exclusions>
            <exclusion>
                <groupId>javax.xml.crypto</groupId>
                <artifactId>xmldsig</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

缺少依赖关系,请将此文件添加到您的pom文件中。