• com.google.gdata.util.InvalidEntryException: Bad Request

    By Jidong Zhang 1 decade ago

    It was working find up till yesterday (well, not perfectly because of the DST and location issues), even after my notes was upgraded to 8.5 several days ago. But starting from yesterday, I got such error every time I run it. It looks like the program stopped due the the new repeating entry that was added yesterday because it still works if I create each individual entry. I believe it worked with repeating entries b4. Log is attached below with the repeating entries' name and time hidden. Thank you!

    2009/07/29 15:00:39 INFO GooCalSync v0.919 has started.

    2009/07/29 15:00:40 INFO Start Notes to Google synchronization.

    2009/07/29 15:00:48 ERROR Calendar entry being handled …

    2009/07/29 15:00:48 ERROR ID : 77C4B194F84C98B585257602006728EA

    2009/07/29 15:00:48 ERROR Title : xxxxxxxxxx

    2009/07/29 15:00:48 ERROR Content :

    2009/07/29 15:00:48 ERROR startDateTime : xxxxxxxxxxxx

    2009/07/29 15:00:48 ERROR endDateTime : xxxxxxxxxxx

    2009/07/29 15:00:48 ERROR location :

    2009/07/29 15:00:48 ERROR lastupdated : 2009-07-29T14:46:46-05:00

    2009/07/29 15:00:48 ERROR apptype : 3

    2009/07/29 15:00:48 ERROR frequency : 2

    2009/07/29 15:00:48 ERROR interval : 1

    2009/07/29 15:00:48 ERROR until : 2009-08-18T16:00:00-05:00

    2009/07/29 15:00:48 ERROR com.google.gdata.util.InvalidEntryException: Bad Request

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:503)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:562)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:481)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:460)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:534)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.Service.insert(Service.java:1243)

    2009/07/29 15:00:48 ERROR at com.google.gdata.client.GoogleService.insert(GoogleService.java:561)

    2009/07/29 15:00:48 ERROR at goocalsync.GoogleCalendarDAO.insert(GoogleCalendarDAO.java:76)

    2009/07/29 15:00:48 ERROR at goocalsync.SyncService.executeNotesToGoogle(SyncService.java:42)

    2009/07/29 15:00:48 ERROR at goocalsync.GooCalSync.main(GooCalSync.java:14)

    • Same issue with Repeating Calendar Items

      By Joshua Boyd 1 decade ago

      Mine was working fine until yesterday too. I can't sync at all now since I have repeating meetings (which have been there all along).

      • By Benjamin Plummer 1 decade ago

        I am also having the same problem syncing with repeating meetings.



        Any help would be greatly appreciated



        2009/08/03 11:19:20 DEBUG — Retrieved Notes calendar entry —

        2009/08/03 11:19:20 DEBUG ID : 46C694EFA352934B4A257601007A38E

        6

        2009/08/03 11:19:20 DEBUG Title : xxxxxxxxxxxxxxxx

        2009/08/03 11:19:20 DEBUG Content : Hi,



        xxxxxxxxxxxxxxxxxxx





        2009/08/03 11:19:20 DEBUG startDateTime : 2009-08-12T15:00:00+10:00

        2009/08/03 11:19:20 DEBUG endDateTime : 2009-08-12T16:00:00+10:00

        2009/08/03 11:19:20 DEBUG location : xxxxxx

        .08

        2009/08/03 11:19:20 DEBUG lastupdated : 2009-07-29T09:13:17+10:00

        2009/08/03 11:19:20 DEBUG apptype : 3

        2009/08/03 11:19:20 DEBUG frequency : 2

        2009/08/03 11:19:20 DEBUG interval : 2

        2009/08/03 11:19:20 DEBUG until : 2009-08-26T05:00:00+10:00

        2009/08/03 11:19:20 DEBUG ————————————–

        2009/08/03 11:19:20 DEBUG executing insert

        2009/08/03 11:19:30 ERROR Calendar entry being handled …

        2009/08/03 11:19:30 ERROR ID : 46C694EFA352934B4A257601007A38E

        6

        2009/08/03 11:19:30 ERROR Title : Sxxxxxxxxxxxxx

        2009/08/03 11:19:30 ERROR Content : Hi,

        xxxxxxxxxxx



        2009/08/03 11:19:30 ERROR startDateTime : 2009-08-12T15:00:00+10:00

        2009/08/03 11:19:30 ERROR endDateTime : 2009-08-12T16:00:00+10:00

        2009/08/03 11:19:30 ERROR location : xxxxxxxxxxxxxxxxxx

        .08

        2009/08/03 11:19:30 ERROR lastupdated : 2009-07-29T09:13:17+10:00

        2009/08/03 11:19:30 ERROR apptype : 3

        2009/08/03 11:19:30 ERROR frequency : 2

        2009/08/03 11:19:30 ERROR interval : 2

        2009/08/03 11:19:30 ERROR until : 2009-08-26T05:00:00+10:00

        com.google.gdata.util.InvalidEntryException: Bad Request

        Entry can not contain both gd:when and gd:recurrence elements.


            at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(Htt<br/>
        

        pGDataRequest.java:503)

            at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(G<br/>
        

        oogleGDataRequest.java:562)

            at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGData<br/>
        

        Request.java:481)

            at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataReques<br/>
        

        t.java:460)

            at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRe<br/>
        

        quest.java:534)

            at com.google.gdata.client.Service.insert(Service.java:1243)<br/>
            at com.google.gdata.client.GoogleService.insert(GoogleService.java:561)<br/>
            at goocalsync.GoogleCalendarDAO.insert(GoogleCalendarDAO.java:76)<br/>
            at goocalsync.SyncService.executeNotesToGoogle(SyncService.java:42)<br/>
            at goocalsync.GooCalSync.main(GooCalSync.java:14)<br/>
        

        2009/08/03 11:19:30 ERROR com.google.gdata.util.InvalidEntryException: Bad

        Request

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.http.HttpGDat

        aRequest.handleErrorResponse(HttpGDataRequest.java:503)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.http.GoogleGD

        ataRequest.handleErrorResponse(GoogleGDataRequest.java:562)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.http.HttpGDat

        aRequest.checkResponse(HttpGDataRequest.java:481)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.http.HttpGDat

        aRequest.execute(HttpGDataRequest.java:460)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.http.GoogleGD

        ataRequest.execute(GoogleGDataRequest.java:534)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.Service.inser

        t(Service.java:1243)

        2009/08/03 11:19:30 ERROR at com.google.gdata.client.GoogleService

        .insert(GoogleService.java:561)

    • By Khelben Arunson 1 decade ago

      I think I have a fix for this, I can upload a compiled release when I get home, but if you are java savvy you can edit the GoogleCalendarDAO.java file and move the WHEN creation into an else statement after the if check for recurrance.



      I also think I have a DST fix, at least it works for me. I used TimeZone.getDefault();



      Both fixes will be in the compiled version I upload later, I'll also include source.

      • Fixes for v0.919 - DST & Recurring Meetings

        By Khelben Arunson 1 decade ago

        Working for me now: Repeating Meetings & TimeZone (DST)



        Here's the compiled JAR:

        http://www.mediafire.com/file/ygnnmvkywmf/goocalsync_v919_fixes.zip



        If you prefer the source files, here they are:

        http://www.mediafire.com/file/uhyyyyygggw/goocalsync_v919_fixes_src.zip



        Note the previous JAR was compiled with JDK 1.6 R14 and may not be compatible with earlier versions of Java. I compiled another release that is Java 1.5 compatible, obtain it here:

        http://www.mediafire.com/file/mywtdhgxtty/goocalsync_v919_fixes_JRE5.zip



        Enjoy won't you?



        Note: I did have to reset my sync times in the database and blow away my Google calendar to get the meeting that bombed out to re-appear on my Google calendar.



        After that, all is well.

        • The new compliled JAR gives me the following error

          By Benjamin Plummer 1 decade ago



          C:\GooCalSync2>set gcsnotespath=c:\lotus\notes



          C:\GooCalSync2>set gcsjvmbinpath=c:\program files\java\jre1.5.0_17\bin



          C:\GooCalSync2>set gcsjvmlibpath=c:\program files\java\jre1.5.0_17\lib



          C:\GooCalSync2>set gcspath=c:\goocalsync2



          C:\GooCalSync2>set path=c:\lotus\notes\;c:\program files\java\jre1.5.0_17\bin;C:

          \WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\LSinfo\;C

          :\Program Files\Sybase\Shared\Win32;C:\Program Files\Sybase\SQL Anywhere 7\Win32

          ;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft

          SQL Server\80\Tools\Binn\;C:\Program Files\Windows Imaging\;C:\Program Files\Qu

          ickTime\QTSystem\;C:\Program Files\ActivIdentity\SecureLogin



          C:\GooCalSync2>set classpath=.;;c:\goocalsync2\gdata-core-1.0.jar;c:\goocalsync2

          \gdata-client-1.0.jar;c:\goocalsync2\gdata-calendar-2.0.jar;c:\lotus\notes\Note

          s.jar;c:\goocalsync2\goocalsync.jar



          C:\GooCalSync2>cd c:\goocalsync2



          C:\GooCalSync2>java goocalsync.GooCalSync

          Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version n

          umber in .class file

              at java.lang.ClassLoader.defineClass1(Native Method)<br/>
              at java.lang.ClassLoader.defineClass(Unknown Source)<br/>
              at java.security.SecureClassLoader.defineClass(Unknown Source)<br/>
              at java.net.URLClassLoader.defineClass(Unknown Source)<br/>
              at java.net.URLClassLoader.access$100(Unknown Source)<br/>
              at java.net.URLClassLoader$1.run(Unknown Source)<br/>
              at java.security.AccessController.doPrivileged(Native Method)<br/>
              at java.net.URLClassLoader.findClass(Unknown Source)<br/>
              at java.lang.ClassLoader.loadClass(Unknown Source)<br/>
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)<br/>
              at java.lang.ClassLoader.loadClass(Unknown Source)<br/>
              at java.lang.ClassLoader.loadClassInternal(Unknown Source)<br/>
          



          C:\GooCalSync2>pause

          Press any key to continue . . .

          • Probably my fault...

            By Khelben Arunson 1 decade ago

            I compiled the classes with JDK 1.6 R 14, I'll see if I can compile with a legacy version and that should clear you up.

            • JRE 5 Compatible JAR

              By Khelben Arunson 1 decade ago

              Here, I compiled this for JRE 1.5, tested it with 1.5.0 R 4 - earliest version I had readily available.



              http://www.mediafire.com/file/mywtdhgxtty/goocalsync_v919_fixes_JRE5.zip

              • Better !!! ;-)

                By Phil K 1 decade ago

                It is much better with this version, Thanks.



                But I have been around for a time without seeing it was available.

                Should be better in download section than in a discussion (well both should be better).

          • GooCalNotesSync

            By Takashi YANO 1 decade ago

            I have been inspired by GooCalSync, I created GooCalNotesSync.



            It is a WIN32 application stays on Windows task tray.

            GooCalNotesSync is with installer.

            The basic idea of the sync is:

            Upload the Notes Calendar entries to another Google my calendar.

            Download the Google my calendar to the specified Notes Calendar category.

            It does not update any exsiting your Notes Calendar entries and Google Calendar entries.

            It updates only another Google my calendar and the Notes Calendar entries in the category.



            GooCalNotesSync is ready at http://www4.airnet.ne.jp/tyano/



            GooCalNotesSync

            1.0.0

            2010-05-08

            矢野崇

            YANO Takashi

            takasi.yano@nifty.com



            English description is later:



            ■概要

            ●Lotus NotesカレンダーとGoogleカレンダーを同期するアプリケーションです。



            ■特徴

            ●イントラネット等の中からプロキシ経由でGoogleカレンダーと同期することも出来ます。

            ●タスクトレイに常駐するタイプのアプリケーションです。

            ●Notes→Googleでは、指定のマイカレンダに指定カテゴリ以外のNotesカレンダをコピーします。

            ●Google→Notesでは、指定のマイカレンダを指定のカテゴリにコピーします。



            ■使い方

            ●タスクトレイでアイコンを右クリックしてメニューで機能を実行してください。

            ●定期的に同期したいときは、すでに起動した状態で、コントロールパネル→タスクにスケジュールしてGooCalNotesSync.EXEを起動してください。二番目のインスタンスが最初のインスタンスに同期開始のメッセージを送り同期が始まります。



            ■注意

            ●インストール先は、必ずLotus Notesのインストールフォルダにしてください。

            ●デフォルトで、C:\Program Files\IBM\Lotus\Notesにインストールします。

            ●プロキシ経由で同期する場合、HTTPSだと同期に失敗することがあります。その場合は、設定でHTTPSをオフにしてください。

            ●HTTPSをオフにしても、IDとパスワードのセッションはHTTPSを使います。

            ●Notes→Googleでは、コピーに先立ち、指定のマイカレンダの内容は消去します。

            ●Google→Notesでは、コピーに先立ち、指定のカテゴリのカレンダの内容は消去します。

            ●Notes→Googleで指定するマイカレンダとGoogle→Notesで指定するマイカレンダは同じに出来ません。

            ●GoogleがマスタとなるカレンダエントリをNotes側で変更しても、Google側には反映されません。変更は失われます。

            ●NotesがマスタとなるカレンダエントリをGoogle側で変更しても、Notes側には反映されません。変更は失われます。



            ■事前設定

            ●プロキシ経由で同期する場合は、以下の作業でInternet Explorerのプロキシ設定をWINHTTP APIにインポートしてください。

            ●Windows XPの場合: proxycfg -u<br/>
            ●Windows Vista/Windows 7の場合: netsh winhttp import proxy source=ie<br/>
            

            ●Lotus Notesのファイル→セキュリティ→ユーザーセキュリティ→基本を開き、他のLotus Notesベースのプログラムでパスワードプロンプトを表示しないにチェックを入れてください。

            ●GoogleカレンダーのマイカレンダーにLotus Notesのカレンダーのコピーを置く専用のマイカレンダーを作成してください。


            • Summary

              This application synchronize Lotus Notes Calendar and Google Calendar.


            • Features
            • You can synchronize Google Calendar and Notes Calendar in intranet through proxy.
            • This application stays at Windows task tray.
            • Notes->Google: The Notes Calendar entries are copied to the Google my calendar you specified.
            • Google->Notes: The Google Calendar entries are copied to the Notes Calendar category you specified.


            • How to use
            • Right click on the task tray's icon and execute functions.
            • If you want to schedule synchronize, create task in the Windows Control Panel's Task after you start the application. The second instance will send synchronize start message to the first instance.


            • Caution
            • You must install the application at the Lotus Notes folder.
            • The default folder is C:\Program Files\IBM\Lotus\Notes.
            • If you fail to synchronize with HTTPS, please turn off HTTPS in the application setting.
            • Even if you turn off HTTPS, the ID and password session uses HTTPS.
            • Notes->Google: This application clear all the entries in the Google my calendar you specified before copying.
            • Google->Notes: This application clear all the entries in the Lotus Notes calendar category you specified before copying.
            • The Notes->Google my calendar and Google->Notes my calendar cannot be same.
            • If you change the Notes calendar entries whose master are in Google, the change will be lost.
            • If you change the Google calendar entries whose master are in Notes, the change will be lost.


            • Before you use
            • If you want to synchronize through proxy, import IE's proxy setting into WINHTTP API.
              • Windows XP: proxycfg -u
              • Windows Vista/Windows 7: netsh winhttp import proxy source=ie
            • Open Lotus Notes's File->Security->User Security->Security Basics and turn on "Don't prompt for password from other Notes based programs".
            • Create a new Google my calendar to put Lotus Notes Calendar entries.
        • By Jidong Zhang 1 decade ago

          This is AWESOME! It works flawlessly for me. Thank you so much.

          BTW, do you know how to include the location info into the google calendar entries? I just have the of my meetings in google after a sync.

          Thank you again!

          • About locations

            By Khelben Arunson 1 decade ago

            I think there may be an issue with escaping some text for the location, I'm not 100% sure, some of my meetings show a location and others do not, but they all have locations and were all resync'd with this jar… so I'm not sure where to put the blame. I'd bet it has something to do with escaping some text special characters though. If I have time I'll look into it. I just really needed to fix the DST and Bad Request errors for my own sanity. I think I saw a separate thread somewhere about your location issue, would probably be best to continue discussion there as not to hijack this thread.



            I hope the project owner comes back…..

            • location

              By Jidong Zhang 1 decade ago

              I didn't know it actually works for some cases. I just don't have the location info at all. Thanks a lot for the hint and I'll hunt around and see what I can get. Definitely will keep you posted if I found any thread.

              Cheers,

        • repeating meetings work, but TZ is incorrect

          By Jon A Christopher 1 decade ago

          Hello,



          Thanks for this fix. With it, I can (finally) get repeating meetings to show up in google calendar, and one-off meetings in a different time zone show up correctly. However, for repeating meetings, only the first instance of repeating meetings shows up with the correct time; the subsequent meetings are off by one hour, presumably because of DST issues.



          -Jon

          • Tell me more about the meeting.

            By Khelben Arunson 1 decade ago

            Interesting, I did not experience this in my sync, however all my meetings, repeating and otherwise, are chaired by persons in my timezone, so that may be an issue there.



            If you don't mind, please tell me more about the meeting, are you the chair?

            If yes, is your notes time zone set the same as you google calendar time zone?

            If no, is the chair of the meeting in a different time zone than you?



            Please try to provide as much detail around the meeting as possible. You did "delete" the calendar and reset the GooCalSync synchronization in the GooCalSync database correct?



            Thank you.

        • DST fix

          By Jon A Christopher 1 decade ago

          I'm really not thrilled by this, because I don't understand it, but I can get your fix to work with proper times for recurring meetings if I:



          1) comment out the the DST adjustments for rdates in GooCalUtil.java: (around line 63)

          // br.getRdate()[i] = adjustXStoDST(br.getRdate()[i]);



          2) use the default timezone in createRecurStr. Replace the TZID lines with

          rs = rs + &quot;TZID=&quot; + java.util.TimeZone.getDefault().getID() + &quot;:&quot;;// JAC added<br/>
          



          Hopefully you can come up with a more Robust fix, Khelben.

          • Interesting, looks like this is the culprit.

            By Khelben Arunson 1 decade ago
            public static String adjustXStoDST(String dt) {<br/>
                lotus.domino.DateTime ddt = convXStoNotesDateTime(dt);<br/>
                try {<br/>
                    if (ddt.isDST()) {//This Appears to see if the Domino DateTime is currently in DST<br/>
                        ddt.adjustHour(-1);// If so it arbitrarily removes an hour. <br/>
                    }<br/>
                } catch (NotesException e) {<br/>
                        e.printStackTrace();<br/>
                        GooCalUtil.logStackTrace(e);<br/>
                        System.exit(-1);<br/>
                }<br/>
                return convNotesDateTimeToXS(ddt);<br/>
            



            I'm not sure why the time was arbitrarily removed, it SHOULD function AFAIK without that. I can't test it atm, but it might not be necessary to even loop through the br.getRDate for loop any longer when using the .getDefault() time zone.

            • By Jon A Christopher 1 decade ago

              I'm not sure if that helps any overall or not…



              In another part of this thread, you asked for more details about the meetings.



              For one recurring meeting, created in a different time zone, I am not the chair. The first instance of that meeting had the correct local time for me (10:30AM), and subsequent meetings had 9:30AM up until when DST expired and then the time shifted to 10:30AM again.



              Another recurring meting created in my time zone, I was the chair. Meeting started at 3:00pm locally, which was again correct for the first instance, subsequent instances were at 2pm. This meeting stopped recurring before DST expires.



              After that, I commented out the DST -1 hour offset as you suggest, and made the code changes I suggested (using TimeZone.getDefault() in createRecurStr), reset the sync, clear the google calendar and try again.



              In this case, all the recurring meetings show up at the correct times (10:30AM and 3:PM, respectively).

              However, there are a few glitches. For no reason I can determine, one of the recurring meetings I created (actually an appointment) has a single recurrence which is off by a full day! The third recurrence of this meeting got moved from Mon, Aug 31 at 12pm to Sunday Aug 30 at 12pm. Also, all non-recurring meetings appear to be on my google calendar one hour later than on the Lotus Calendar. A meeting which was at 10AM in Lotus shows up at 11AM in Google, etc.





              I think i'll just convert all my meetings to sidereal time….it might be easier ;)

              • Sidereal Time...

                By Khelben Arunson 1 decade ago

                I have to be honest, I didn't know what sidereal time was so I had to hit wikipedia real quick, which probably made it all the more funny with the diagram of computing sidereal time there… Well played sir, well played.



                On a serious note, I can't find out why the hour adjust is occuring, and I do remember seeing a bug report about all day events being incorrect…. though I can't remember the specifics….

        • DST Fixes, Khelben?

          By Michael Eck 1 decade ago

          With the fine work you did on .919, is there any chance you'll do the same to .920 while our developer is busy doing the "real job"?

          • Sure

            By Khelben Arunson 1 decade ago

            Sorry, haven't been tracking this.

            I never upgraded to .920 cause i fixed the errors in .919a so i didn't see the point.



            I can make the DST changes to the .920 source and post it as well.



            More to follow

        • Download no longer valid

          By Ian Gillett 1 decade ago

          Hello - could you post the source again as those download files have been deleted from mediafire.

          I will then include this in the next release.

          Many thanks,

          Ian.

    • Fixed in v0.920

      By Muneyuki Ohkawa 1 decade ago

      Sorry to be late.

      I've fixed this problem to upload v0.920.

      This problem derived from the change in Googel Calendar API.

      I aligned to it.



      Thanks.

      Muneyuki.