Giter VIP home page Giter VIP logo

arquillian-container-jetty's People

Contributors

alesj avatar aslakknutsen avatar bartoszmajsak avatar chengfang avatar dependabot[bot] avatar joakime avatar kenfinnigan avatar kpiwko avatar lordofthejars avatar manovotn avatar mkouba avatar mojavelinux avatar olamy avatar pmuir avatar starksm64 avatar tremes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arquillian-container-jetty's Issues

Add Jetty 10 Embedded Module

Jetty 9 Arquillian Module Not Working With Jetty 10. Its failing with following stack trace:


       at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:146)
        at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:89)
        at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:49)
        at org.jboss.arquillian.junit.AdaptorManager.initializeAdaptor(AdaptorManager.java:21)
        at org.jboss.arquillian.junit.AdaptorManagerWithNotifier.initializeAdaptor(AdaptorManagerWithNotifier.java:19)
        at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:109)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:364)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:237)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:158)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428)
        at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
        at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:144)
        ... 13 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/JavaUtilLog
        at org.jboss.arquillian.container.jetty.embedded_9.JettyEmbeddedContainer.<clinit>(JettyEmbeddedContainer.java:93)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.jboss.arquillian.core.impl.loadable.SecurityActions.newInstance(SecurityActions.java:149)
        at org.jboss.arquillian.core.impl.loadable.ServiceRegistryLoader.createServiceInstance(ServiceRegistryLoader.java:90)
        at org.jboss.arquillian.core.impl.loadable.ServiceRegistryLoader.all(ServiceRegistryLoader.java:50)
        at org.jboss.arquillian.core.impl.loadable.ServiceRegistryLoader.onlyOne(ServiceRegistryLoader.java:61)
        at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:75)
        at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:74)
        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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
        at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:232)
        at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:67)
        at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:72)
        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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
        at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:253)
        at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:61)
        ... 18 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.log.JavaUtilLog
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 52 more

So please release new module for jetty 10 and 11

Its failing because of similar to this issue:
#43

shrinkwrap-extension-jetty-70 source not available.

org/jboss/shrinkwrap/container/shrinkwrap-extension-jetty-70/1.0.0-beta-1/shrinkwrap-extension-jetty-70-1.0.0-beta-1.jar

the shrinkwrap-extension-jetty-70 source is not available on the maven repositories.

New 2.x major release version

There should be a new release that bumps the major version to 2.x and aligns with the EE10 dependencies. This issue will track the required changes.

Jetty 9 configuration should honor module system knowledge.

The Jetty 9 module system has intelligence about the buildup of Jetty based on enabled modules or not. This includes XML (with proper execution ordering), properties, and libraries.

Obviously, since you are stuck on maven/gradlew, the last part about libraries is moot.

However, the proper "glue" for Jetty's modules is the XML, either use the LikeJettyXML example or use the XML itself.

Note: the XML is available via maven on the "config" classified artifacts.

Configuring testing with Jetty 12 EE10 leads to an exception

I was trying to migrate (or rather reinvigorate) Weld's Jetty servlet testing and see if I can make it work with Jetty 12 EE 10.
[Note that this module has been dead for some long time so I cannot say if this worked with previous versions of jetty.]

In the end I failed to pinpoint the issue and while I think it has to be some silly misconfiguration, I wasn't able to figure this one myself.
If I run any of those tests, I can see following output and exception:

[INFO] --- surefire:3.0.0-M5:test (default-test) @ weld-servlet-test-jetty ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Mar 11, 2024 4:23:05 PM org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedContainer start
INFO: Starting Jetty Embedded Server 12.0.7 [id:702025003]
Mar 11, 2024 4:23:06 PM org.jboss.arquillian.container.jetty.embedded_12_ee10.ArquillianAppProvider createApp
INFO: Webapp archive location: file:/home/manovotn/GitRepo/core/environments/servlet/tests/jetty/target/arquillian-jetty-temp/export1759194290394713801e810e33b-48e1-47e4-bb71-c216da9be638.war
[INFO] Running org.jboss.weld.environment.servlet.test.discovery.scope.CustomNormalScopeDiscoveryTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.026 s <<< FAILURE! - in org.jboss.weld.environment.servlet.test.discovery.scope.CustomNormalScopeDiscoveryTest
[ERROR] org.jboss.weld.environment.servlet.test.discovery.scope.CustomNormalScopeDiscoveryTest.testCustomNormalScope  Time elapsed: 0.007 s  <<< ERROR!
java.lang.IllegalArgumentException: ArquillianServletRunnerEE9 not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.

Mar 11, 2024 4:23:06 PM org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedContainer stop
INFO: Stopping Jetty Embedded Server [id:702025003]
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   CustomNormalScopeDiscoveryTest.testCustomNormalScope » IllegalArgument Arquill...

The good part is that I can see that Jetty is being started and the deployment is created as well.
The bad part is the exception which tells me pretty much nothing - my guess was missing dependencies but the deployment that gets created actually contains the lib/arquillian-jakarta-servlet-protocol.jar which is the dep that should contains the ArquillianServletRunnerEE9 implementation. Upon further browsing, I can see in the deployment that there is the XML mentioning the servlet as well as as the servlet impl.

