muhammadnaveed / syncnotes2google

Automatically exported from code.google.com/p/syncnotes2google
0 stars 0 forks source link

Running on Mac #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I created the following bash script to launch the program on Mac.
It works for me on Mac OS 10.6.2 and Notes 8.5.
Place the file in the root directory of syncnotes2google.
Don't forget to make it executable before running it.

-S.

Original issue reported on code.google.com by sharon.d...@gmail.com on 26 Jan 2010 at 11:30

Attachments:

GoogleCodeExporter commented 9 years ago
Great work!

Original comment by henols on 16 Feb 2010 at 12:42

GoogleCodeExporter commented 9 years ago
Hi,
I am trying your script on Mac OS 105.8 with Notes 8.5. I get the following 
error on not finding the local notes 
installation.  I would highly appreciate any ideas.

Start notes-to-google to google-to-notes synchronization.
de.bea.domingo.service.NotesServiceRuntimeException: Local Notes installation 
not found. Please ensure that 
your Notes installation directory is in the system path.
    at de.bea.domingo.service.NotesServiceFactory.invoke(NotesServiceFactory.java:382)
    at de.bea.domingo.service.NotesServiceFactory.createSession(NotesServiceFactory.java:255)
    at de.bea.domingo.service.NotesServiceFactory.getSession(NotesServiceFactory.java:161)
    at com.googlecode.syncnotes2google.Factory.getNotesSession(Factory.java:45)
    at com.googlecode.syncnotes2google.Factory.getMailDatabase(Factory.java:99)
    at com.googlecode.syncnotes2google.dao.NotesCalendarDAO.getFirstEntry(NotesCalendarDAO.java:38)
    at com.googlecode.syncnotes2google.SyncService.executeSync(SyncService.java:14)
    at com.googlecode.syncnotes2google.SyncNotes2Google.main(SyncNotes2Google.java:23)
Caused by: de.bea.domingo.proxy.NotesProxyRuntimeException: Local Notes 
installation not found. Please 
ensure that your Notes installation directory is in the system path.
    at de.bea.domingo.proxy.NotesProxyFactory.getSession(NotesProxyFactory.java:394)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at de.bea.domingo.service.InvocationTask.run(InvocationTask.java:102)
    at de.bea.domingo.threadpool.SimpleThreadPool.run(SimpleThreadPool.java:369)
    at de.bea.domingo.proxy.DNotesThread.run(DNotesThread.java:244)
Caused by: java.lang.UnsatisfiedLinkError: 
lotus.domino.local.Session.NCreateSession(I)I
    at lotus.domino.local.Session.NCreateSession(Native Method)
    at lotus.domino.local.Session.createSession(Unknown Source)
    at lotus.domino.NotesFactory.createSession(Unknown Source)
    at de.bea.domingo.proxy.NotesProxyFactory.getSession(NotesProxyFactory.java:383)
    ... 7 more
------
Thanks,
Ln

Original comment by lakshmin...@gmail.com on 3 Mar 2010 at 10:46

GoogleCodeExporter commented 9 years ago
Make sure the path NOTES_HOME is correct 

Original comment by henols on 22 Mar 2010 at 2:01

GoogleCodeExporter commented 9 years ago
Mac and Linux users: If you are automatically running this from cron, make sure 
in
the top of the script you change to the right directory where the program is
installed, otherwise you will get errors like "Exception in thread "main"
java.lang.NoClassDefFoundError: 
com/googlecode/syncnotes2google/SyncNotes2Google".

Example in syncnotes2google.sh: 

#!/bin/sh

cd $HOME/syncnotes2google

...etc

Original comment by jan.ho...@gmail.com on 23 Apr 2010 at 11:25

GoogleCodeExporter commented 9 years ago
I've modified the script a bit to handle running out of cron/launchd and to only
perform the sync if it sees that Notes is running.  I have also have written a 
.plist
to launch the script via launchd once an hour.

Make the same edits to the syncnotes2google.sh that you would otherwise make, 
namely,
the NOTES_HOME.  I also added some simple logging, any errors would be logged to
$HOME/.syncnotes2google/error_log and the sync log itself would go to the same
directory to a file just called log.

For Mac OS X users, the local.syncnotes2google.plist should be placed in
~/Library/LaunchAgents.  Make sure to edit it and fix the path to where the
syncnotes2google.sh is located, save your changes, and enabled with launchctl:

launchctl load ~/Library/LaunchAgents/local.syncnotes2google.plist

You can change the frequency by changing the number of seconds from 3600 to 
whatever
frequency you might use.

After any changes to that file, you'll need to unload and load the .plist again.

Original comment by mikeppar...@gmail.com on 23 Apr 2010 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
Does anyone have an idea what this is?

Exception in thread "main" java.lang.NoClassDefFoundError: 
com/googlecode/syncnotes2google/SyncNotes2Google
Caused by: java.lang.ClassNotFoundException: 
com.googlecode.syncnotes2google.SyncNotes2Google
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Original comment by cseabro...@gmail.com on 1 Jul 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Sharon / Mike,

Great scripts, very helpful!  

Is there anyway to run the plist / script silently so that you don't visibly 
see that the script is syncing every hour?  I tried a couple modifications to 
the script but didn't have any luck.

Thanks.

Original comment by jgaither...@gmail.com on 1 Feb 2011 at 5:13

GoogleCodeExporter commented 9 years ago
Hi all. I tried to do so but I received the following error:

bash-3.2$ . sync*
Exception in thread "main" java.lang.NoClassDefFoundError: 
com/googlecode/syncnotes2google/SyncNotes2Google
Caused by: java.lang.ClassNotFoundException: 
com.googlecode.syncnotes2google.SyncNotes2Google
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I'v put the script into $HOME/syncnotes2google made it executable and put the 
command into the script (on top of the script)

#!/bin/sh
cd $HOME/syncnotes2google

Can anyone help me here? Thx, Heinz

Original comment by Heinrich...@gmail.com on 5 Mar 2012 at 11:03