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

Provider org.glassfish.soteria.servlet.SamRegistrationInstaller not found #900

Closed
starksm64 opened this issue Mar 18, 2022 · 5 comments
Closed
Labels
10.0 Issues related to the Jakarta EE 10 Platform TCK release

Comments

@starksm64
Copy link
Contributor

Describe the bug
Every TCK test deployment I look at has a Provider org.glassfish.soteria.servlet.SamRegistrationInstaller not found error message.

To Reproduce
Steps to reproduce the behavior:

  1. Take a CTS test depoyment like jakartaeetck/dist/com/sun/ts/tests/javaee/resource/servlet/javaee_resource_servlet.ear
  2. run asadmin deploy javaee_resource_servlet.ear
  3. Look at server.log for the deployment
  4. See error
[#|2022-03-17T23:41:33.395-0600|SEVERE|glassfish 7.0|jakarta.enterprise.web.core|_ThreadID=95;_ThreadName=admin-listener(5);_TimeMillis=1647582093395;_LevelValue=1000;|
  java.util.ServiceConfigurationError: jakarta.servlet.ServletContainerInitializer: Provider org.glassfish.soteria.servlet.SamRegistrationInstaller not found
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1212)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1221)
	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
	at org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:5657)
	at com.sun.enterprise.web.WebModule.callServletContainerInitializers(WebModule.java:594)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:5589)
	at com.sun.enterprise.web.WebModule.start(WebModule.java:511)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:877)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:860)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:644)
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2021)
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1667)
	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:82)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:98)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:267)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:328)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:480)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:199)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:467)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:516)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:512)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:511)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:542)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:534)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:533)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1441)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1823)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1699)
	at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:359)
	at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:202)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:397)
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:260)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:239)
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:697)
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:367)
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:150)
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:156)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:440)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:144)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:34)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
	at java.base/java.lang.Thread.run(Thread.java:834)
|#]

[#|2022-03-17T23:41:33.411-0600|INFO|glassfish 7.0|jakarta.enterprise.web|_ThreadID=95;_ThreadName=admin-listener(5);_TimeMillis=1647582093411;_LevelValue=800;_MessageID=AS-WEB-GLUE-00172;|
  Loading application [javaee_resource_servlet#javaee_resource_servlet_web.war] at [javaee_resource_servlet_web]|#]

[#|2022-03-17T23:41:33.444-0600|INFO|glassfish 7.0|jakarta.enterprise.system.core|_ThreadID=95;_ThreadName=admin-listener(5);_TimeMillis=1647582093444;_LevelValue=800;|
  javaee_resource_servlet was successfully deployed in 366 milliseconds.|#]

Expected behavior
The application ear should deploy without errors.

@alwin-joseph
Copy link
Contributor

alwin-joseph commented Mar 18, 2022

To add this is the main cause of test failures for security api tck , as mentioned in https://github.com/eclipse-ee4j/jakartaee-tck/wiki/Jakarta-EE-10.0-TCK-results.

Sorry correction. The security tck failure is not due to this.

The missing class was found in jakarta.security.enterprise-api.jar in previous glassfish releases which is not available in glassfish 7 nightly bundles when I checked last .

Update : I can see the SamRegistrationInstaller class in latest glassfish bundle too.

@starksm64
Copy link
Contributor Author

The class is in the glassfish7/glassfish/modules/jakarta.security.enterprise.jar, but I don't know why this is not seen by the web container:

└> jar -tf jakarta.security.enterprise.jar | grep SamRegistrationInstaller
org/glassfish/soteria/servlet/SamRegistrationInstaller.class

@arjantijms
Copy link
Contributor

The latest version (master build) definitely sees it, as it passes all the Soteria tests.

So the important question here is; which version of GF was used?

The SamRegistrationInstaller would normally not be found when there is "some kind" of error loading it. Since Felix loads it dynamically, it thinks it should utterly and completely swallow the error. This is incredibly annoying and has already costs us untold amount of hours in debugging.

@dmatej
Copy link
Contributor

dmatej commented Mar 18, 2022

There's a lot things changing now, GlassFish still did not pass all it's tests, but is crawling forward :)
Note that there is more changes including reintroduced around 1000 tests in this branch: https://ci.eclipse.org/glassfish/job/glassfish_build-and-test-using-jenkinsfile/view/change-requests/job/PR-23843/
Now just naming is failing for some osgi cause (clustering+shoal+osgi), I expect it should pass soon (and I need to merge Arjan's last changes too)

@gurunrao gurunrao added the 10.0 Issues related to the Jakarta EE 10 Platform TCK release label Apr 13, 2022
@gurunrao
Copy link
Contributor

@starksm64 - issue is reproducible with latest GF 7 nightly build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.0 Issues related to the Jakarta EE 10 Platform TCK release
Projects
None yet
Development

No branches or pull requests

5 participants