Setup development environment using java-idp-testbed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Setup development environment using java-idp-testbed

森谷鴻平
Greetings,

I would like to setup Shibboleth 3.3.2 development environment using java-idp-testbed,
but jetty throws "Missing referenced dependency: server" error.

Based on the following help, I tried process below:


1. Clone java-identity-provider, java-idp-testbed, and java-idp-jetty-base from git

2. Build java-identity-provider
$ cd java-identity-provider/idp-parent
$ mvn -DskipTests -Dmaven.javadoc.disable=1 clean install

3. Import idp-parent (and children), java-idp-testbed, and java-idp-jetty-base to Eclipse Oxygen

4. Make empty directory "${workspace_loc:java-idp-testbed}\src\main\resources\logs"

5. Change launch file "${workspace_loc:java-idp-testbed}\idp-testbed.launch"
- <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:idp-jetty-base/src/main/resources/jetty-base}"/>
+ <stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:java-idp-jetty-base/src/main/resources/jetty-base}"/>

6. Run Main.java in java-idp-testbed as Java Application


Here is the error messages from Eclipse console:

> WARNING: Cannot enable requested module [ext]: not a valid module name.
> WARNING: Cannot enable requested module [server]: not a valid module name.
> WARNING: Cannot enable requested module [requestlog]: not a valid module name.
> WARNING: Cannot enable requested module [jsp]: not a valid module name.
> WARNING: Cannot enable requested module [annotations]: not a valid module name.
> WARNING: Cannot enable requested module [resources]: not a valid module name.
> WARNING: Cannot enable requested module [ssl]: not a valid module name.
> WARNING: Cannot enable requested module [plus]: not a valid module name.
> WARNING: Cannot enable requested module [deploy]: not a valid module name.
> WARNING: Cannot enable requested module [jstl]: not a valid module name.
> WARNING: Cannot enable requested module [servlets]: not a valid module name.
> WARNING: Cannot enable requested module [logging]: not a valid module name.
> WARNING: Cannot enable requested module [http]: not a valid module name.
> WARNING: Cannot enable requested module [https]: not a valid module name.
> org.eclipse.jetty.start.graph.GraphException: Missing referenced dependency: server
> org.eclipse.jetty.start.graph.GraphException: Missing referenced dependency: server
> at org.eclipse.jetty.start.graph.Graph.selectNodes(Graph.java:470)
> at org.eclipse.jetty.start.graph.Graph.selectNode(Graph.java:447)
> at org.eclipse.jetty.start.graph.Graph.selectNode(Graph.java:415)
> at org.eclipse.jetty.start.Main.processCommandLine(Main.java:302)
> at org.eclipse.jetty.start.Main.main(Main.java:74)
> at Main.main(Main.java:25)
> Usage: java -jar start.jar [options] [properties] [configs]
>        java -jar start.jar --help  # for more information

Do you have any help to solve the problem?

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------

--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

Tom Zeller-3
> jetty throws "Missing referenced dependency: server" error.
>
> Do you have any help to solve the problem?

Seems like the jetty.home system property needs to be set, see :

 https://wiki.shibboleth.net/confluence/display/IDP30/Testing

T0m
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

森谷鴻平
>  Seems like the jetty.home system property needs to be set, see :

jetty.home is already set to /opt/jetty/jetty-9.3, but it seems wrong.
Where is jetty.home in this workspace? Or should I install it manually?

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------


2018-04-12 11:44 GMT+09:00 Tom Zeller <[hidden email]>:
> jetty throws "Missing referenced dependency: server" error.
>
> Do you have any help to solve the problem?

Seems like the jetty.home system property needs to be set, see :

 https://wiki.shibboleth.net/confluence/display/IDP30/Testing

T0m
--
To unsubscribe from this list send an email to [hidden email]



--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

森谷鴻平
Greetings,

I tried additional the process based on the following help, but It is still not working:


1. Get jetty-distribution-9.3.23.v20180228.zip and extract to C:\jetty-9.3

2. Set jetty.home to java-idp-testbed/idp-testbed.launch
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.home=/opt/jetty/jetty-9.3 -Didp.home=classpath: -Didp.webflows=classpath*:/flows -Didp.logfiles=${workspace_loc:java-idp-testbed/src/main/resources/logs} -Djava.io.tmpdir=tmp"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.home=C:/jetty-9.3 -Didp.home=classpath: -Didp.webflows=classpath*:/flows -Didp.logfiles=${workspace_loc:java-idp-testbed/src/main/resources/logs} -Djava.io.tmpdir=tmp"/>

3. Add testbed.xml to java-idp-jetty-base/src/main/resources/jetty-base/webapps/

4. Adjust paths in java- idp-jetty-base/src/main/resources/jetty-base/start.d/idp.ini

5. Run Main.java in java-idp-testbed as Java Application again.

Here is the messages from Eclipse console:

