MicroProfile Integration in Plus and Plume

classic Classic list List threaded Threaded
156 messages Options
1234 ... 8
Reply | Threaded
Open this post in threaded view
|

MicroProfile Integration in Plus and Plume

Roberto Cortez
Hi folks,

I’ve been looking a lot into some of the issues we have found with MP integration in Plus and Plumed
https://jira.apache.org/jira/browse/TOMEE-2408 <https://jira.apache.org/jira/browse/TOMEE-2408>

I came up with a specific TomEE extension to run before any other MP stuff to try to add some rules that will allow to enable / disable MP services. Here is a skeleton implementation:
https://github.com/apache/tomee/pull/304 <https://github.com/apache/tomee/pull/304>

One of the issues is that Health, Metrics and OpenAPI expose REST endpoints. These are scanned and added to the web apps before any CDI scanning takes place, so we need to do a trick to access the Web App deployment and remove the endpoints if they are not needed (when there are not other REST endpoints available or no MP specific features are being used).

Another case, is some MP feature can be deployed only with interceptors without any additional REST endpoints (except the default ones) and we need to figure those cases as well. For what I can tell, I was not able to find any CDI API that allows us to get that information easily, so we may need to check each interceptor annotation on CDI scanning.

I’m not completely sure if this is the right direction, so I would like to have some feedback on this.

I’ll probably propose to have a more pragmatic approach regarding Plus and Plume. Just add a configuration to enable / disable MP scanning completely. This will be off by default, and you have to change a setting to turn it on. I think we still need to be more smart about the deployment and have the server figure out when its needed or not. On the other hand, I also think with a configuration it will be safer for existing environment, so we don’t break someone else deployment with a scenario that we didn’t foresee.

Any thoughts?

Cheers,
Roberto
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
Hi, I tested with the last TomEE Plus snapshot which had MP in it and #304
below.  Apart from having to add a line to exclusions.list for one item, it
seems to work fine.  Without the exclusions.list entry, I get the following
because @Provider is being used in our class (think this could be removed
though):

“at java.base/java.lang.Class.newInstance(Class.java:571)
                at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.newProvider(CxfRsHttpListener.java:528)
                at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.providers(CxfRsHttpListener.java:463)
                at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.configureFactory(CxfRsHttpListener.java:1012)
                at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:579)”


Is having MP scanning disabled by default and enabling it on a
per-application basis possible?

Thank you




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Hi,

Thank you for the feedback.

We actually had to remove MP from Plus and Plume because we found some other issues. See here:
https://jira.apache.org/jira/browse/TOMEE-2407 <https://jira.apache.org/jira/browse/TOMEE-2407>

It is possible to disable it, but I don’t think it is possible to enable it per application. Is this is something that you would like to add, please add a sub-task issue in https://jira.apache.org/jira/browse/TOMEE-2407 <https://jira.apache.org/jira/browse/TOMEE-2407>

Cheers,
Roberto

> On 31 Dec 2018, at 11:19, j4fm <[hidden email]> wrote:
>
> Hi, I tested with the last TomEE Plus snapshot which had MP in it and #304
> below.  Apart from having to add a line to exclusions.list for one item, it
> seems to work fine.  Without the exclusions.list entry, I get the following
> because @Provider is being used in our class (think this could be removed
> though):
>
> “at java.base/java.lang.Class.newInstance(Class.java:571)
>                at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.newProvider(CxfRsHttpListener.java:528)
>                at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.providers(CxfRsHttpListener.java:463)
>                at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.configureFactory(CxfRsHttpListener.java:1012)
>                at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:579)”
>
>
> Is having MP scanning disabled by default and enabling it on a
> per-application basis possible?
>
> Thank you
>
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
Hi again Roberto, I tested this again today and actually I hadn't noticed
that another ticket commented out MP jars from being added to the Plus
webapp, just like you said.

Now if I pull in 304 there our some out of date package references (import
org.apache.geronimo.microprofile.impl.health.jaxrs.HealthChecksEndpoint;
import org.apache.geronimo.microprofile.metrics.jaxrs.MetricsEndpoints;) and
after adding MP jars back in there are null reference exceptions.

Have you had any more thoughts on the direction for solving this?  Enabled
per-application is one approach but I'm happy either way if we can have
non-MP apps and MP apps run in the same TomEE Plus.

Thank you



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Hi James,

