tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arturo Martín Lladó <arturo.martin.ll...@gmail.com>
Subject Re: Set users and roles in arquillian.xml for TomEE embedded
Date Thu, 21 Jan 2021 21:26:08 GMT
Hi, Cesar:

Sorry for the delay, busy week... :)

Ticket created: https://issues.apache.org/jira/browse/TOMEE-2961
The test code runs fine in TomEE Embedded 8.0.0, 8.0.1, 8.0.4 and 8.0.5, so
I guess it would be understandable that no correction will be made in this
case.

Again, thanks a lot for your effort in this project.
--
Arturo Martín Lladó


El jue, 14 ene 2021 a las 23:18, Cesar Hernandez (<cesarguate@gmail.com>)
escribió:

> Hi Arturo,
>
> Thank you for the follow up on this thread.
>
> I created https://issues.apache.org/jira/browse/TOMEE-2956, so we can
> improve the current documentation for TomEE and Arquillian.
>
> Do you want me to submit a complete bug report via
> > http://issues.apache.org/jira/browse/TOMEE? I would be glad to do so,
> but
> > it seems I can't create issues.
> >
>
> If you want to create the ticket, sure, go ahead :). Share please your Jira
> username so I can update your role and you will be all set.
> Feel free to drop in the ticket the example you made. I downloaded and test
> it locally to ended up having the behavior you described.
> Tomee 8.0.6 will be released soon, I recall seeing on the CI some issue
> related with
> "org.jboss.arquillian.container.spi.client.container.DeploymentException:
> Unable to deploy" .
> If you want to follow up on this closely, we can move the conversation
> along with the ticket you are going to create in the dev mailing list for
> further troubleshooting.
>
> As I said before, I hope this can help anyone that has the same problems
> :-)
>
>
> This conversation definitely is and will help more users in the
> future along with the upcoming documentation update and patch for the
> issue.
>
>
>
> El jue, 14 ene 2021 a las 6:25, Arturo Martín Lladó (<
> arturo.martin.llado@gmail.com>) escribió:
>
> > Hi again, César:
> >
> > So, after a lot of headaches and testing, I think I have an answer that
> > HIH someone that has the same needs as me.
> > First of all, after some debugging sessions on arquillian-tomee-embedded
> > and tomee-embedded projects, the syntax in order to specify users and
> roles
> > in the arquillian.xml file for TomEE 8 is the following (not -very well?-
> > documented):
> >
> > <property name="users">
> >      user=userpass
> >      admin=adminpass
> > </property>
> >
> > <property name="roles">
> >     user=userrole
> >     admin=adminrole
> > </property>
> >
> > When I try to test a REST Service protected via web.xml and that also
> > invokes an EJB object, works fine with the following versions of
> > tomee-embedded artifact:
> > - 8.0.0
> > - 8.0.1
> >
> > From 8.0.2 and above, it seems to be broken. This is the error message I
> > get in my POC project when I run mvn test (when invoking the test code
> via
> > the Eclipse JUnit launchers, this error message is not shown):
> >
> > [INFO] Scanning for projects...
> > [INFO]
> > [INFO] -------------------------< test:tomee-simple
> > >--------------------------
> > [INFO] Building tomee-simple 0.0.1-SNAPSHOT
> > [INFO] --------------------------------[ war
> > ]---------------------------------
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
> > tomee-simple ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] Copying 0 resource
> > [INFO]
> > [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
> > tomee-simple ---
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.6:testResources
> > (default-testResources) @ tomee-simple ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] Copying 1 resource
> > [INFO]
> > [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @
> > tomee-simple ---
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO]
> > [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
> tomee-simple
> > ---
> > [INFO] Surefire report directory:
> >
> C:\DESARROLLO\WORKSPACE\amartin\eclipse\tomee-simple\target\surefire-reports
> >
> > -------------------------------------------------------
> >  T E S T S
> > -------------------------------------------------------
> > Running amllado.arquillian.tomee.test.TestHelloWorldRestController
> > ene 14, 2021 1:08:58 PM org.apache.tomee.embedded.Container start
> > INFORMACI�N: Starting TomEE from:
> > C:\Users\amartin\AppData\Local\Temp\arquillian-apache-tomee
> > ene 14, 2021 1:08:58 PM org.apache.coyote.AbstractProtocol init
> > INFORMACI�N: Initializing ProtocolHandler ["http-nio-20002"]
> > ene 14, 2021 1:08:58 PM org.apache.catalina.core.StandardService
> > startInternal
> > INFORMACI�N: Starting service [Tomcat]
> > ene 14, 2021 1:08:58 PM org.apache.catalina.core.StandardEngine
> > startInternal
> > INFORMACI�N: Starting Servlet engine: [Apache Tomcat/9.0.35]
> > ene 14, 2021 1:08:58 PM org.apache.coyote.AbstractProtocol start
> > INFORMACI�N: Starting ProtocolHandler ["http-nio-20002"]
> > ene 14, 2021 1:08:59 PM org.apache.openejb.util.OptionsLog info
> > INFORMACI�N: Using
> >
> 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator'
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N:
> >
> ********************************************************************************
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: OpenEJB http://tomee.apache.org/
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: Startup: Thu Jan 14 13:08:59 CET 2021
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: Copyright 1999-2018 (C) Apache OpenEJB Project, All Rights
> > Reserved.
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: Version: 8.0.2
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: Build date: 20200514
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: Build time: 11:52
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N:
> >
> ********************************************************************************
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: openejb.home =
> > C:\Users\amartin\AppData\Local\Temp\arquillian-apache-tomee
> > ene 14, 2021 1:08:59 PM org.apache.openejb.OpenEJB$Instance <init>
> > INFORMACI�N: openejb.base =
> > C:\Users\amartin\AppData\Local\Temp\arquillian-apache-tomee
> > ene 14, 2021 1:08:59 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
> > INFORMACI�N: Created new singletonService
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl@27d5a580
> > ene 14, 2021 1:08:59 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
> > INFORMACI�N: Succeeded in installing singleton service
> > ene 14, 2021 1:08:59 PM org.apache.openejb.config.ConfigurationFactory
> init
> > INFORMACI�N: TomEE configuration file is
> >
> 'C:\Users\amartin\AppData\Local\Temp\arquillian-apache-tomee\conf\openejb.xml'
> > ene 14, 2021 1:08:59 PM org.apache.openejb.config.ConfigurationFactory
> > configureService
> > INFORMACI�N: Configuring Service(id=Tomcat Security Service,
> > type=SecurityService, provider-id=Tomcat Security Service)
> > ene 14, 2021 1:08:59 PM org.apache.openejb.config.ConfigurationFactory
> > configureService
> > INFORMACI�N: Configuring Service(id=Default Transaction Manager,
> > type=TransactionManager, provider-id=Default Transaction Manager)
> > ene 14, 2021 1:08:59 PM org.apache.openejb.util.OptionsLog info
> > INFORMACI�N: Using 'openejb.system.apps=false'
> > ene 14, 2021 1:08:59 PM org.apache.openejb.util.OptionsLog info
> > INFORMACI�N: Using 'openejb.deployments.classpath=false'
> > ene 14, 2021 1:08:59 PM org.apache.openejb.assembler.classic.Assembler
> > createRecipe
> > INFORMACI�N: Creating TransactionManager(id=Default Transaction Manager)
> > ene 14, 2021 1:08:59 PM org.apache.openejb.assembler.classic.Assembler
> > createRecipe
> > INFORMACI�N: Creating SecurityService(id=Tomcat Security Service)
> > ene 14, 2021 1:08:59 PM org.apache.openejb.util.OptionsLog info
> > INFORMACI�N: Using 'openejb.servicemanager.enabled=false'
> > ene 14, 2021 1:09:00 PM org.apache.openejb.util.JarExtractor extract
> > INFORMACI�N: Extracting jar:
> >
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple.war
> > ene 14, 2021 1:09:00 PM org.apache.openejb.util.JarExtractor extract
> > INFORMACI�N: Extracted path:
> >
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple
> > ene 14, 2021 1:09:00 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> > deployWebApps
> > INFORMACI�N: using default host: localhost
> > ene 14, 2021 1:09:00 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> init
> > INFORMACI�N: ------------------------- localhost -> /tomee-simple
> > ene 14, 2021 1:09:00 PM org.apache.openejb.util.OptionsLog info
> > INFORMACI�N: Using
> >
> 'openejb.session.manager=org.apache.tomee.catalina.session.QuickSessionManager'
> > ene 14, 2021 1:09:00 PM org.apache.openejb.config.ConfigurationFactory
> > configureApplication
> > INFORMACI�N: Configuring enterprise application:
> >
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.InitEjbDeployments
> deploy
> > INFORMACI�N: Auto-deploying ejb HelloWorldBean:
> > EjbDeployment(deployment-id=HelloWorldBean)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.ConfigurationFactory
> > configureService
> > INFORMACI�N: Configuring Service(id=Default Stateless Container,
> > type=Container, provider-id=Default Stateless Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.AutoConfig
> > createContainer
> > INFORMACI�N: Auto-creating a container for bean HelloWorldBean:
> > Container(type=STATELESS, id=Default Stateless Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > createRecipe
> > INFORMACI�N: Creating Container(id=Default Stateless Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.ConfigurationFactory
> > configureService
> > INFORMACI�N: Configuring Service(id=Default Managed Container,
> > type=Container, provider-id=Default Managed Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.AutoConfig
> > createContainer
> > INFORMACI�N: Auto-creating a container for bean
> > tomee-simple.Comp1810970264: Container(type=MANAGED, id=Default Managed
> > Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > createRecipe
> > INFORMACI�N: Creating Container(id=Default Managed Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.core.managed.SimplePassivater
> > init
> > INFORMACI�N: Using directory C:\Users\amartin\AppData\Local\Temp for
> > stateful session passivation
> > ene 14, 2021 1:09:01 PM org.apache.openejb.config.AppInfoBuilder build
> > INFORMACI�N: Enterprise application
> >
> "C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple"
> > loaded.
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > createApplication
> > INFORMACI�N: Assembling app:
> >
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.JndiBuilder
> > bind
> > INFORMACI�N: Jndi(name=HelloWorldBeanLocal) -->
> > Ejb(deployment-id=HelloWorldBean)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.JndiBuilder
> > bind
> > INFORMACI�N:
> >
> Jndi(name=global/tomee-simple/HelloWorldBean!amllado.arquillian.tomee.ejb.HelloWorldService)
> > --> Ejb(deployment-id=HelloWorldBean)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.JndiBuilder
> > bind
> > INFORMACI�N: Jndi(name=global/tomee-simple/HelloWorldBean) -->
> > Ejb(deployment-id=HelloWorldBean)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.cdi.CdiBuilder initSingleton
> > INFORMACI�N: Existing thread singleton service in SystemInstance():
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl@27d5a580
> > ene 14, 2021 1:09:01 PM org.apache.openejb.cdi.ManagedSecurityService
> > <init>
> > INFORMACI�N: Some Principal APIs could not be loaded:
> > org.eclipse.microprofile.jwt.JsonWebToken out of
> > org.eclipse.microprofile.jwt.JsonWebToken not found
> > ene 14, 2021 1:09:01 PM org.apache.openejb.cdi.OpenEJBLifecycle
> > startApplication
> > INFORMACI�N: OpenWebBeans Container is starting...
> > ene 14, 2021 1:09:01 PM org.apache.webbeans.plugins.PluginLoader startUp
> > INFORMACI�N: Adding OpenWebBeansPlugin : [CdiPlugin]
> > ene 14, 2021 1:09:01 PM org.apache.webbeans.config.BeansDeployer
> > validateInjectionPoints
> > INFORMACI�N: All injection points were validated successfully.
> > ene 14, 2021 1:09:01 PM org.apache.openejb.cdi.OpenEJBLifecycle
> > startApplication
> > INFORMACI�N: OpenWebBeans Container has started, it took 302 ms.
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > startEjbs
> > INFORMACI�N: Created Ejb(deployment-id=HelloWorldBean,
> > ejb-name=HelloWorldBean, container=Default Stateless Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > startEjbs
> > INFORMACI�N: Started Ejb(deployment-id=HelloWorldBean,
> > ejb-name=HelloWorldBean, container=Default Stateless Container)
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > createApplication
> > INFORMACI�N: Deployed
> >
> Application(path=C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple)
> > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.823 sec
> > <<< FAILURE!
> > amllado.arquillian.tomee.test.TestHelloWorldRestController  Time elapsed:
> > 3.823 sec  <<< ERROR!
> > org.jboss.arquillian.container.spi.client.container.DeploymentException:
> > Unable to deploy
> > at
> >
> org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.deploy(EmbeddedTomEEContainer.java:197)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
> > at
> >
> org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
> > at
> >
> org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
> > at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239)
> > at
> >
> org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
> > at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> > at
> >
> org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85)
> > at
> >
> org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
> > at
> >
> org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96)
> > at
> >
> org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143)
> > at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
> > at
> >
> org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87)
> > at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:202)
> > at
> org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:431)
> > at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:55)
> > at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:219)
> > at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
> > at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:167)
> > at
> >
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
> > at
> >
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
> > at
> >
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:498)
> > at
> >
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> > at
> >
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> > at
> >
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> > at
> >
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> > at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> > Caused by: org.apache.openejb.OpenEJBRuntimeException:
> > java.lang.IllegalStateException: Error starting child
> > at
> >
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:58)
> > at org.apache.tomee.embedded.Container.deploy(Container.java:883)
> > at org.apache.tomee.embedded.Container.deploy(Container.java:869)
> > at
> >
> org.apache.openejb.arquillian.embedded.EmbeddedTomEEContainer.deploy(EmbeddedTomEEContainer.java:173)
> > ... 94 more
> > Caused by: java.lang.IllegalStateException: Error starting child
> > at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
> > at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
> > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWar(TomcatWebAppBuilder.java:658)
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps(TomcatWebAppBuilder.java:598)
> > at
> >
> org.apache.tomee.catalina.deployment.TomcatWebappDeployer.deploy(TomcatWebappDeployer.java:47)
> > ... 97 more
> > Caused by: org.apache.catalina.LifecycleException: Failed to start
> > component
> >
> [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/tomee-simple]]
> > at
> >
> org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
> > at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
> > ... 102 more
> > Caused by: javax.el.ELException: Unable to find ExpressionFactory of type
> > [# Licensed to the Apache Software Foundation (ASF) under one or more]
> > at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:152)
> > at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:91)
> > at
> >
> org.apache.jasper.runtime.JspApplicationContextImpl.<init>(JspApplicationContextImpl.java:49)
> > at
> >
> org.apache.jasper.runtime.JspApplicationContextImpl.getInstance(JspApplicationContextImpl.java:78)
> > at
> >
> org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:216)
> > at
> >
> org.apache.openejb.cdi.OpenEJBLifecycle.setJspELFactory(OpenEJBLifecycle.java:420)
> > at
> >
> org.apache.openejb.cdi.OpenEJBLifecycle.initializeServletContext(OpenEJBLifecycle.java:387)
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1475)
> > at
> >
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1131)
> > at
> >
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
> > at
> >
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> > at
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5052)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> > ... 103 more
> > Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache
> > Software Foundation (ASF) under one or more
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
> > at
> >
> org.apache.tomee.catalina.TomEEWebappClassLoader.loadClass(TomEEWebappClassLoader.java:209)
> > at
> >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
> > at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:145)
> > ... 115 more
> >
> > ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol stop
> > INFORMACI�N: Stopping ProtocolHandler ["http-nio-20002"]
> > ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol pause
> > INFORMACI�N: Pausing ProtocolHandler ["http-nio-20002"]
> > ene 14, 2021 1:09:01 PM org.apache.catalina.core.StandardService
> > stopInternal
> > INFORMACI�N: Stopping service [Tomcat]
> > ene 14, 2021 1:09:01 PM org.apache.openejb.assembler.classic.Assembler
> > destroyApplication
> > INFORMACI�N: Undeploying app:
> >
> C:\Users\amartin\AppData\Local\Temp\arquillian-tomee-app-working-dir\0\tomee-simple
> > ene 14, 2021 1:09:01 PM org.apache.coyote.AbstractProtocol destroy
> > INFORMACI�N: Destroying ProtocolHandler ["http-nio-20002"]
> >
> > Results :
> >
> > Tests in error:
> >   amllado.arquillian.tomee.test.TestHelloWorldRestController: Unable to
> > deploy
> >
> > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> >
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time:  6.815 s
> > [INFO] Finished at: 2021-01-14T13:09:01+01:00
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)
> > on project tomee-simple: There are test failures.
> > [ERROR]
> > [ERROR] Please refer to
> >
> C:\DESARROLLO\WORKSPACE\amartin\eclipse\tomee-simple\target\surefire-reports
> > for the individual test results.
> > [ERROR] -> [Help 1]
> > [ERROR]
> > [ERROR] To see the full stack trace of the errors, re-run Maven with the
> > -e switch.
> > [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> > [ERROR]
> > [ERROR] For more information about the errors and possible solutions,
> > please read the following articles:
> > [ERROR] [Help 1]
> > http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> >
> > I have attached my POC project to this mails if you want to reproduce
> this
> > error.
> >
> > Do you want me to submit a complete bug report via
> > http://issues.apache.org/jira/browse/TOMEE? I would be glad to do so,
> but
> > it seems I can't create issues.
> > As I said before, I hope this can help anyone that has the same problems
> > :-)
> >
> >
> > Nevertheless, thank you for this project, people :-)
> > --
> > Arturo Martín Lladó
> >
> >
> > El lun, 4 ene 2021 a las 0:48, Cesar Hernandez (<cesarguate@gmail.com>)
> > escribió:
> >
> >> Hi Arturo,
> >>
> >> I couldn't find an exact example to cover your particular scenario. The
> >> one
> >> I found that uses the Tomcat realm for users, password, and roles
> >> was: Simple Remote Tomcat Users:
> >>
> >>
> https://github.com/apache/tomee/tree/master/examples/simple-remote-tomcatusers
> >>
> >> As for the arquillian properties, give it a try to a format similar to
> the
> >> following,:
> >>
> >> <property name="roles">admin/user123</property>
> >> <property name="users">user123/secretpassword</property>
> >>
> >>
> >> El jue, 31 dic 2020 a las 2:40, Arturo Martín Lladó (<
> >> arturo.martin.llado@gmail.com>) escribió:
> >>
> >> > Hi, list -
> >> >
> >> > I've been trying to create a test for a role protected JAX-RS service
> >> that
> >> > invokes as well a role protected EJB.
> >> > In order to achieve this goal, I decided to look at the TomEE
> Arquillian
> >> > examples using the arquillian-tomee-embedded Maven artifact.
> >> > Long story short: I don't see in any arquillian.xml file of the
> examples
> >> > nothing related with setting user & roles.
> >> > I see this in the documentation for the Arquillian TomEE container (
> >> >
> >>
> http://tomee.apache.org/latest/docs/developer/testing/arquillian/index.html
> >> > ):
> >> >
> >> > users | a map of users (properties syntax)
> >> > roles | user roles (properties syntax)
> >> >
> >> > Is it possible to see any example of this two properties being used in
> >> an
> >> > arquillian.xml file?
> >> >
> >> > Happy new year, btw :-)
> >> >
> >> > --
> >> > Arturo Martín Lladó
> >> >
> >>
> >>
> >> --
> >> Atentamente:
> >> César Hernández.
> >>
> >
>
> --
> Atentamente:
> César Hernández.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message