UnsatisfiedResolutionException for java.time.Clock

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

UnsatisfiedResolutionException for java.time.Clock

Chris Owens
I'm getting UnsatisfiedResolutionException when I try to @Inject java.time.Clock.

Is the container supposed to be providing an instance, or do I need to provide one myself?

at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:327)
	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:189)
	at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:41)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:914)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:718)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UnsatisfiedResolutionException for java.time.Clock

jgallimore
I don't know if that's a new feature in a newer version of CDI, but I don't
think you can do that in EE7. I'd try creating a CDI producer to inject
that.

Hope that is some help.

Jon

On 26 Jul 2017 7:23 pm, "Chris Owens" <[hidden email]> wrote:

> I'm getting UnsatisfiedResolutionException when I try to @Inject
> java.time.Clock.
>
> Is the container supposed to be providing an instance, or do I need to
> provide one myself?
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/
> UnsatisfiedResolutionException-for-java-time-Clock-tp4682324.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UnsatisfiedResolutionException for java.time.Clock

Chris Owens
It works fine with a CDI producer... I was just surprised that there wasn't already an injectable instance in the container
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: UnsatisfiedResolutionException for java.time.Clock

Romain Manni-Bucau
In reply to this post by jgallimore
Not a feature in ee8 as well i think. Would at least need a qualifier to
know which factory the container would use.

Le 26 juil. 2017 21:11, "Jonathan Gallimore" <[hidden email]>
a écrit :

> I don't know if that's a new feature in a newer version of CDI, but I don't
> think you can do that in EE7. I'd try creating a CDI producer to inject
> that.
>
> Hope that is some help.
>
> Jon
>
> On 26 Jul 2017 7:23 pm, "Chris Owens" <[hidden email]>
> wrote:
>
> > I'm getting UnsatisfiedResolutionException when I try to @Inject
> > java.time.Clock.
> >
> > Is the container supposed to be providing an instance, or do I need to
> > provide one myself?
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.n4.nabble.com/
> > UnsatisfiedResolutionException-for-java-time-Clock-tp4682324.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
Loading...