配置错误Jetty

时间:2013-06-29 12:24:28

标签: java jetty shibboleth

我正在尝试在我的服务器上为 Shibboleth身份提供程序安装并运行 Jetty 7 ,但是我收到此错误:

[iam@web333 jetty]$ java -jar start.jar jetty.port=27335
2013-06-29 12:01:47.490:WARN:oejx.XmlConfiguration:Config error at <Call name="addConnector">|    <Arg>|      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">|         <Arg>|           <New class="net.shibboleth.utilities.jetty7.DelegateToApplicationSslContextFactory">|             <Set name="keyStore">/home/iam/opt/shibboleth-idp/credentials/idp.jks</Set>|             <Set name="keyStorePassword">*****</Set>|           </New>|          </Arg>|        <Set name="port">27335</Set>|        <Set name="maxIdleTime">30000</Set>|      </New>|    </Arg>|  </Call> java.lang.ClassNotFoundException: net.shibboleth.utilities.jetty7.DelegateToApplicationSslContextFactory
Exception in thread "main" java.lang.ClassNotFoundException: net.shibboleth.utilities.jetty7.DelegateToApplicationSslContextFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:354)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:754)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1126)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1029)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:777)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValue(XmlConfiguration.java:1126)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(XmlConfiguration.java:1029)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:722)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:388)
        at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:343)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:296)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1247)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1182)

我遵循了本指南:https://wiki.shibboleth.net/confluence/display/SHIB2/IdPJetty7Prepare我将端口8080和8443修改为 jetty.xml jetty-ssl.xml 中的端口27335配置文件。

并且在 shib-delegatessl.xml 中我已将端口8443修改为27335。

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
         <Arg>
           <New class="net.shibboleth.utilities.jetty7.DelegateToApplicationSslContextFactory">
             <Set name="keyStore">/home/iam/opt/shibboleth-idp/credentials/idp.jks</Set>
             <Set name="keyStorePassword">********</Set>
           </New>
          </Arg>
        <Set name="port">27335</Set>
        <Set name="maxIdleTime">30000</Set>
      </New>
    </Arg>
  </Call>
</Configure>

如何修复此错误?如果它有效,我如何测试Jetty? 非常感谢你。

祝你好运!

2 个答案:

答案 0 :(得分:1)

包含net.shibboleth.utilities.jetty7.DelegateToApplicationSslContextFactory类的jar需要位于服务器类路径中。

这样做:

  1. 将shibboleth jar放入${jetty.home}/lib/ext目录。
  2. 通过执行以下命令测试它们是否存在于服务器类路径中。

    $ java -jar start.jar --version

  3. 像以前一样启动Jetty。

答案 1 :(得分:1)

可能这可能会有所帮助: https://wiki.shibboleth.net/confluence/display/SHIB2/IdPJetty7Prepare

要复制哪些库以及在那里指定的位置。