Open mfowlewebs opened 8 years ago
Running mvn install
first will probably resolve this issue. Not sure if we can make it so that jetty:run
works without an explicit install
on multi-module projects.
I had already done a mvn install
on both a source checkout and the parent overlay. It was the war from this install that I tried dropping into Tomcat, getting this error.
I believe you want to do a mvn package
to generate the war file that you can deploy to Tomcat.
@srmoore The mvn install
that i've been running is a latter step in the mvn build pipeline, meaning it's already had to go through the package
step to get to the install step. Running install
will run everything up to & including package, run integration tests, run validation checks, then install into the local ~/.m2.
The fork of the example overlay I've made should be very easy for others to test and validate what I'm seeing, and should mirror the behavior of running OpenID-Connect-Java-Spring-Server out of box since that's where I copied configuration files in from. I've been using a Oracle Java8u66 on Debian/testing to try to run this. Download, and jetty:run, and I rather expect people to see the same errors.
Here's the diff, to asses for yourself: https://github.com/mitreid-connect/example-openid-connect-overlay/compare/master...mfowlewebs:master , and the link again: https://github.com/mfowlewebs/example-openid-connect-overlay
I get the same error when deploying to tomcat with mitreid-version is 1.2.2 or 1.2.3. I doubt if it has to do anything with having two versions of spring aop (3.2.13 and 4.1.7). Open the war/WEB-INF/lib.
If you notice, 3.2.13 aop AsyncExecutionInterceptor.java has constructor
public AsyncExecutionInterceptor(Executor executor)
where as 4.1.7 has below constructor, which looks correct
AsyncExecutionInterceptor(Executor defaultExecutor, AsyncUncaughtExceptionHandler exceptionHandler)
But I am was able to resolve this by going back to previous version
<properties>
<mitreid-version>1.2.1</mitreid-version>
<java-version>1.7</java-version>
<spring.security.version>4.0.0.RELEASE</spring.security.version>
</properties>
Thanks Mallikarjun
@mpeddagolla The project is still on Spring Security 3.2.9.RELEASE, so not sure why you're trying to set the version to 4.0.0.RELEASE.
@mfowlewebs Apparently dependency resolution (specifically of spring-aop) went awry in your repository. It works fine with this patch:
diff --git a/my-openid-connect/pom.xml b/my-openid-connect/pom.xml
index 017a1e9..0ce765c 100644
--- a/my-openid-connect/pom.xml
+++ b/my-openid-connect/pom.xml
@@ -52,12 +52,10 @@
<groupId>org.mitre</groupId>
<artifactId>openid-connect-server-webapp</artifactId>
<type>war</type>
- <version>${mitreid-version}</version>
</dependency>
<dependency>
<groupId>org.mitre</groupId>
<artifactId>openid-connect-common</artifactId>
- <version>${mitreid-version}</version>
</dependency>
</dependencies>
</project>
diff --git a/pom.xml b/pom.xml
index 6509c95..1f5b477 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,30 +7,22 @@
<version>1.1-SNAPSHOT</version>
<name>example-openid-connect-overlay</name>
- <properties>
- <mitreid-version>1.2.2</mitreid-version>
- </properties>
-
<modules>
<module>my-openid-connect</module>
</modules>
- <dependencies>
- <dependency>
- <groupId>org.mitre</groupId>
- <artifactId>openid-connect-server-webapp</artifactId>
- <type>war</type>
- <version>${mitreid-version}</version>
- </dependency>
- <dependency>
- <groupId>org.mitre</groupId>
- <artifactId>openid-connect-parent</artifactId>
- <type>pom</type>
- <version>${mitreid-version}</version>
- <scope>import</scope>
- </dependency>
- </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.mitre</groupId>
+ <artifactId>openid-connect-parent</artifactId>
+ <type>pom</type>
+ <scope>import</scope>
+ <version>1.2.2</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
<build>
<finalName>my-openid-connect-server</finalName>
it worked for me with the patch
That patch seems to have fixed things, do we need to update the example overlay project as well?
Would be good. A subset of the changes is already in https://github.com/mitreid-connect/example-openid-connect-overlay/pull/2
Yeah, saw the similarities. I think I just need to do more testing to convince myself that it's actually going to work in the general case. :)
Thanks. This bug report also helped me when finding the same issue following the wiki on how to implement the overlay.
Greetings.
I've tried to follow the instructions presented for Maven Overlay, and have created this fork, which copies some of the default configuration files from the server into the overlay. The idea is that, since the server works and runs successfully out of box with these configs (via jetty:run and Tomcat both), this overlay should definitely work.
Unfortunately, I get a rather nebulous Spring error that doesn't help me figure out what could be going wrong.
Ed note: I've significantly modified this ticket. Originally I thought it was an issue with the Jetty maven plugin, however dropping the resulting overlay war into Tomcat generates the same errors indicating a larger problem.