Thank for your email. I did had some thought and I was trying to track them here:
https://jira.apache.org/jira/browse/TOMEE-2407 <https://jira.apache.org/jira/browse/TOMEE-2407>

Would you like to contribute to it?

Cheers,
Roberto

> On 15 Jan 2019, at 10:24, j4fm <[hidden email]> wrote:
>
> Hi again Roberto, I tested this again today and actually I hadn't noticed
> that another ticket commented out MP jars from being added to the Plus
> webapp, just like you said.
>
> Now if I pull in 304 there our some out of date package references (import
> org.apache.geronimo.microprofile.impl.health.jaxrs.HealthChecksEndpoint;
> import org.apache.geronimo.microprofile.metrics.jaxrs.MetricsEndpoints;) and
> after adding MP jars back in there are null reference exceptions.
>
> Have you had any more thoughts on the direction for solving this?  Enabled
> per-application is one approach but I'm happy either way if we can have
> non-MP apps and MP apps run in the same TomEE Plus.
>
> Thank you
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
Happy to contribute if/where I can, for sure - how?

If the enabling/disabling of MP scans per-context can be done automatically
- great. If it's a manual configuration that's workable but automatic is
obviously preferred - then things would just work.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Yes, I think I would prefer automatic of course. There might be some challenges to be able to achieve that.

When I was working on it, I was stuck into a point where I was not able to determine if metrics are needed due to their use of interceptors and they are set up with CDI. I probably need to spent some more time looking into it.

> On 16 Jan 2019, at 15:00, j4fm <[hidden email]> wrote:
>
> Happy to contribute if/where I can, for sure - how?
>
> If the enabling/disabling of MP scans per-context can be done automatically
> - great. If it's a manual configuration that's workable but automatic is
> obviously preferred - then things would just work.
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

David Blevins-2
Zooming back to the start of this thread, can you give some insight on why anyone would want to disable MicroProfile support?  I.e. some perspective on the cost we're attempting to avoid so we can evaluate that against the cost of disabling/enabling.


--
David Blevins
http://twitter.com/dblevins
http://www.tomitribe.com

> On Jan 16, 2019, at 8:00 AM, Roberto Cortez <[hidden email]> wrote:
>
> Yes, I think I would prefer automatic of course. There might be some challenges to be able to achieve that.
>
> When I was working on it, I was stuck into a point where I was not able to determine if metrics are needed due to their use of interceptors and they are set up with CDI. I probably need to spent some more time looking into it.
>
>> On 16 Jan 2019, at 15:00, j4fm <[hidden email]> wrote:
>>
>> Happy to contribute if/where I can, for sure - how?
>>
>> If the enabling/disabling of MP scans per-context can be done automatically
>> - great. If it's a manual configuration that's workable but automatic is
>> obviously preferred - then things would just work.
>>
>>
>>
>> --
>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
There are cases where MP stuff may clash with older apps, and we caught a couple of these cases in TomEE TCK.

For instance if a webapp is only using servlets and is exposing a servlet in the context root, because MP expose predefined REST endpoints for health, metrics, openapi, etc. the REST Service deployer is going to override the context root to be able to deploy the MP specific endpoints and the original servlet path is not going to work anymore, so you get a 404.

Another case is if you already have any kind of servlet or rest endpoint with the same path of the specific MP endpoints.

So the point is, there is a risk that when you upgrade to a TomEE version with MP support your older apps may clash and they will break and I believe no one would want that :)

Cheers,
Roberto

> On 16 Jan 2019, at 17:46, David Blevins <[hidden email]> wrote:
>
> Zooming back to the start of this thread, can you give some insight on why anyone would want to disable MicroProfile support?  I.e. some perspective on the cost we're attempting to avoid so we can evaluate that against the cost of disabling/enabling.
>
>
> --
> David Blevins
> http://twitter.com/dblevins
> http://www.tomitribe.com
>
>> On Jan 16, 2019, at 8:00 AM, Roberto Cortez <[hidden email]> wrote:
>>
>> Yes, I think I would prefer automatic of course. There might be some challenges to be able to achieve that.
>>
>> When I was working on it, I was stuck into a point where I was not able to determine if metrics are needed due to their use of interceptors and they are set up with CDI. I probably need to spent some more time looking into it.
>>
>>> On 16 Jan 2019, at 15:00, j4fm <[hidden email]> wrote:
>>>
>>> Happy to contribute if/where I can, for sure - how?
>>>
>>> If the enabling/disabling of MP scans per-context can be done automatically
>>> - great. If it's a manual configuration that's workable but automatic is
>>> obviously preferred - then things would just work.
>>>
>>>
>>>
>>> --
>>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
I'm not sure the problem I'm having with our existing apps when MP is in Plus
is related to the root context.  This is with pull304 you wrote.  This
problem doesn't happen with only a simply basic war file in TomEE only when
our apps are in (class loader and war files).

