You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "John D. Ament" <jo...@apache.org> on 2017/07/08 15:15:02 UTC
More Config Spec updates
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
Re: More Config Spec updates
Posted by Romain Manni-Bucau <rm...@gmail.com>.
2017-07-10 3:22 GMT+02:00 John D. Ament <jo...@apache.org>:
> 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 <st...@yahoo.de> 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 <jo...@apache.org>:
>> >
>> > 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
>>
>>
Re: More Config Spec updates
Posted by "John D. Ament" <jo...@apache.org>.
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 <st...@yahoo.de> 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 <jo...@apache.org>:
> >
> > 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
>
>
Re: More Config Spec updates
Posted by Mark Struberg <st...@yahoo.de>.
According to the CDI spec this should work in my opinion.
LieGrue,
strub
> Am 08.07.2017 um 17:15 schrieb John D. Ament <jo...@apache.org>:
>
> 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