mangstadt / biweekly

biweekly is an iCalendar library written in Java.
BSD 2-Clause "Simplified" License
323 stars 44 forks source link

The compatible with outlook email clients hosting of ICS files for the time zones is no longer available #76

Closed Stooge7 closed 7 years ago

Stooge7 commented 7 years ago

BEFORE: https://web.archive.org/web/20130811152006/http://www.tzurl.org/zoneinfo-outlook/Europe/

AFTER: http://www.tzurl.org/zoneinfo-outlook/Europe/

The following code throws NullPointerException:

boolean compatibleWithOutlookEmailClients = false; TimezoneAssignment brussels = TimezoneAssignment.download(TimeZone.getTimeZone(TIME_ZONE), compatibleWithOutlookEmailClients);

mangstadt commented 7 years ago

Yikes, thanks for letting me know.

I cannot reproduce the issue you are having with the code you posted. Can you post the stacktrace?

Stooge7 commented 7 years ago

Sorry it was late when I wrote this. So it is not NullpointerException but...

    boolean compatibleWithOutlookEmailClients = true;
    TimezoneAssignment brussels =
        TimezoneAssignment.download(TimeZone.getTimeZone('Europe/Brussels'), compatibleWithOutlookEmailClients);

java.lang.IllegalArgumentException: Timezone ID not recognized. at biweekly.io.TzUrlDotOrgGenerator.notFound(TzUrlDotOrgGenerator.java:152) at biweekly.io.TzUrlDotOrgGenerator.generate(TzUrlDotOrgGenerator.java:91) at biweekly.io.TimezoneAssignment.download(TimezoneAssignment.java:100) at com.traxxeo.calendar.Calendar.setTimeZone(Calendar.java:88) at com.traxxeo.calendar.Calendar.createICalendar(Calendar.java:67) at com.traxxeo.servlet.SendCalendarViaEmailServlet.doGet(SendCalendarViaEmailServlet.java:64) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: java.io.FileNotFoundException: Response: '404: Not Found' for url: 'http://www.tzurl.org/zoneinfo-outlook/Europe/Brussels' at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:487) at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConnection.java:37) at java.net.URL.openStream(URL.java:1010) at biweekly.io.TzUrlDotOrgGenerator.getInputStream(TzUrlDotOrgGenerator.java:141) at biweekly.io.TzUrlDotOrgGenerator.generate(TzUrlDotOrgGenerator.java:88) ... 34 more

mangstadt commented 7 years ago

Thanks. Yes, it will throw an IllegalArgumentException because it can't find the appropriate ICS file on the tzurl.org website.

mangstadt commented 7 years ago

Added a note to the Javadocs.

See: 3031b288222b759629acbb0e982fa1642afc825c

Stooge7 commented 7 years ago

Great, do you know if there is a big difference between the outlook one and the other one?

I started to use the other version and it seems to be working (though I need outlook only), till the server owner decides to delete the non outlook version files as well...

I find it strange that the hosting of the ICS files is done on that server and the server doesn't even use SSH.

mangstadt commented 7 years ago

Great, do you know if there is a big difference between the outlook one and the other one?

I don't know what the exact differences are. My cynical assumption is that separate versions of the ICS files had to be created for Outlook because Microsoft does not have the best history of closely adhering to web standards (e.g. Internet Explorer). Maybe tzurl.org deleted many of them because Outlook has improved its ICS file support?

I find it strange that the hosting of the ICS files is done on that server and the server doesn't even use SSH.

I'm open to alternative approaches. My impression is that this website regenerates its timezone definitions on a frequent basis, which means that biweekly will always be using up-to-date definitions. Encryption would be nice I guess, but it's not really crucial since no personal information is being transferred.

krshmbb commented 7 years ago

@Stooge7 A few places mention that Outlook cannot handle RDATE well which is something that zoneinfo-outlook avoids.