2

我正在尝试在我的服务器上为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,我在jetty.xmljetty-ssl.xml配置文件中将端口 8080 和 8443 修改为我的端口 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?非常感谢你。

最好的祝福!

4

2 回答 2

2

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

做这个:

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

    $ java -jar start.jar --list-config

  3. 像以前一样启动 Jetty。

于 2013-06-29T19:04:19.073 回答
1

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

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

于 2014-10-17T10:47:26.713 回答