The traditional contexts load fine without MP and MP runs fine with a hello
world war.

I've checked again and have examples of the exceptions (lots of them but all
look they are all of the same type of issue)...


SEVERE [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI
Beans module deployment failed
 org.apache.webbeans.exception.WebBeansDeploymentException: Error while
sending SystemEvent to a CDI Extension!
org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
 at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
 at
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
 at
org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
 at
org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
 at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
 at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
 at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
 at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
 at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
 at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
 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:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
 at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
 at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
 at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
 at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
 at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
 at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.webbeans.exception.WebBeansException:
java.lang.NullPointerException: bean parameter may not be null
 at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
 at
org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
 at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
 ... 53 more
Caused by: java.lang.NullPointerException: bean parameter may not be null
 at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
 at
org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
 at
org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
 at
org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at
org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
 at
org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
 at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
 ... 55 more


17-Jan-2019 19:02:17.989 SEVERE [main]
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal Unable to deploy
collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/anappwar]
 javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
 at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:231)
 at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
 at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
 at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
 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:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
 at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
 at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
 at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
 at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
 at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
 at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: org.apache.openejb.OpenEJBRuntimeException:
org.apache.webbeans.exception.WebBeansDeploymentException: Error while
sending SystemEvent to a CDI Extension!
org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
 at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
 at
org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
 ... 47 more
Caused by: org.apache.webbeans.exception.WebBeansDeploymentException: Error
while sending SystemEvent to a CDI Extension!
org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
 at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
 at
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
 at
org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
 at
org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
 at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
 at
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
 ... 48 more
Caused by: org.apache.webbeans.exception.WebBeansException:
java.lang.NullPointerException: bean parameter may not be null
 at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
 at
org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
 at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
 ... 53 more
Caused by: java.lang.NullPointerException: bean parameter may not be null
 at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
 at
org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
 at
org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
 at
org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
 at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at
org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
 at
org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
 at
org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
 ... 55 more

SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke
ContainerBase.removeChild: destroy:
 org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
attempted ([before_destroy]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/abcdapp]]
in state [STARTING_PREP]
 at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:431)
 at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:317)
 at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:845)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1656)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1636)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1317)
 at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
 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:5007)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
 at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
 at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
 at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
 at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
 at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
 at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
 at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
 at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
 at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
 at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
 at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
 at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
-- More  --




--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Well that is one of the issues.

There are other issues that I’ve seen being thrown by the apps being deployed on the TomEE TCK, but I didn’t focus on them yet. Not sure if they are the same as you are describing here.

Any chance that you can send me a sample that replicates this problem?

Thanks!

Cheers,
Roberto

