Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with rewrite with joinfaces 3.2.0-rc2 #1999

Open
persapiens opened this issue Nov 3, 2023 · 3 comments
Open

Error with rewrite with joinfaces 3.2.0-rc2 #1999

persapiens opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels

Comments

@persapiens
Copy link
Member

persapiens commented Nov 3, 2023

When I upgrade joinfaces to 3.2.0-rc2 in joinfaces-maven-jar-example, I got the error:

16:50:52.151 [main] ERROR o.a.c.c.C.[Tomcat].[localhost].[/] - Error configuring application listener of class [org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener]
java.lang.ClassCastException: ClassCastException: Service class [org.ocpsoft.rewrite.spring.SpringServletContextLoader] did not implement the interface [org.ocpsoft.rewrite.servlet.spi.RequestListener]
	at org.ocpsoft.common.services.ServiceLoader.loadClass(ServiceLoader.java:244)
	at org.ocpsoft.common.services.ServiceLoader.loadService(ServiceLoader.java:208)
	at org.ocpsoft.common.services.ServiceLoader.loadServiceFile(ServiceLoader.java:187)
	at org.ocpsoft.common.services.ServiceLoader.reload(ServiceLoader.java:146)
	at org.ocpsoft.common.services.ServiceLoader.iterator(ServiceLoader.java:341)
	at org.ocpsoft.common.util.Iterators.asList(Iterators.java:40)
	at org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener.<init>(RewriteServletRequestListener.java:37)

In fact, SpringServletContextLoader class does not implement RequestListener, but the file META-INF\services\org.ocpsoft.rewrite.servlet.spi.RequestListener contains the value org.ocpsoft.rewrite.spring.SpringServletContextLoader in rewrite-integration-spring-10.0.1.Final.jar dependency.

Is there a configuration error in this file?

@persapiens
Copy link
Member Author

I downgraded the rewrite-integration-spring dependency to 10.0.0.Final.jar, and it worked.
It does not contain the META-INF\services\org.ocpsoft.rewrite.servlet.spi.RequestListener file inside it.

@larsgrefer
Copy link
Member

Yeah, its a bug inside Rewrite. I just added a unit test for JoinFaces locally which fails on this bug, so we will be able to check for such errors in the future

@larsgrefer
Copy link
Member

We now have the unit test and the downgraded rewrite version in 5.0.x, 5.1.x, and 5.2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants