Olá,
Estou tentando rodar um exemplo do site da apache:
https://github.com/apache/tomee/tree/042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless
Porém fiz uma alteração por usar o java 8 atualizei o jar para o openejb 7.0.3, depois de colocar todas as dependencias obtive os dados abaixo na console:
INFO - ********************************************************************************
INFO - OpenEJB http://tomee.apache.org/
INFO - Startup: Tue Jun 27 14:18:23 BRT 2017
INFO - Copyright 1999-2017 © Apache OpenEJB Project, All Rights Reserved.
INFO - Version: 7.0.3
INFO - Build date: 20170307
INFO - Build time: 10:02
INFO - ********************************************************************************
INFO - openejb.home = /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless
INFO - openejb.base = /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless
INFO - Created new singletonService org.apache.openejb.cdi.ThreadSingletonServiceImpl@27abe2cd
INFO - Succeeded in installing singleton service
INFO - Using 'javax.ejb.embeddable.EJBContainer=true’
INFO - Cannot find the configuration file [conf/openejb.xml]. Will attempt to create one for the beans deployed.
INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Creating TransactionManager(id=Default Transaction Manager)
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.
INFO - Creating SecurityService(id=Default Security Service)
INFO - Found EjbModule in classpath: /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless/target/classes
INFO - Beginning load: /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless/target/classes
INFO - Configuring enterprise application: /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless
INFO - Auto-deploying ejb CalculatorBean: EjbDeployment(deployment-id=CalculatorBean)
INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean CalculatorBean: Container(type=STATELESS, id=Default Stateless Container)
INFO - Creating Container(id=Default Stateless Container)
INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container)
INFO - Auto-creating a container for bean org.superbiz.stateless.basic.CalculatorTest: Container(type=MANAGED, id=Default Managed Container)
INFO - Creating Container(id=Default Managed Container)
INFO - Using directory /tmp for stateful session passivation
INFO - Enterprise application “/home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless” loaded.
INFO - Assembling app: /home/jloliveira/Downloads/tomee-042d4d9fc647c32ee31c4c7455a4769817564340/examples/simple-stateless
INFO - Jndi(name=“java:global/simple-stateless/CalculatorBean!org.superbiz.stateless.basic.CalculatorBean”)
INFO - Jndi(name=“java:global/simple-stateless/CalculatorBean”)
INFO - Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl@27abe2cd
INFO - OpenWebBeans Container is starting…
INFO - Adding OpenWebBeansPlugin : [CdiPlugin]
INFO - All injection points were validated successfully.
INFO - OpenWebBeans Container has started, it took 88 ms.
E o erro no JUnit
javax.ejb.EJBException: Provider error. No provider found
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:67)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:43)
at org.superbiz.stateless.basic.CalculatorTest.startTheContainer(CalculatorTest.java:38)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: javax.validation.ValidationException: Could not create Configuration.
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:166)
at org.apache.openejb.assembler.classic.ValidatorBuilder.getConfig(ValidatorBuilder.java:154)
at org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:107)
at org.apache.openejb.assembler.classic.ValidatorBuilder.buildFactory(ValidatorBuilder.java:65)
at org.apache.openejb.assembler.classic.LazyValidatorFactory.ensureDelegate(LazyValidatorFactory.java:53)
at org.apache.openejb.assembler.classic.LazyValidatorFactory.getFactory(LazyValidatorFactory.java:62)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:926)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
at org.apache.openejb.OpenEjbContainer$Provider.createEJBContainer(OpenEjbContainer.java:343)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:56)
… 18 more
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:164)
… 27 more
Alguém conseguiria me dar uma luz?
Obrigado.