You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Narahari Lakshminarayana <it...@gmail.com> on 2020/11/28 23:09:58 UTC

Grape annotation issue, pom.xml works

Friends:
Thank you all in advance for your time and attention.

I have the following code that is not working.


Code is tested on Groovy Console.
======================================

@Grapes(
    @Grab(group='org.mnode.ical4j', module='ical4j', version='3.0.20')
)
@Grapes(
    @Grab(group='javax.cache', module='cache-api', version='1.1.1')
)
@Grapes(
    @Grab(group='com.github.ben-manes.caffeine', module='caffeine',
version='2.8.6')
)

import javax.cache.spi.*;
import javax.cache.*;
import javax.cache.configuration.*;
import com.github.benmanes.caffeine.*;

CachingProvider cachingProvider = Caching.getCachingProvider();

I get the following error

javax.cache.CacheException: No CachingProviders have been configured

===================

Not sure what is wrong in the above code.

Please help.

-Narahari

Re: Grape annotation issue, pom.xml works

Posted by "Nelson, Erick" <Er...@hdsupply.com>.
Add an implementation ?


@Grapes([
    @Grab(group='javax.cache', module='cache-api', version='1.1.1'),
    @Grab(group='org.mnode.ical4j', module='ical4j', version='3.0.20'),
    @Grab(group='com.github.ben-manes.caffeine', module='caffeine', version='2.8.6'),
    @Grab('org.jsr107.ri:cache-ri-impl:1.1.1'),
])
import javax.cache.*
import javax.cache.spi.*
import javax.cache.configuration.*
import com.github.benmanes.caffeine.*

CachingProvider cp = Caching.getCachingProvider()
println cp



$ ./test1
org.jsr107.ri.spi.RICachingProvider@53f0a4cb


From: Narahari Lakshminarayana <it...@gmail.com>
Date: Saturday, November 28, 2020 at 3:11 PM
To: users@groovy.apache.org <us...@groovy.apache.org>
Subject: Re: Grape annotation issue, pom.xml works
Tried it with both JDK8 and . JDK 11.

On Sat, Nov 28, 2020 at 6:09 PM Narahari Lakshminarayana <it...@gmail.com>> wrote:
Friends:
Thank you all in advance for your time and attention.

I have the following code that is not working.


Code is tested on Groovy Console.
======================================
@Grapes(
    @Grab(group='org.mnode.ical4j', module='ical4j', version='3.0.20')
)
@Grapes(
    @Grab(group='javax.cache', module='cache-api', version='1.1.1')
)
@Grapes(
    @Grab(group='com.github.ben-manes.caffeine', module='caffeine', version='2.8.6')
)

import javax.cache.spi.*;
import javax.cache.*;
import javax.cache.configuration.*;
import com.github.benmanes.caffeine.*;

CachingProvider cachingProvider = Caching.getCachingProvider();

I get the following error
javax.cache.CacheException: No CachingProviders have been configured

===================

Not sure what is wrong in the above code.

Please help.

-Narahari

Re: Grape annotation issue, pom.xml works

Posted by Narahari Lakshminarayana <it...@gmail.com>.
Tried it with both JDK8 and . JDK 11.

On Sat, Nov 28, 2020 at 6:09 PM Narahari Lakshminarayana <
itsme.narahari@gmail.com> wrote:

> Friends:
> Thank you all in advance for your time and attention.
>
> I have the following code that is not working.
>
>
> Code is tested on Groovy Console.
> ======================================
>
> @Grapes(
>     @Grab(group='org.mnode.ical4j', module='ical4j', version='3.0.20')
> )
> @Grapes(
>     @Grab(group='javax.cache', module='cache-api', version='1.1.1')
> )
> @Grapes(
>     @Grab(group='com.github.ben-manes.caffeine', module='caffeine',
> version='2.8.6')
> )
>
> import javax.cache.spi.*;
> import javax.cache.*;
> import javax.cache.configuration.*;
> import com.github.benmanes.caffeine.*;
>
> CachingProvider cachingProvider = Caching.getCachingProvider();
>
> I get the following error
>
> javax.cache.CacheException: No CachingProviders have been configured
>
> ===================
>
> Not sure what is wrong in the above code.
>
> Please help.
>
> -Narahari
>