> WARNING: Nothing to start, exiting ...
> Usage: java -jar start.jar [options] [properties] [configs]
>        java -jar start.jar --help  # for more information

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------


2018-04-12 13:16 GMT+09:00 森谷鴻平 <[hidden email]>:
>  Seems like the jetty.home system property needs to be set, see :

jetty.home is already set to /opt/jetty/jetty-9.3, but it seems wrong.
Where is jetty.home in this workspace? Or should I install it manually?

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------


2018-04-12 11:44 GMT+09:00 Tom Zeller <[hidden email]>:
> jetty throws "Missing referenced dependency: server" error.
>
> Do you have any help to solve the problem?

Seems like the jetty.home system property needs to be set, see :

 https://wiki.shibboleth.net/confluence/display/IDP30/Testing

T0m
--
To unsubscribe from this list send an email to [hidden email]




--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

Tom Zeller-3

> C:\jetty-9.3

I have heard other people have trouble with the testbed on Windows, the documentation probably should be updated to include that.

Tom
--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Setup development environment using java-idp-testbed

Cantor, Scott E.
In reply to this post by 森谷鴻平
> Here is the messages from Eclipse console:
>
> > WARNING: Nothing to start, exiting ...
> > Usage: java -jar start.jar [options] [properties] [configs]
> >        java -jar start.jar --help  # for more information

FWIW I have a new laptop and when I finally got around to working on setting up the testbed there I got the same message. I haven't bottomed it out yet. I did have it working on another Windows laptop so I need to compare my setup.

-- Scott


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Setup development environment using java-idp-testbed

Cantor, Scott E.
> > Here is the messages from Eclipse console:
> >
> > > WARNING: Nothing to start, exiting ...
> > > Usage: java -jar start.jar [options] [properties] [configs]
> > >        java -jar start.jar --help  # for more information
>
> FWIW I have a new laptop and when I finally got around to working on
> setting up the testbed there I got the same message. I haven't bottomed it
> out yet. I did have it working on another Windows laptop so I need to
> compare my setup.

Jetty version. I didn't even think to compare what the POM for the testbed mentions, and I had grabbed the latest Jetty 9.3 to stick in /opt. They presumably would have to match.

-- Scott

--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

森谷鴻平
Jetty version. I didn't even think to compare what the POM for the testbed mentions, and I had grabbed the latest Jetty 9.3 to stick in /opt. They presumably would have to match.

When I tried using 9.3.23.v20180228 instead of 9.3.16.v20170120, Jetty just worked.
But Shibboleth IdP returns "No services are available at this location." error in web browser.

1. Change java-idp-testbed/pom.xml to use jetty-9.3.23.v20180228
-        <jetty.version>9.3.16.v20170120</jetty.version>
+        <jetty.version>9.3.23.v20180228</jetty.version>

2. Get dependent packages to local maven directory.
$ cd java-idp-testbed
$ mvn dependency:go-offline

3.  Run Main.java in java-idp-testbed as Java Application again.