> On 17 Jan 2019, at 19:16, j4fm <[hidden email]> wrote:
>
> I'm not sure the problem I'm having with our existing apps when MP is in Plus
> is related to the root context.  This is with pull304 you wrote.  This
> problem doesn't happen with only a simply basic war file in TomEE only when
> our apps are in (class loader and war files).
>
> The traditional contexts load fine without MP and MP runs fine with a hello
> world war.
>
> I've checked again and have examples of the exceptions (lots of them but all
> look they are all of the same type of issue)...
>
>
> SEVERE [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI
> Beans module deployment failed
> org.apache.webbeans.exception.WebBeansDeploymentException: Error while
> sending SystemEvent to a CDI Extension!
> org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
> at
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
> at
> org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
> at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
> 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:5007)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
> at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> Caused by: org.apache.webbeans.exception.WebBeansException:
> java.lang.NullPointerException: bean parameter may not be null
> at
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> at
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> at
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> ... 53 more
> Caused by: java.lang.NullPointerException: bean parameter may not be null
> at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
> at
> org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
> at
> org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
> at
> org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
> org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
> at
> org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
> at
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
> ... 55 more
>
>
> 17-Jan-2019 19:02:17.989 SEVERE [main]
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal Unable to deploy
> collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/anappwar]
> javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:231)
> at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:963)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:756)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1308)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
> 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:5007)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
> at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
> Caused by: org.apache.openejb.OpenEJBRuntimeException:
> org.apache.webbeans.exception.WebBeansDeploymentException: Error while
> sending SystemEvent to a CDI Extension!
> org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)
> at
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
> ... 47 more
> Caused by: org.apache.webbeans.exception.WebBeansDeploymentException: Error
> while sending SystemEvent to a CDI Extension!
> org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@2a6b6f4
> at
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:731)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:495)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:490)
> at
> org.apache.webbeans.config.BeansDeployer.fireAfterDeploymentValidationEvent(BeansDeployer.java:870)
> at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:344)
> at
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> ... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansException:
> java.lang.NullPointerException: bean parameter may not be null
> at
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:371)
> at
> org.apache.webbeans.event.NotificationManager.invokeObserverMethod(NotificationManager.java:818)
> at
> org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:714)
> ... 53 more
> Caused by: java.lang.NullPointerException: bean parameter may not be null
> at org.apache.webbeans.util.Asserts.assertNotNull(Asserts.java:52)
> at
> org.apache.webbeans.container.BeanManagerImpl.getReference(BeanManagerImpl.java:727)
> at
> org.apache.webbeans.container.InjectableBeanManager.getReference(InjectableBeanManager.java:180)
> at
> org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension.afterValidation(GeronimoOpenAPIExtension.java:113)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
> org.apache.webbeans.event.ObserverMethodImpl.invoke(ObserverMethodImpl.java:404)
> at
> org.apache.webbeans.event.ContainerEventObserverMethodImpl.invoke(ContainerEventObserverMethodImpl.java:85)
> at
> org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:365)
> ... 55 more
>
> SEVERE [main] jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> ContainerBase.removeChild: destroy:
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
> attempted ([before_destroy]) for component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/abcdapp]]
> in state [STARTING_PREP]
> at
> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:431)
> at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:317)
> at
> org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:845)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1656)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.undeploy(TomcatWebAppBuilder.java:1636)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1317)
> at
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1130)
> 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:5007)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
> at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
> at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
> at
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
> at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
> at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
> at
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
> at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
> at
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
> at
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
> at
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> at
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
> -- More  --
>
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
They are not small or independent but I will see what I can put together.

This looks related...

http://tomee-openejb.979440.n4.nabble.com/PRIVATE-ApplicationComposer-7-0-0-and-Jars-td4677302.html



"In CdiScanner I can see the classes in BeanInfo beans.

But just after the following condition is true :

} else if (ejbJar.webapp && !appInfo.webAppAlone) {
    continue;
}

(CdiScanner: 118)
So the classes are not take in care..."



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Ok thanks. I’ll try to investigate further.

> On 17 Jan 2019, at 21:08, j4fm <[hidden email]> wrote:
>
> They are not small or independent but I will see what I can put together.
>
> This looks related...
>
> http://tomee-openejb.979440.n4.nabble.com/PRIVATE-ApplicationComposer-7-0-0-and-Jars-td4677302.html
>
>
>
> "In CdiScanner I can see the classes in BeanInfo beans.
>
> But just after the following condition is true :
>
> } else if (ejbJar.webapp && !appInfo.webAppAlone) {
>    continue;
> }
>
> (CdiScanner: 118)
> So the classes are not take in care..."
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Hey,

I was wondering how are you deploying your apps. Are you using EAR files by any chance?

Cheers,
Roberto

> On 18 Jan 2019, at 10:42, Roberto Cortez <[hidden email]> wrote:
>
> Ok thanks. I’ll try to investigate further.
>
>> On 17 Jan 2019, at 21:08, j4fm <[hidden email]> wrote:
>>
>> They are not small or independent but I will see what I can put together.
>>
>> This looks related...
>>
>> http://tomee-openejb.979440.n4.nabble.com/PRIVATE-ApplicationComposer-7-0-0-and-Jars-td4677302.html
>>
>>
>>
>> "In CdiScanner I can see the classes in BeanInfo beans.
>>
>> But just after the following condition is true :
>>
>> } else if (ejbJar.webapp && !appInfo.webAppAlone) {
>>   continue;
>> }
>>
>> (CdiScanner: 118)
>> So the classes are not take in care..."
>>
>>
>>
>> --
>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
I think I may have found a solution. I’m not completely sure if the fix is safe and won’t break something else. Running some tests and hopefully if everything is ok, I’ll have the fix and merge by tomorrow.

