Hi Ryan, your example will work, if you replace the Jakarta API jar with
<dependency> <groupId>org.apache.tomee</groupId> <artifactId>jakartaee-api</artifactId> <version>10.0-M2</version> <scope>provided</scope> </dependency> The reason for this is, that some of the official API packages include vendor-specific code, which will conflict with TomEE/Tomcat. Therefore, - if you are going to use TomEE - you should use our API shade as we exclude those APIs or replace them accordingly. This is especially the case for the Jakarta Faces API, which is coupled with Faces / Mojarra. In TomEE, we are going to ship Apache MyFaces (most of the time), so we don't include the Jakarta Faces API by default. If you would use a TomEE Plume (via arquillian-remote), the official Faces API JAR most likely work. Gruß Richard Am Samstag, dem 07.12.2024 um 01:46 -0500 schrieb Ryan Cuprak: > Hi Richard, > > Here is my branch: > https://github.com/rcuprak/jakartaee-starter/tree/tomee > > What’s different with the Jakarta EE API Jar vs the official one? > > Thanks, > -Ryan > > On 2024/11/18 18:41:24 Richard Zowalla wrote: > > Hi, > > > > can you try with the TomEE Jakarta EE API Jahr instead of the > > "official" one? > > > > Need for JUnit 4 sounds odd. > > > > Can you upload a Code Example somewhere, so we can have a look? > > > > Gruß > > Richard > > > > Am 18. November 2024 00:07:35 MEZ schrieb Ryan Cuprak > > <rc...@mac.com.INVALID>: > > > Hello, > > > I am trying to get a simple Arquillian (1.9.1.Final) test > > > running with 10.0.0-M3 and JUnit 5 (5.11.3) on Java 21. Is this > > > possible? > > > > > > I had to include JUnit vintage as I was getting an error about a > > > missing JUnit 4 dependency. Somehow the TomEE Arquillian Embedded > > > dependency was pulling it in. > > > > > > Dependencies: > > > <dependencies> > > > <!-- Jakarta EE 10 --> > > > <dependency> > > > <groupId>jakarta.platform</groupId> > > > <artifactId>jakarta.jakartaee-api</artifactId> > > > <version>10.0.0</version> > > > <scope>provided</scope> > > > </dependency> > > > <!-- Arquillian --> > > > <dependency> > > > <groupId>org.jboss.arquillian</groupId> > > > <artifactId>arquillian-bom</artifactId> > > > <version>1.9.1.Final</version> > > > <scope>test</scope> > > > <type>pom</type> > > > </dependency> > > > <dependency> > > > <groupId>org.jboss.arquillian.junit5</groupId> > > > <artifactId>arquillian-junit5-container</artifactId> > > > <version>1.9.1.Final</version> > > > <scope>test</scope> > > > </dependency> > > > <dependency> > > > <groupId>org.junit.jupiter</groupId> > > > <artifactId>junit-jupiter</artifactId> > > > <scope>test</scope> > > > </dependency> > > > <dependency> > > > <groupId>org.junit.vintage</groupId> > > > <artifactId>junit-vintage-engine</artifactId> > > > <scope>test</scope> > > > </dependency> > > > <dependency> > > > <groupId>org.apache.tomee</groupId> > > > <artifactId>arquillian-tomee-embedded</artifactId> > > > <version>10.0.0-M3</version> > > > </dependency> > > > <dependency> > > > <groupId>org.apache.tomee</groupId> > > > <artifactId>tomee-embedded</artifactId> > > > <version>10.0.0-M3</version> > > > </dependency> > > > </dependencies> > > > > > > Output: > > > > > > mvn test > > > Picked up JAVA_TOOL_OPTIONS: - > > > Djdk.util.zip.disableZip64ExtraFieldValidation=true - > > > Djdk.attach.allowAttachSelf=true --add-opens=java.base/java.io > > > <http://java.io/>=ALL-UNNAMED --add- > > > opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add- > > > opens=java.base/java.net <http://java.net/>=ALL-UNNAMED --add- > > > opens=java.naming/javax.naming.spi=ALL-UNNAMED --add- > > > opens=java.base/java.lang=ALL-UNNAMED > > > [INFO] Scanning for projects... > > > [INFO] > > > [INFO] ------------------< io.jakartaee-ambassadors:starter >---- > > > -------------- > > > [INFO] Building starter 1.2 > > > [INFO] from pom.xml > > > [INFO] --------------------------------[ war ]------------------- > > > -------------- > > > [INFO] > > > [INFO] --- toolchains:3.2.0:toolchain (default) @ starter --- > > > [INFO] Required toolchain: jdk [ vendor='zulu' version='21' ] > > > [INFO] Found matching toolchain for type jdk: > > > JDK[/Library/Java/JavaVirtualMachines/zulu21.28.85-ca-fx- > > > jdk21.0.0-macosx_aarch64] > > > [INFO] > > > [INFO] --- resources:3.3.1:resources (default-resources) @ > > > starter --- > > > [INFO] skip non existing resourceDirectory > > > /Users/rcuprak/Documents/jakartaee-starter/src/main/resources > > > [INFO] > > > [INFO] --- compiler:3.13.0:compile (default-compile) @ starter -- > > > - > > > [INFO] Toolchain in maven-compiler-plugin: > > > JDK[/Library/Java/JavaVirtualMachines/zulu21.28.85-ca-fx- > > > jdk21.0.0-macosx_aarch64] > > > [INFO] Nothing to compile - all classes are up to date. > > > [INFO] > > > [INFO] --- resources:3.3.1:testResources (default-testResources) > > > @ starter --- > > > [INFO] Copying 2 resources from src/test/resources to > > > target/test-classes > > > [INFO] > > > [INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ > > > starter --- > > > [INFO] Toolchain in maven-compiler-plugin: > > > JDK[/Library/Java/JavaVirtualMachines/zulu21.28.85-ca-fx- > > > jdk21.0.0-macosx_aarch64] > > > [INFO] Nothing to compile - all classes are up to date. > > > [INFO] > > > [INFO] --- surefire:3.5.2:test (default-test) @ starter --- > > > [INFO] Toolchain in maven-surefire-plugin: > > > JDK[/Library/Java/JavaVirtualMachines/zulu21.28.85-ca-fx- > > > jdk21.0.0-macosx_aarch64] > > > [INFO] Using auto detected provider > > > org.apache.maven.surefire.junitplatform.JUnitPlatformProvider > > > [INFO] > > > [INFO] ------------------------------------------------------- > > > [INFO] T E S T S > > > [INFO] ------------------------------------------------------- > > > Picked up JAVA_TOOL_OPTIONS: - > > > Djdk.util.zip.disableZip64ExtraFieldValidation=true - > > > Djdk.attach.allowAttachSelf=true --add-opens=java.base/java.io > > > <http://java.io/>=ALL-UNNAMED --add- > > > opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add- > > > opens=java.base/java.net <http://java.net/>=ALL-UNNAMED --add- > > > opens=java.naming/javax.naming.spi=ALL-UNNAMED --add- > > > opens=java.base/java.lang=ALL-UNNAMED > > > [INFO] Running org.ctjava.HelloWorldBeanTest > > > Nov 12, 2024 10:45:24 AM > > > org.jboss.arquillian.container.impl.MapObject populate > > > WARNING: Configuration contain properties not supported by the > > > backing object > > > org.apache.openejb.arquillian.embedded.EmbeddedTomEEConfiguration > > > Unused property entries: {bindHttpPort=4000} > > > Supported property names: [portRange, singleDumpByArchiveName, > > > keyAlias, quickSession, roles, keepServerXmlAsThis, > > > classpathConfiguration, dir, ssl, httpsPort, preloadClasses, > > > webResourcesCached, stopPort, host, http2, > > > singleDeploymentByArchiveName, keystorePass, withEjbRemote, > > > appWorkingDir, exportConfAsSystemProperty, httpPort, unpackWars, > > > users, webContextToUseWithEars, arquillianProtocol, serverXml, > > > keystoreType, unsafeEjbd, stopCommand, configurationCustomizers, > > > sslProtocol, keystoreFile, stopHost, clientAuth, properties] > > > WARNING: A Java agent has been loaded dynamically > > > (/Users/rcuprak/.m2/repository/org/apache/tomee/openejb- > > > javaagent/10.0.0-M3/openejb-javaagent-10.0.0-M3.jar) > > > WARNING: If a serviceability tool is in use, please run with - > > > XX:+EnableDynamicAgentLoading to hide this warning > > > WARNING: If a serviceability tool is not in use, please run with > > > -Djdk.instrument.traceUsage for more information > > > WARNING: Dynamic loading of agents will be disallowed by default > > > in a future release > > > Nov 12, 2024 10:45:24 AM > > > org.apache.velocity.util.DeprecationAwareExtProperties > > > warnDeprecated > > > WARNING: configuration key 'resource.loader' has been deprecated > > > in favor of 'resource.loaders' > > > Nov 12, 2024 10:45:24 AM > > > org.apache.velocity.util.DeprecationAwareExtProperties > > > warnDeprecated > > > WARNING: configuration key 'class.resource.loader.description' > > > has been deprecated in favor of > > > 'resource.loader.class.description' > > > Nov 12, 2024 10:45:24 AM > > > org.apache.velocity.util.DeprecationAwareExtProperties > > > warnDeprecated > > > WARNING: configuration key 'class.resource.loader.class' has been > > > deprecated in favor of 'resource.loader.class.class' > > > Nov 12, 2024 10:45:24 AM org.apache.tomee.embedded.Container > > > start > > > INFO: Starting TomEE from: > > > /var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquillian- > > > apache-tomee-57680 > > > Nov 12, 2024 10:45:24 AM org.apache.coyote.AbstractProtocol init > > > INFO: Initializing ProtocolHandler ["http-nio-8080"] > > > Nov 12, 2024 10:45:24 AM org.apache.catalina.core.StandardService > > > startInternal > > > INFO: Starting service [Tomcat] > > > Nov 12, 2024 10:45:24 AM org.apache.catalina.core.StandardEngine > > > startInternal > > > INFO: Starting Servlet engine: [Apache Tomcat/10.1.30] > > > Nov 12, 2024 10:45:24 AM org.apache.coyote.AbstractProtocol start > > > INFO: Starting ProtocolHandler ["http-nio-8080"] > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.util.OptionsLog info > > > INFO: Using 'openejb.jdbc.datasource- > > > creator=org.apache.tomee.jdbc.TomEEDataSourceCreator' > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: > > > ***************************************************************** > > > *************** > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: OpenEJB http://tomee.apache.org/ > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: Startup: Tue Nov 12 10:45:24 EST 2024 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: Copyright 1999-2024 (C) Apache TomEE Project, All Rights > > > Reserved. > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: Version: 10.0.0-M3 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: Build date: 20241005 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: Build time: 05:18 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: > > > ***************************************************************** > > > *************** > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: openejb.home = > > > /private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquilli > > > an-apache-tomee-57680 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.OpenEJB$Instance > > > <init> > > > INFO: openejb.base = > > > /private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquilli > > > an-apache-tomee-57680 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.cdi.CdiBuilder > > > initializeOWB > > > INFO: Created new singletonService > > > org.apache.openejb.cdi.ThreadSingletonServiceImpl@35f8a9d3 > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.cdi.CdiBuilder > > > initializeOWB > > > INFO: Succeeded in installing singleton service > > > Nov 12, 2024 10:45:24 AM > > > org.apache.openejb.config.ConfigurationFactory init > > > INFO: TomEE configuration file is > > > '/private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquill > > > ian-apache-tomee-57680/conf/openejb.xml' > > > Nov 12, 2024 10:45:24 AM > > > org.apache.openejb.config.ConfigurationFactory configureService > > > INFO: Configuring Service(id=Tomcat Security Service, > > > type=SecurityService, provider-id=Tomcat Security Service) > > > Nov 12, 2024 10:45:24 AM > > > org.apache.openejb.config.ConfigurationFactory configureService > > > INFO: Configuring Service(id=Default Transaction Manager, > > > type=TransactionManager, provider-id=Default Transaction Manager) > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.util.OptionsLog info > > > INFO: Using 'openejb.system.apps=false' > > > Nov 12, 2024 10:45:24 AM org.apache.openejb.util.OptionsLog info > > > INFO: Using 'openejb.deployments.classpath=false' > > > Nov 12, 2024 10:45:24 AM > > > org.apache.openejb.assembler.classic.Assembler createRecipe > > > INFO: Creating TransactionManager(id=Default Transaction Manager) > > > Nov 12, 2024 10:45:24 AM > > > org.apache.openejb.assembler.classic.Assembler createRecipe > > > INFO: Creating SecurityService(id=Tomcat Security Service) > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.util.OptionsLog info > > > INFO: Using 'openejb.servicemanager.enabled=false' > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.util.JarExtractor > > > extract > > > INFO: Extracting jar: > > > /var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquillian- > > > tomee-app-working-dir-57680/0/a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366.war > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.util.JarExtractor > > > extract > > > INFO: Extracted path: > > > /var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquillian- > > > tomee-app-working-dir-57680/0/a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366 > > > Nov 12, 2024 10:45:25 AM > > > org.apache.tomee.catalina.TomcatWebAppBuilder deployWebApps > > > INFO: using default host: localhost > > > Nov 12, 2024 10:45:25 AM > > > org.apache.tomee.catalina.TomcatWebAppBuilder init > > > INFO: ------------------------- localhost -> /a7f8e3c1-e98b-48b9- > > > abdf-5c2db9b43366 > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.util.OptionsLog info > > > INFO: Using > > > 'openejb.session.manager=org.apache.tomee.catalina.session.QuickS > > > essionManager' > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.config.ConfigurationFactory > > > configureApplication > > > INFO: Configuring enterprise application: > > > /private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquilli > > > an-tomee-app-working-dir-57680/0/a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366 > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.config.ConfigurationFactory configureService > > > INFO: Configuring Service(id=Default Managed Container, > > > type=Container, provider-id=Default Managed Container) > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.config.AutoConfig > > > createContainer > > > INFO: Auto-creating a container for bean a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366.Comp167275971: Container(type=MANAGED, id=Default > > > Managed Container) > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.assembler.classic.Assembler createRecipe > > > INFO: Creating Container(id=Default Managed Container) > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.core.managed.SimplePassivater init > > > INFO: Using directory > > > /var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T for stateful > > > session passivation > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.config.AppInfoBuilder > > > build > > > INFO: Enterprise application > > > "/private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquill > > > ian-tomee-app-working-dir-57680/0/a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366" loaded. > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.assembler.classic.Assembler createApplication > > > INFO: Assembling app: > > > /private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc0000gn/T/arquilli > > > an-tomee-app-working-dir-57680/0/a7f8e3c1-e98b-48b9-abdf- > > > 5c2db9b43366 > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.cdi.CdiBuilder > > > initSingleton > > > INFO: Existing thread singleton service in SystemInstance(): > > > org.apache.openejb.cdi.ThreadSingletonServiceImpl@35f8a9d3 > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.cdi.ManagedSecurityService <init> > > > INFO: Some Principal APIs could not be loaded: > > > org.eclipse.microprofile.jwt.JsonWebToken out of > > > org.eclipse.microprofile.jwt.JsonWebToken not found > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.cdi.OpenEJBLifecycle > > > startApplication > > > INFO: OpenWebBeans Container is starting... > > > Nov 12, 2024 10:45:25 AM org.apache.webbeans.plugins.PluginLoader > > > startUp > > > INFO: Adding OpenWebBeansPlugin : [CdiPlugin] > > > Nov 12, 2024 10:45:25 AM org.apache.webbeans.config.BeansDeployer > > > validateInjectionPoints > > > INFO: All injection points were validated successfully. > > > Nov 12, 2024 10:45:25 AM org.apache.openejb.cdi.OpenEJBLifecycle > > > startApplication > > > INFO: OpenWebBeans Container has started, it took 127 ms. > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.assembler.classic.ValidatorBuilder getConfig > > > INFO: Ignoring XML Configuration for validator > > > org.apache.bval.jsr.ConfigurationImpl > > > Nov 12, 2024 10:45:25 AM > > > org.apache.openejb.assembler.classic.Assembler createApplication > > > INFO: Deployed > > > Application(path=/private/var/folders/tf/s6q995j10zxdcj1cp_d90ccc > > > 0000gn/T/arquillian-tomee-app-working-dir-57680/0/a7f8e3c1-e98b- > > > 48b9-abdf-5c2db9b43366) > > > Nov 12, 2024 10:45:25 AM > > > org.apache.myfaces.webapp.MyFacesContainerInitializer onStartup > > > INFO: Using org.apache.myfaces.webapp.MyFacesContainerInitializer > > > Nov 12, 2024 10:45:25 AM > > > org.apache.myfaces.webapp.MyFacesContainerInitializer onStartup > > > INFO: Added FacesServlet with mappings=[/faces/*, *.jsf, *.faces, > > > *.xhtml] > > > Nov 12, 2024 10:45:25 AM org.apache.jasper.servlet.TldScanner > > > scanJars > > > INFO: At least one JAR was scanned for TLDs yet contained no > > > TLDs. Enable debug logging for this logger for a complete list of > > > JARs that were scanned but no TLDs were found in them. Skipping > > > unneeded JARs during scanning can improve startup time and JSP > > > compilation time. > > > Nov 12, 2024 10:45:25 AM > > > org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer > > > addListener > > > INFO: Installing > > > <listener>org.apache.myfaces.webapp.StartupServletContextListener > > > </listener> > > > Nov 12, 2024 10:45:25 AM org.apache.catalina.core.StandardContext > > > listenerStart > > > SEVERE: Exception sending context initialized event to listener > > > instance of class > > > [org.apache.myfaces.webapp.StartupServletContextListener] > > > java.lang.NoClassDefFoundError: com/sun/faces/util/Util > > > at > > > jakarta.faces.CurrentThreadToServletContext.getFactoryFinder(Curr > > > entThreadToServletContext.java:51) > > > at > > > jakarta.faces.FactoryFinder.getFactory(FactoryFinder.java:259) > > > at > [message truncated...]