webservletfilter causes a UnsupportedOperationException
See original GitHub issueI’m trying to use the Agent compiled from master (2e5419b89756fb0c3df276f2a22184175c27d970) using the following command:
mvn clean install && mvn -Dassemble package
But when I add it to a Spring Boot application, it prevents the application from starting and error with the following:
java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener
at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.addFilter(StandardContext.java:6743)
at io.opentracing.contrib.specialagent.webservletfilter.ServletContextAgentIntercept.exit(ServletContextAgentIntercept.java:35)
at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.<init>(StandardContext.java:6546)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4798)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 6 common frames omitted
Wrapped by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
... 6 common frames omitted
Wrapped by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:871)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Obviously, I can’t share the whole application, but here are some of the related Spring dependancies:
Maven: org.springframework.boot:spring-boot:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-actuator:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-autoconfigure:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-configuration-processor:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-starter:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-starter-logging:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-starter-tomcat:1.3.5.RELEASE
Maven: org.springframework.boot:spring-boot-starter-web:1.3.5.RELEASE
Maven: org.springframework.hateoas:spring-hateoas:0.20.0.RELEASE
Maven: org.springframework:spring-aop:4.2.6.RELEASE
Maven: org.springframework:spring-beans:4.2.6.RELEASE
Maven: org.springframework:spring-context:4.2.6.RELEASE
Maven: org.springframework:spring-context-support:4.2.6.RELEASE
Maven: org.springframework:spring-core:4.2.6.RELEASE
Maven: org.springframework:spring-expression:4.2.6.RELEASE
Maven: org.springframework:spring-web:4.2.6.RELEASE
Maven: org.springframework:spring-webmvc:4.2.6.RELEASE
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
java.lang.UnsupportedOperationException adding to a list
You are using Arrays.asList method, here's what the Javadoc says: Returns a fixed-size list backed by the specified array.
Read more >JPS-00063: Jps servlet filter creation failed. Reason: java.lang ...
Hi all, I'm porting an ADF application from JDeveloper+WebLogic to maven+JBoss 7 but I can't made the application deploy due to the ...
Read more >java.lang.UnsupportedOperationException - excep... - JBoss.org
I have a response side web filter that essentially hard codes it into the HTTP headers: import java.io.IOException; import javax.servlet.
Read more >java.lang.UnsupportedOperationException happens wh...
java.lang.UnsupportedOperationException happens when using Orchestrator's new web client to run workflows, while lagacy client is ok.
Read more >FilterInvocation#getFullRequestUrl can result in ... - GitHub
Describe the bug Calling FilterInvocation#getFullRequestUrl can throw UnsupportedOperationException: public abstract java.lang.String javax.servlet.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ledor473 @SevaSafris this fixed this problem (merged 5 days ago): https://github.com/opentracing-contrib/java-specialagent/commit/0a9a9d7757f7c023bf1ef1888f8a6609a4d27ffb
@pmaciolek thanks! I’ve just confirmed that it’s working as expected with the 1.1.0 release 🎉