Here is the logs from java-idp-jetty-base\src\main\resources\jetty-base\logs\2018_04_13.stderrout.log:
> WARN [org.eclipse.jetty.xml.XmlConfiguration:983] - Property 'jetty.host' is deprecated, value from 'jetty.nonhttps.host' used
> 11:18:08,895 |-INFO in null - Will use configuration file [C:\Users\<username>\Documents\pleiades-4.7.2-java-win-64bit-jre_20171225\shib\java-idp-jetty-base\src\main\resources\jetty-base/resources/logback-access.xml]
> 11:18:08,910 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute not set
> 11:18:08,913 |-INFO in ch.qos.logback.core.joran.action.StatusListenerAction - Added status listener of type [ch.qos.logback.core.status.OnConsoleStatusListener]
> 11:18:08,922 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
> 11:18:08,926 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
> 11:18:08,946 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@225290371 - Will use gz compression
> 11:18:08,948 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@225290371 - Will use the pattern C:/Users/<username>/Documents/pleiades-4.7.2-java-win-64bit-jre_20171225/shib/java-idp-jetty-base/src/main/resources/jetty-base/logs/access-%d{yyyy-MM-dd}.log for the active file
> 11:18:08,955 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'C:/Users/<username>/Documents/pleiades-4.7.2-java-win-64bit-jre_20171225/shib/java-idp-jetty-base/src/main/resources/jetty-base/logs/access-%d{yyyy-MM-dd}.log.gz'.
> 11:18:08,956 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
> 11:18:08,957 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Fri Apr 13 09:48:18 JST 2018
> 11:18:08,957 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder] property
> 11:18:08,989 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: C:\Users\<username>\Documents\pleiades-4.7.2-java-win-64bit-jre_20171225\shib\java-idp-jetty-base\src\main\resources\jetty-base/logs/access.log
> 11:18:08,989 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [C:\Users\<username>\Documents\pleiades-4.7.2-java-win-64bit-jre_20171225\shib\java-idp-jetty-base\src\main\resources\jetty-base/logs/access.log]
> 11:18:08,989 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to null
> 11:18:09,004 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - End of configuration.
> 11:18:09,004 |-INFO in ch.qos.logback.access.joran.JoranConfigurator@ba8d91c - Registering current configuration as safe fallback point
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.AsyncContext scanned from multiple locations: [jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/AsyncContext.class, jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/AsyncContext.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.AsyncEvent scanned from multiple locations: [jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/AsyncEvent.class, jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/AsyncEvent.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.Filter scanned from multiple locations: [jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/Filter.class, jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/Filter.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.ServletOutputStream scanned from multiple locations: [jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/ServletOutputStream.class, jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/ServletOutputStream.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.annotation.HttpMethodConstraint scanned from multiple locations: [jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/annotation/HttpMethodConstraint.class, jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/annotation/HttpMethodConstraint.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.http.HttpUtils scanned from multiple locations: [jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/http/HttpUtils.class, jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/http/HttpUtils.class]
> WARN [org.eclipse.jetty.annotations.AnnotationParser:572] - javax.servlet.http.NoBodyResponse scanned from multiple locations: [jar:file:///C:/Users/<username>/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar!/javax/servlet/http/NoBodyResponse.class, jar:file:///C:/jetty-9.3/lib/servlet-api-3.1.jar!/javax/servlet/http/NoBodyResponse.class]
> WARN [org.eclipse.jetty.security.SecurityHandler:806] - [hidden email]@96def03{/idp,[file:///C:/Users/<username>/Documents/pleiades-4.7.2-java-win-64bit-jre_20171225/shib/java-idp-jetty-base/src/main/resources/jetty-base/tmp/jetty-0.0.0.0-9443-webapp-_idp-any-3463708866813710343.dir/webinf/, file:///C:/Users/<username>/Documents/pleiades-4.7.2-java-win-64bit-jre_20171225/shib/java-identity-provider/idp-war/src/main/webapp/],STARTING}{../../../../../java-identity-provider/idp-war/src/main/webapp} has uncovered http methods for path: /*
Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------



2018-04-13 5:11 GMT+09:00 Cantor, Scott <[hidden email]>:
> > Here is the messages from Eclipse console:
> >
> > > WARNING: Nothing to start, exiting ...
> > > Usage: java -jar start.jar [options] [properties] [configs]
> > >        java -jar start.jar --help  # for more information
>
> FWIW I have a new laptop and when I finally got around to working on
> setting up the testbed there I got the same message. I haven't bottomed it
> out yet. I did have it working on another Windows laptop so I need to
> compare my setup.

Jetty version. I didn't even think to compare what the POM for the testbed mentions, and I had grabbed the latest Jetty 9.3 to stick in /opt. They presumably would have to match.

-- Scott

--
To unsubscribe from this list send an email to [hidden email]


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Setup development environment using java-idp-testbed

Cantor, Scott E.
> But Shibboleth IdP returns "No services are available at this location." error in
> web browser.

At the root that's all it ever does. The testbed menu thing is at /index.html and there is nothing at /idp

-- Scott


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

森谷鴻平
At the root that's all it ever does. The testbed menu thing is at /index.html and there is nothing at /idp

https://localhost:8443/ and https://localhost:8443/index.html return "Error 404 - Not Found.". 
How do I display the default authentication  to Shibboleth?

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------


2018-04-13 23:38 GMT+09:00 Cantor, Scott <[hidden email]>:
> But Shibboleth IdP returns "No services are available at this location." error in
> web browser.

At the root that's all it ever does. The testbed menu thing is at /index.html and there is nothing at /idp

-- Scott


--
To unsubscribe from this list send an email to [hidden email]


--
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Setup development environment using java-idp-testbed

森谷鴻平
> 3. Add testbed.xml to java-idp-jetty-base/src/main/resources/jetty-base/webapps/

Oh, I was wrong this step and it worked when I fixed it.
I'm sorry for not confirming that.

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------



2018-04-16 9:54 GMT+09:00 森谷鴻平 <[hidden email]>:
At the root that's all it ever does. The testbed menu thing is at /index.html and there is nothing at /idp

https://localhost:8443/ and https://localhost:8443/index.html return "Error 404 - Not Found.". 
How do I display the default authentication  to Shibboleth?

Thanks,

--
------------------------------------------------------
    Kohei Moriya

    Software Engineer
    Application Consulting Group
    Engineering Dept. 2
    SIOS Technology, Inc.
------------------------------------------------------


2018-04-13 23:38 GMT+09:00 Cantor, Scott <[hidden email]>:
> But Shibboleth IdP returns "No services are available at this location." error in
> web browser.

At the root that's all it ever does. The testbed menu thing is at /index.html and there is nothing at /idp

-- Scott


--
To unsubscribe from this list send an email to [hidden email]



--
To unsubscribe from this list send an email to [hidden email]