Aw: Re: Re: Investigating EJBContainer.createEJBContainer

[email protected]
Newsgroups gmane.comp.java.openejb.user
Message-ID <trinity-a8a41482-4ba8-4afd-bc39-55d9995cd108-1669623984833__12293.6879097082$1669624009$gmane$org@3c-app-webde-bs06>
Hi Jean-Louis,

I cloned the Tomee project from Github:
git clone https://github.com/apache/tomee.git

and then I imported the complete project into Intellij IDEA as a Maven project.

After this I tried to run some test with the EJBContainer the result I mentioned. There is no local change done by myself.

I wonder I'm the only guy who uses Intellij IDEA Community Edition? What are you doing?

Do you have some more information for me about this comment:
"It uses the service loader méchanism so most likely an API version issue or the classpath without openejb-core"

Should I set some system variables etc?

Thanks,
Markus

> Gesendet: Montag, 21. November 2022 um 15:46 Uhr
> Von: "Jean-Louis Monteiro" <[email protected]>
> An: [email protected]
> Betreff: Re: Re: Investigating EJBContainer.createEJBContainer
>
> 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
> > > >
> > > >
> > > >
> > >
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.