Did you import the entire project or just the example? Did IntelliJ load all the dependencies?
It's more likely an issue with IntelliJ because our build looks good on the CI. -- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Thu, Nov 17, 2022 at 4:48 PM <[email protected]> wrote: > Yes, I can reproduce it. > > I'm using the Intellij Community edition. > > For example from scratch I let the test run > org.superbiz.stateless.basic.CalculatorTest, all test fail with an errror > "Class Configuration". > > 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) > > Now the cool thing, if I run it outside the IDE on the command line: > mvn surefire:test -Dtest=org.superbiz.stateless.basic.CalculatorTest > > Results : > > Tests run: 5, Failures: 0, Errors: 0, Skipped: 0 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > > The result is awesome. > > I wonder what I have to do to get the Intellij IDE to run? > > Cheers, > Markus > > > > Gesendet: Donnerstag, 17. November 2022 um 16:19 Uhr > > Von: "Jean-Louis Monteiro" <[email protected]> > > An: [email protected] > > Betreff: Re: Investigating EJBContainer.createEJBContainer > > > > Can you reproduce on a github example? > > > > As an alternative, what dependencies do you have? > > Can you copy/paste the java source file (with imports)? > > > > It uses the service loader méchanism so most likely an API version issue > or > > the classpath without openejb-core > > > > -- > > Jean-Louis Monteiro > > http://twitter.com/jlouismonteiro > > http://www.tomitribe.com > > > > > > On Wed, Nov 16, 2022 at 3:27 PM <[email protected]> wrote: > > > > > Hi, > > > > > > I pulled tomee from with branch tomee-8.x. > > > > > > Now when I try to let run a EJBContainer.createEJBContainer() I got > this > > > message: > > > > > > 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 > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native > > > Method) > > > at > > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) > > > at > > > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > at java.base/java.lang.reflect.Method.invoke(Method.java:568) > > > at > > > > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) > > > at > > > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > > > at > > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) > > > at > > > > org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33) > > > 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$3.evaluate(ParentRunner.java:306) > > > at org.junit.runners.ParentRunner.run(ParentRunner.java:413) > > > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > > > at > > > > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) > > > at > > > > com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) > > > at > > > > com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) > > > at > > > > com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) > > > at > > > > com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) > > > at > com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) > > > Caused by: java.lang.ClassNotFoundException: > > > org.apache.openejb.OpenEjbContainer$Provider > > > at > > > > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) > > > at > > > > java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) > > > at > java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) > > > at java.base/java.lang.Class.forName0(Native Method) > > > at java.base/java.lang.Class.forName(Class.java:467) > > > at > > > > org.apache.geronimo.osgi.locator.ProviderLocator.loadClass(ProviderLocator.java:195) > > > at > > > > org.apache.geronimo.osgi.locator.ProviderLocator.locateServiceClasses(ProviderLocator.java:524) > > > at > > > > org.apache.geronimo.osgi.locator.ProviderLocator.getServices(ProviderLocator.java:315) > > > at > > > > javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:54) > > > ... 21 more > > > > > > Has anybody an idea how I can get the code to run? > > > > > > Thanks, > > > Markus > > > > > > > > > > > >