> On 21 Jan 2019, at 14:33, Roberto Cortez <[hidden email]> wrote:
>
> Hey,
>
> I was wondering how are you deploying your apps. Are you using EAR files by any chance?
>
> Cheers,
> Roberto
>
>> On 18 Jan 2019, at 10:42, Roberto Cortez <[hidden email]> wrote:
>>
>> Ok thanks. I’ll try to investigate further.
>>
>>> On 17 Jan 2019, at 21:08, j4fm <[hidden email]> wrote:
>>>
>>> They are not small or independent but I will see what I can put together.
>>>
>>> This looks related...
>>>
>>> http://tomee-openejb.979440.n4.nabble.com/PRIVATE-ApplicationComposer-7-0-0-and-Jars-td4677302.html
>>>
>>>
>>>
>>> "In CdiScanner I can see the classes in BeanInfo beans.
>>>
>>> But just after the following condition is true :
>>>
>>> } else if (ejbJar.webapp && !appInfo.webAppAlone) {
>>>  continue;
>>> }
>>>
>>> (CdiScanner: 118)
>>> So the classes are not take in care..."
>>>
>>>
>>>
>>> --
>>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
Hi, sorry for the delay.  Both WAR files and also external webbase context
with a custom class loader.  Interesting, happy to test.  Thank you



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
Hum… could you give more details about your custom class loader?

Right now, I have a failing test that seems caused by me change. Trying to figure it out.

> On 21 Jan 2019, at 23:46, j4fm <[hidden email]> wrote:
>
> Hi, sorry for the delay.  Both WAR files and also external webbase context
> with a custom class loader.  Interesting, happy to test.  Thank you
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
In the webapps, there is a loader specified in the context.xml.  This
singleton loader ensures that native libraries used by the webapps are
ultimately only loaded once but only the specific webapps load them rather
than affecting all webapps on TomEE.





--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

j4fm
Okay, so digging into this loader, there is this line:

SystemInstance.get().setComponent(ParentClassLoaderFinder.class, fallback ->
MyClassLoader._getOrCreateInstance(parent));

Commenting it out seems to make it play nicely with MP but brakes the class
loading of the webapps when openejb's scanning annotations.

So am currently looking at other solutions to make both work.  I think this
is something that can be solved but am suspecting there is a chance there is
a bug with openejb not using the correct class loaders for the webapps.
Trying some things.

Are you still finding issues with MP in Plus with the test cases failing?
Is there anything else blocking having MP in Plus for M2 release?  I don't
want to become a blocker for that, will know today if this class loading
issue can be solved or a bug.  It would be really great if M2 could have MP
in Plus but understand how tight it is.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html
Reply | Threaded
Open this post in threaded view
|

Re: MicroProfile Integration in Plus and Plume

Roberto Cortez
We introduced a couple of new properties to allows additional jars to be added in the DeploymentLoader, so they can be scanned.

This was done here:
https://github.com/apache/tomee/commit/021b9ca8d01a78f5b7ee3438f30fd8901ff60d5b <https://github.com/apache/tomee/commit/021b9ca8d01a78f5b7ee3438f30fd8901ff60d5b>

What you probably need to do is have your custom classloader to also load the mp specific libraries, so they can be also scanned.

Yes, I’ve run into multiple other issues. I’m going to send an email about it, next. I think we can make it, we just need to validate if these changes make sense and if they are right.

Thank you,
Roberto

> On 23 Jan 2019, at 10:55, j4fm <[hidden email]> wrote:
>
> Okay, so digging into this loader, there is this line:
>
> SystemInstance.get().setComponent(ParentClassLoaderFinder.class, fallback ->
> MyClassLoader._getOrCreateInstance(parent));
>
> Commenting it out seems to make it play nicely with MP but brakes the class
> loading of the webapps when openejb's scanning annotations.
>
> So am currently looking at other solutions to make both work.  I think this
> is something that can be solved but am suspecting there is a chance there is
> a bug with openejb not using the correct class loaders for the webapps.
> Trying some things.
>
> Are you still finding issues with MP in Plus with the test cases failing?
> Is there anything else blocking having MP in Plus for M2 release?  I don't
> want to become a blocker for that, will know today if this class loading
> issue can be solved or a bug.  It would be really great if M2 could have MP
> in Plus but understand how tight it is.
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Dev-f982480.html

1234 ... 8