How to reproduce:

Here's Weld branch that has the changes and can be used to reproduce with following steps.

  • Checkout https://github.com/manovotn/core/tree/weld2784
  • cd core
  • mvn clean install -DskipTests
  • Run any of the servlet tests under Jetty; below is an example of one of them
    • mvn clean verify -Dincontainer -Dtest=CustomNormalScopeDiscoveryTest#testCustomNormalScope -f environments/servlet/tests/jetty/pom.xml
  • If you want to inspect the deployment created for given test, it's the war file under core/environments/servlet/tests/jetty/target

Versions used:

  • Arquillian is 1.8.0.Final
  • Arq. container jetty is 2.0.0.Final
  • Jetty is 12.0.7

Any thoughts on what I missed and/or misconfigured? :)

Jetty 11 embedded exception: ArquillianServletRunnerEE9 not found

I have created a Serlvet5/Jakarta EE 9 template project which demos the latest web related specs in a servlet container, I found this arquillian-container-jetty added Jetty 11 support finally, it is great news.

But I tried to add a Maven profile to run the arquillian tests on jetty11 embedded, it failed and I got the following exception info.

java.lang.IllegalArgumentException: ArquillianServletRunnerEE9 not found.
Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.

My template project configured testing sample with Jaxrs, servlet, CDI, etc, I have created a branch/PR for Jetty11 with a new Maven profile arq-jetty-embedded.

BTW, I also configured a jetty-external profile and make sure the project work on a external Jetty server by maven plugin.

Jetty 9 deploy should not rely on server.getHandler()

The various configurations within Jetty can replace the root level handler on the server with its own.

This is an unreliable piece of code.

((HandlerCollection) server.getHandler()).addHandler(wctx);

This can often result in either a ClassCastException or the addition of the the context into the wrong HandlerCollection (resulting in unexpected behavior)

Jetty 9 Container.start() should wait till all non-webapp handlers are deployed.

There are various non-webapp, non-servlet, based handlers that can be added to the Jetty server (such as Login / Security / Proxy / FCGI / Rewrite / etc ...)

These need to be deployed, before the webapp archive, and before the server.start() call.

The call in JettyEmbeddedContainer.start() to server.start() should be run after all of these handlers are added.

Insufficient pluggables

Everything in Jetty is pluggable. Everything.

The current assumption that all you want is jetty-webapp + jetty-plus assumes/forces configurations that are not needed by many.

Even assumptions such as "jetty will always perform annotation scanning" is false in many valid configurations.

If you take even high-level "concepts" and list them out, as a set of modules that can be "enabled" you have the following.

// from Jetty 9.1.0
// pruned to only show modules relevant to arquillian test suite
// (things stripped: logging / jmx / resource monitoring / network controls / etc)

$ java -jar start.jar --list-modules

