question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webservletfilter causes a UnsupportedOperationException

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

0reactions
ledor473commented, Apr 24, 2019

@pmaciolek thanks! I’ve just confirmed that it’s working as expected with the 1.1.0 release 🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found