Skip to content

NoSuchMethod error when trying to run tests #20

@eheinlein-verta

Description

@eheinlein-verta

I'm working on installing this to test our SCIM implementation. However, I am getting an error when I try to run the tests from the main test page. My best guess is that this is caused by a conflict in the ReflectionHelper classes - one in info.simplecloud.core.coding and one in com.sun.jersey.core.reflection.

Steps I used to reproduce:

  • Follow the installation instructions, using Tomcat 8.5.72 and Java 17.
  • On the index page of the test app, enter the required information (URL and authentication method - in my case a bearer token)
  • Click "Go!"

Expected: the tests run
Actual: a red bar is shown with no text; a POST to http://localhost:8080/scimproxycompliance/compliance2/test2 has returned 500, with the stack trace below in the server logs.

I've tested a few things along the way; I initially used Tomcat v10.0.12 installation but had issues, so I downgraded). I've tried some different versions of jersey in pom.xml. (I tried 1.17.1 because I saw that version a lot when googling tomcat setup issues, and also 1.19.4, which is the latest). I can't try a different version of info.simplecloud.core.coding because it's included as a jar and it doesn't seem to be distributed elsewhere.

Has this been reported before? Have I missed a step?

04-Nov-2021 17:00:05.708 SEVERE [http-nio-8080-exec-14] org.apache.catalina.core.StandardWrapperValve.invoke Allocate exception for servlet [Compliance2]
	java.lang.NoSuchMethodError: 'java.security.PrivilegedAction com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoaderPA()'
		at com.sun.jersey.spi.scanning.AnnotationScannerListener.<init>(AnnotationScannerListener.java:94)
		at com.sun.jersey.spi.scanning.PathProviderScannerListener.<init>(PathProviderScannerListener.java:59)
		at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
		at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:104)
		at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:78)
		at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:89)
		at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:700)
		at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:678)
		at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203)
		at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
		at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
		at javax.servlet.GenericServlet.init(GenericServlet.java:158)
		at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1173)
		at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1118)
		at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:789)
		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1650)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.base/java.lang.Thread.run(Thread.java:833)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions