Re: Comment on CreateCaldavQuery in caldav4j

78 views
Skip to first unread message

cald...@googlecode.com

unread,
Jun 22, 2010, 2:04:53 PM6/22/10
to cald...@googlegroups.com
Comment by mnishiza:

The test code doesn't seem to work with the most recent version(0.5).


For more information:
http://code.google.com/p/caldav4j/wiki/CreateCaldavQuery

cald...@googlecode.com

unread,
Jun 22, 2010, 2:11:04 PM6/22/10
to cald...@googlegroups.com
Comment by robipolli:

the latest version is 0.6. you can get it thru maven.

Peace,
R.

cald...@googlecode.com

unread,
Apr 12, 2011, 7:46:42 PM4/12/11
to cald...@googlegroups.com
Comment by j.emil.o...@gmail.com:

Are these examples a bit outdated perhaps? I can't even find the
QueryGenerator class in the caldav4j-0.7-SNAPSHOT.

Are there any other examples/how-to's available - showing how to connect to
a server and run a simple query?

Roberto Polli

unread,
Apr 13, 2011, 3:34:29 AM4/13/11
to cald...@googlegroups.com

I will look asap. Please check in CaldavCollection.java for examples.

Roberto Polli

unread,
Apr 14, 2011, 4:42:27 AM4/14/11
to caldav4j
Hi Emil,

On Apr 13, 1:46 am, calda...@googlecode.com wrote:
> Are these examples a bit outdated perhaps? I can't even find the  
the right name for the class is GenerateQuery, sorry.

> Are there any other examples/how-to's available - showing how to connect to  
> a server and run a simple query?
There's a BaseCaldavClient class that you can use as an example: you
can look at junits which contains a lot of queries and snippets.

I'll fix the doc asap.

Peace,
R.

cald...@googlecode.com

unread,
Apr 14, 2011, 4:43:58 AM4/14/11
to cald...@googlegroups.com
Comment by robipo...@gmail.com:

Page fixed ;)

For further examples see junits.

Let me know + Peace,
R.

cald...@googlecode.com

unread,
Aug 3, 2011, 6:34:06 AM8/3/11
to cald...@googlegroups.com
Comment by robyni...@gmail.com:

Hi,
there is an arror in example:

qg.setFilter("VEVENT [start;end] : UID==value1 ,
DTSTART==[start,end],DESCRIPTION==UNDEF, SUMMARY!=not my summary,")

i think must be ";" and not ","
from ... DTSTART==[start,end] ...
to ... DTSTART==[start;end] ...

same error is present in
src/main/java/org/osaf/caldav4j/util/GenerateQuery.java


bye

cald...@googlecode.com

unread,
Aug 3, 2011, 6:40:09 AM8/3/11
to cald...@googlegroups.com
Comment by robyni...@gmail.com:

Hi, ther's an error in example:

{{{
qg.setFilter("VEVENT [start;end] : UID==value1 ,
DTSTART==[start,end],DESCRIPTION==UNDEF, SUMMARY!=not my summary,")
}}}

i think must be ";" and not ","
{{{
from ... DTSTART==[start,end] ...
to ... DTSTART==[start;end] ...
}}}

Same error is present in

cald...@googlecode.com

unread,
Aug 3, 2011, 8:28:51 AM8/3/11
to cald...@googlegroups.com
Comment by robipo...@gmail.com:

Example fixed in #328

Roberto Albertini

unread,
Aug 4, 2011, 7:29:56 AM8/4/11
to cald...@googlegroups.com, codesite...@google.com
Grazie! 

cald...@googlecode.com

unread,
Jan 12, 2012, 6:53:51 AM1/12/12
to cald...@googlegroups.com
Comment by micheled...@gmail.com:

Hi, i'm tring to get a list of events inside a calendar (Zimbra) using
caldav4j.
I'm using this code (snippet)

//....
//event inserted correctly at 01/12/2012 (i can see it from a web client)
//....
//now query for interval...

Date now = ICalendarUtils.createDateTime(2012, 0, 1, 0, 0, null, true);
Date end = ICalendarUtils.createDateTime(2022, 0, 1, 0, 0, null, true);
List<Calendar> events = cdm.getEventResources(now, end);

//events size always returns 0, even if ther are many events in the interval

Can you please give me some hints about?
The log (log4j) apparently reported no problems or exception.

Thanks in advance.


Even if i've

Roberto Polli

unread,
Jan 12, 2012, 7:11:01 AM1/12/12
to cald...@googlegroups.com
Hi

2012/1/12 <cald...@googlecode.com>:


> Hi, i'm tring to get a list of events inside a calendar (Zimbra) using
> caldav4j.

Which caldav4j release?

Are you sure Zimbra supports your Caldav REPORT request?

Can you post the request content?

Peace,
R.

cald...@googlecode.com

unread,
Jan 12, 2012, 7:18:00 AM1/12/12
to cald...@googlegroups.com
Comment by robipo...@gmail.com:

Hi Michele,
which caldav4j version are you using?

Please check if zimbra caldav implementation supports date-range queries.

Let me know,
R

cald...@googlecode.com

unread,
Jan 12, 2012, 7:44:13 AM1/12/12
to cald...@googlegroups.com
Comment by micheled...@gmail.com:

Ok, thanks Roberto.
By the way i've checked out (SVN) Caldav4j in December 2011,
but now i'll try with the last version.

Zimbra (caldav impl) seems to supports date-range queries since
5.0.16 version. There was a bug reported here
http://bugzilla.zimbra.com/show_bug.cgi?id=36022
but has been fixed.

I'm testing Caldav4j on Zimbra 6.0.3.

cald...@googlecode.com

unread,
Jan 12, 2012, 10:43:26 AM1/12/12
to cald...@googlegroups.com
Comment by micheled...@gmail.com:

Related to the query problem on Zimbra posted before.

SW versions tested:
- Zimbra 6.0.3
- Version Caldav4j : caldav4j-0.7.jar

In my tests the methods
- getEventResources(..)
- getEventResourcesByMonth(..)
that are defined in class

org.osaf.caldav4j.example.CalDavCollectionManager

return always an empty list,
even if in the time interval selected there are some events.

Any suggestions?
Thanks.
Michele

cald...@googlecode.com

unread,
Jan 6, 2013, 10:56:23 PM1/6/13
to cald...@googlegroups.com
Comment by yoa...@gmail.com:

Any idea if Google Calendar supports such queries with filters? Can't seem
to get it to work.

For more information:
https://code.google.com/p/caldav4j/wiki/CreateCaldavQuery

cald...@googlecode.com

unread,
Jan 7, 2013, 4:33:30 AM1/7/13
to cald...@googlegroups.com
Comment by robipo...@gmail.com:

afaik Google Calendar doesn't support REPORT requests. I think that's
because they are computationally expensive.

This behavior may change, I don't know if and when they're going to
implement that.

You can try issuing plain REPORT requests using curl and confronting the
actual response with the expected one.

Peace,
R.

cald...@googlecode.com

unread,
Oct 23, 2013, 2:11:54 AM10/23/13
to cald...@googlegroups.com
Comment by p.santos...@gmail.com:

Hi,
In CalDAVCollection.java file, getEventResources(, , ,) method is mentioned
as
"@deprecated should be implemented by query"
Could you please explain me about this. Do I need to instantiate my own
GenerateQuery object and call queryCalendars() method ??

cald...@googlecode.com

unread,
Oct 23, 2013, 7:09:26 AM10/23/13
to cald...@googlegroups.com
Comment by robipo...@gmail.com:

Hi p.santoshgupta77. Yes: you should use queryCalendars: it makes your code
simpler.

You're welcome to join the caldav4j mailing list!

Peace,
R.

Roberto Polli

unread,
Oct 23, 2013, 7:14:26 AM10/23/13
to cald...@googlegroups.com, p.santos...@gmail.com
Hi P.

> Comment by p.santos...@gmail.com:
> In CalDAVCollection.java file, getEventResources(, , ,) method is mentioned
> as
> "@deprecated should be implemented by query"
Yes

> Do I need to instantiate my own
> GenerateQuery object and call queryCalendars() method ??
Yes you should use GenerateQuery + queryCalendars.

> Could you please explain me about this.
There should be one clear way to do things. That way is GenerateQuery
+ queryCalendars.

The getEventResources seems nice but it creates problems when your
code grows (I dropped it after using Caldav4j for many months and
replaced it with the new design).

Moreover you can't customize your queries: while GenerateQuery is
really flexible and lets you implement almost every request you need
with a little effort.

Check here for some examples.
https://code.google.com/p/caldav4j/source/browse/tags/0.7/src/test/java/org/osaf/caldav4j/CalDAVCollectionTest.java


Peace,
R.


2013/10/23 <cald...@googlecode.com>:

cald...@googlecode.com

unread,
Oct 24, 2013, 6:07:26 AM10/24/13
to cald...@googlegroups.com
Comment by p.santos...@gmail.com:

Hi R,
Thanks for the response.
when I call enableSimpleCache() to create cache object I am getting the
following error.

10-24 07:04:48.923: W/System.err(11219): net.sf.ehcache.CacheException:
java.lang.AssertionError: No net.sf.ehcache.EhcacheInit services found
10-24 07:04:48.933: W/System.err(11219): at
net.sf.ehcache.LibraryInit.init(LibraryInit.java:55)
10-24 07:04:48.943: W/System.err(11219): at
net.sf.ehcache.CacheManager.init(CacheManager.java:381)
10-24 07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager.<init>(CacheManager.java:266)
10-24 07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1082)
10-24 07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager.newInstance(CacheManager.java:858)
10-24 07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager.create(CacheManager.java:839)
10-24 07:04:48.963: W/System.err(11219): at
org.osaf.caldav4j.cache.EhCacheResourceCache.createSimpleCache(EhCacheResourceCache.java:85)
10-24 07:04:48.963: W/System.err(11219): at
org.osaf.caldav4j.CalDAVCalendarCollectionBase.enableSimpleCache(CalDAVCalendarCollectionBase.java:317)

Could you please help me, whats wrong with it.

Regards
Santosh

cald...@googlecode.com

unread,
Oct 24, 2013, 6:08:57 AM10/24/13
to cald...@googlegroups.com
Comment by p.santos...@gmail.com:

Hi R, Thanks for the response. when I call enableSimpleCache() to create
cache object I am getting the following error.

10-24 07:04:48.923: W/System.err(11219): net.sf.ehcache.CacheException?:
java.lang.AssertionError?: No net.sf.ehcache.EhcacheInit? services found
10-24 07:04:48.933: W/System.err(11219): at
net.sf.ehcache.LibraryInit?.init(LibraryInit?.java:55) 10-24 07:04:48.943:
W/System.err(11219): at
net.sf.ehcache.CacheManager?.init(CacheManager?.java:381) 10-24
07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager?.<init>(CacheManager?.java:266) 10-24
07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager?.newInstance(CacheManager?.java:1082) 10-24
07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager?.newInstance(CacheManager?.java:858) 10-24
07:04:48.953: W/System.err(11219): at
net.sf.ehcache.CacheManager?.create(CacheManager?.java:839) 10-24
07:04:48.963: W/System.err(11219): at
org.osaf.caldav4j.cache.EhCacheResourceCache?.createSimpleCache(EhCacheResourceCache?.java:85)
Reply all
Reply to author
Forward
0 new messages