Module: annotations
LIB: lib/jetty-annotations-${jetty.version}.jar
LIB: lib/annotations/*.jar
XML: etc/jetty-annotations.xml
depends: [plus]

Module: client
LIB: lib/jetty-client-${jetty.version}.jar
depends: []

Module: continuation
LIB: lib/jetty-continuation-${jetty.version}.jar
depends: []

Module: deploy
LIB: lib/jetty-deploy-${jetty.version}.jar
XML: etc/jetty-deploy.xml
depends: [webapp]

Module: http
XML: etc/jetty-http.xml
depends: [server]

Module: https
XML: etc/jetty-https.xml
depends: [ssl]

Module: jaas
LIB: lib/jetty-jaas-${jetty.version}.jar
XML: etc/jetty-jaas.xml
depends: [server]

Module: jaspi
LIB: lib/jetty-jaspi-${jetty.version}.jar
LIB: lib/jaspi/*.jar
depends: [security]

Module: jndi
LIB: lib/jetty-jndi-${jetty.version}.jar
LIB: lib/jndi/*.jar
depends: [server]

Module: jsp
LIB: lib/jsp/*.jar
depends: [servlet]

Module: npn
depends: []

Module: plus
LIB: lib/jetty-plus-${jetty.version}.jar
XML: etc/jetty-plus.xml
depends: [server, security, jndi]

Module: proxy
LIB: lib/jetty-proxy-${jetty.version}.jar
XML: etc/jetty-proxy.xml
depends: [client, servlet]

Module: rewrite
LIB: lib/jetty-rewrite-${jetty.version}.jar
XML: etc/jetty-rewrite.xml
depends: [server]

Module: security
LIB: lib/jetty-security-${jetty.version}.jar
depends: [server]

Module: server
LIB: lib/servlet-api-3.1.jar
LIB: lib/jetty-schemas-3.1.jar
LIB: lib/jetty-http-${jetty.version}.jar
LIB: lib/jetty-server-${jetty.version}.jar
LIB: lib/jetty-xml-${jetty.version}.jar
LIB: lib/jetty-util-${jetty.version}.jar
LIB: lib/jetty-io-${jetty.version}.jar
XML: etc/jetty.xml
depends: []

Module: servlet
LIB: lib/jetty-servlet-${jetty.version}.jar
depends: [server]

Module: servlets
LIB: lib/jetty-servlets-${jetty.version}.jar
depends: [servlet]

Module: spdy
LIB: lib/spdy/*.jar
XML: etc/jetty-ssl.xml
XML: etc/jetty-spdy.xml
depends: [ssl, npn]

Module: ssl
XML: etc/jetty-ssl.xml
depends: [server]

Module: webapp
LIB: lib/jetty-webapp-${jetty.version}.jar
depends: [security, servlet]

Module: websocket
LIB: lib/websocket/*.jar
depends: [annotations]

--(snip)--

this list merely makes things available on the server side, each webapp can choose to use the feature or not, even having a mix of features expose to the webapps. (such as 2 webapps with websocket support, one with it available, another with it disabled)

Aquillian seems to make assumptions on what is "default" or "baseline" for a container, but makes no statement on what that means.

Referencing:
http://arquillian.org/guides/developing_a_container_adapter/

Jetty 9 Configuration Classes should not be hardcoded

Jetty 9 Configuration Classes should not be hardcoded or present.

The default list within Jetty has changed numerous times in the past.
The list currently being used assumes too much.

Plus is an optional configuration based on insertion of extra configurations.

Skipped assertions in Jetty 12 tests

I noticed that tests for Jetty 12 adapter have Weld-related exclusions such as this one - https://github.com/arquillian/arquillian-container-jetty/blob/master/jetty-embedded-12-ee10/src/test/java/org/jboss/arquillian/container/jetty/embedded_12_ee10/JettyEmbeddedInContainerTestCase.java#L119-L121

This should be because you are using empty beans.xml which in CDI 4.0+ translates to discovery mode annotated and only beans with bean defining annotations will be discovered.

In other words, if you add @Dependent annotation onto your bean class (here) it will be discovered. Alternatively, you could provide beans.xml which explicitly declares all discovery mode. Both approaches should get you to previous behavior.

That being said, doing so gave me a new stack that's not Weld related and that someone here (@joakime or @olamy) might know more about:

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.401 s <<< FAILURE! -- in org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedInContainerTestCase
[ERROR] org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedInContainerTestCase -- Time elapsed: 2.401 s <<< ERROR!
org.jboss.arquillian.container.spi.client.container.DeploymentException: Could not deploy 1a2f6627-44ff-4fd1-a990-56df29197acd.war
	at org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedContainer.deploy(JettyEmbeddedContainer.java:273)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:151)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:118)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:239)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:118)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:47)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:71)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:54)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:92)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:77)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:232)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:212)
	at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:77)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:96)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:89)
	at org.jboss.arquillian.junit5.ArquillianExtension.beforeAll(ArquillianExtension.java:35)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Caused by: java.lang.NullPointerException: Cannot invoke "jakarta.servlet.ServletContext.getContextPath()" because the return value of "org.eclipse.jetty.ee10.servlet.ServletHolder.getServletContext()" is null
	at org.jboss.arquillian.container.jetty.embedded_12_ee10.JettyEmbeddedContainer.deploy(JettyEmbeddedContainer.java:269)
	... 53 more

IllegalArgumentException: ArquillianServletRunnerEE9 not found

I tried to add Jetty 12/Jakarta EE9 support to my template project:

https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate/

The Arquillian config for the Jetty 12/Jakarta EE 9, https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate/blob/2aaabed6ba8bbfc3c87e3cd3ab5197ef28078d98/pom.xml#L490

Expected Behaviour

Work as expected like Jetty 11.

Current Behaviour
Error:  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.331 s <<< FAILURE! -- in com.example.it.GreetingServiceTest
Error:  com.example.it.GreetingServiceTest.should_create_greeting -- Time elapsed: 0.054 s <<< ERROR!
java.lang.IllegalArgumentException: ArquillianServletRunnerEE9 not found. Could not determine ContextRoot from ProtocolMetadata, please contact DeployableContainer developer.
Steps To Reproduce
  1. clone https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate/
  2. Switch to arq-jetty-12 branch
  3. Run GreetingServiceTest
Additional Information

The build env: https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate/blob/2aaabed6ba8bbfc3c87e3cd3ab5197ef28078d98/.github/workflows/it-jetty-12.yml

The complete Github actions build info, https://github.com/hantsy/jakartaee9-servlet-starter-boilerplate/actions/runs/6595413820/job/17920411770

Add Jetty 11 Embedded Module

Jetty 11 is running with Jakarta EE 9 which means we need a new module to support that.

The usual set of changes is needed - e.g. swap all javax deps for their jakarta counterparts, curate common module and so on.
On top of that, there seem to be some changes inside Jetty that will require more attention to make it work equivalently.
Namely, the following two classes vanished from source in newer version and I don't yet know replacements for them:

Both are used by JettyEmbeddedContainer in this project.

This change will require new Arq. core with updated servlet protocol, see arquillian/arquillian-core#248

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.