More Config Spec updates

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

More Config Spec updates

John D. Ament
Hey guys

I made some more enhancements within the Geronimo Config impl.  They added three new converter types, all working now.

I downgraded back to OWB 1.7.3 since it looks like they won't be signing JARs for the release.

I have a fix pending for the Weld Arquillian Adapter to handle service loaders in child JARs.  With that in, and a local build, I'm down to three TCK failures on Weld.  All three have to do with the injection of Optional, which I've raised https://issues.jboss.org/browse/WELD-2403 to deal with.

I'm fairly confident this won't work on Weld right now.

John
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More Config Spec updates

Mark Struberg
According to the CDI spec this should work in my opinion.

LieGrue,
strub



> Am 08.07.2017 um 17:15 schrieb John D. Ament <[hidden email]>:
>
> Hey guys
>
> I made some more enhancements within the Geronimo Config impl.  They added three new converter types, all working now.
>
> I downgraded back to OWB 1.7.3 since it looks like they won't be signing JARs for the release.
>
> I have a fix pending for the Weld Arquillian Adapter to handle service loaders in child JARs.  With that in, and a local build, I'm down to three TCK failures on Weld.  All three have to do with the injection of Optional, which I've raised https://issues.jboss.org/browse/WELD-2403 to deal with.
>
> I'm fairly confident this won't work on Weld right now.
>
> John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More Config Spec updates

John D. Ament
Ok, yeah, Optional was only a symptom it seems not the actual problem.

With Weld, if alternative == true and there's no beans of the base type registered, that bean is ignored.  So I changed the ConfigInjectionBean to only mark alternative for provider types.

There's two errors left with Weld.

1. It cannot find the InjectionPoints for a given bean.  I think we should change the behavior so that for each unique key/type combo we're registering a bean, this way we can pass the injection points in for a key.

Tests run: 43, Failures: 2, Errors: 0, Skipped: 1, Time elapsed: 2.05 sec <<< FAILURE! - in TestSuite
can_inject_simple_values_when_defined(org.eclipse.microprofile.config.tck.CDIPlainInjectionTest)  Time elapsed: 0.008 sec  <<< FAILURE!
java.lang.IllegalStateException: Could not retrieve InjectionPoint
at org.apache.geronimo.config.cdi.ConfigExtension$5.create(ConfigExtension.java:200)
at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:676)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:776)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346)
at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71)
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117)

2. I think it may be related.  I suspect because Weld cannot find the injection points, we're getting a NPE

Caused by: java.lang.NullPointerException
at org.apache.geronimo.config.cdi.ConfigExtension.getName(ConfigExtension.java:260)
at org.apache.geronimo.config.cdi.ConfigExtension.lambda$null$2(ConfigExtension.java:136)
at org.apache.geronimo.config.cdi.ConfigExtension$2.create(ConfigExtension.java:165)
at org.apache.geronimo.config.cdi.ConfigExtension$2.create(ConfigExtension.java:162)
at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)

John

On Sat, Jul 8, 2017 at 4:13 PM Mark Struberg <[hidden email]> wrote:
According to the CDI spec this should work in my opinion.

LieGrue,
strub



> Am 08.07.2017 um 17:15 schrieb John D. Ament <[hidden email]>:
>
> Hey guys
>
> I made some more enhancements within the Geronimo Config impl.  They added three new converter types, all working now.
>
> I downgraded back to OWB 1.7.3 since it looks like they won't be signing JARs for the release.
>
> I have a fix pending for the Weld Arquillian Adapter to handle service loaders in child JARs.  With that in, and a local build, I'm down to three TCK failures on Weld.  All three have to do with the injection of Optional, which I've raised https://issues.jboss.org/browse/WELD-2403 to deal with.
>
> I'm fairly confident this won't work on Weld right now.
>
> John

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More Config Spec updates

Romain Manni-Bucau


2017-07-10 3:22 GMT+02:00 John D. Ament <[hidden email]>:
Ok, yeah, Optional was only a symptom it seems not the actual problem.

With Weld, if alternative == true and there's no beans of the base type registered, that bean is ignored.  So I changed the ConfigInjectionBean to only mark alternative for provider types.

There's two errors left with Weld.

1. It cannot find the InjectionPoints for a given bean.  I think we should change the behavior so that for each unique key/type combo we're registering a bean, this way we can pass the injection points in for a key.

Original bean key was that but then you need to make the key binding which has side effects for all people using it so dropped the key and just used the type as key. Also not sure how it related to IP since producer should only be called for injected keys until the lookup is programmatic which is not something we support yet.
 

Tests run: 43, Failures: 2, Errors: 0, Skipped: 1, Time elapsed: 2.05 sec <<< FAILURE! - in TestSuite
can_inject_simple_values_when_defined(org.eclipse.microprofile.config.tck.CDIPlainInjectionTest)  Time elapsed: 0.008 sec  <<< FAILURE!
java.lang.IllegalStateException: Could not retrieve InjectionPoint
at org.apache.geronimo.config.cdi.ConfigExtension$5.create(ConfigExtension.java:200)
at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:676)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:776)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:335)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:346)
at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71)
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117)

2. I think it may be related.  I suspect because Weld cannot find the injection points, we're getting a NPE

Caused by: java.lang.NullPointerException
at org.apache.geronimo.config.cdi.ConfigExtension.getName(ConfigExtension.java:260)
at org.apache.geronimo.config.cdi.ConfigExtension.lambda$null$2(ConfigExtension.java:136)
at org.apache.geronimo.config.cdi.ConfigExtension$2.create(ConfigExtension.java:165)
at org.apache.geronimo.config.cdi.ConfigExtension$2.create(ConfigExtension.java:162)
at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)

Looks so yes. Means we should add a NPE check probably to have a proper exception message.
 

John

On Sat, Jul 8, 2017 at 4:13 PM Mark Struberg <[hidden email]> wrote:
According to the CDI spec this should work in my opinion.

LieGrue,
strub



> Am 08.07.2017 um 17:15 schrieb John D. Ament <[hidden email]>:
>
> Hey guys
>
> I made some more enhancements within the Geronimo Config impl.  They added three new converter types, all working now.
>
> I downgraded back to OWB 1.7.3 since it looks like they won't be signing JARs for the release.
>
> I have a fix pending for the Weld Arquillian Adapter to handle service loaders in child JARs.  With that in, and a local build, I'm down to three TCK failures on Weld.  All three have to do with the injection of Optional, which I've raised https://issues.jboss.org/browse/WELD-2403 to deal with.
>
> I'm fairly confident this won't work on Weld right now.
>
> John


Loading...