Kodo Libraries on Mac OS X

I'm evaluating Kodo on a Mac OS X system. I ran into a strange problem.
Kodo includes 13 libraries (.jar files). In Apple's Mac OS X Java
implementation, these kinds of third-party libraries are often placed in
the system-wide extensions directory /Library/Java/Extensions. For
example, that's where I've put my JDBC driver. When I tried this with
the Kodo libraries, however, the schematool stopped working - the class
loader couldn't find my application classes. The byte-code enhancer jdoc
worked fine and could find them, but not schematool.
For now I'm listing all 13 libaries in my CLASSPATH environment
variable, and that's working OK.
I'm curious - is this a known problem? Is there anything I can do to fix
it or work around it?
The two libraries causing the problem appear to be kodo-jdo-runtime.jar
and kodo-jdo.jar. If either or both of these files are placed in the
Extensions directory schematool stops working.
John Norstad
Academic Technologies
Northwestern University

John-
I finally tracked down this problem: libraries in the "installed
extensions" directory cannot load classes that are not also in that
directory (or in the bootstrap classloader). I guess this must be by
design, since you are seeing it on OSX and I can reproduce it on Linux
(Make A.jar that contains A.class, which just tries to load B.class. Put
A.jar in the extensions directory and B.class in your CLASSPATH, and try
to execute the main method of A.class: it will fail).
It is certainly a little wierd, though: it seems to limit the usefulness
of install extensions a bit.
John Norstad <[email protected]> wrote:
In article <[email protected]>,
Marc Prud'hommeaux <[email protected]> wrote:
Could you post the exact error message or stack trace that you are
seeing so we can look into it further?
Sure. I just repeated the following steps on my Mac OS X 10.1.4 system
to make sure I could reproduce the problem. This is all with Kodo 2.2.4
SP1 standard edition.
Step 1: I copied all 12 Kodo ".jar" files to /Library/Java/Extensions
(the same directory wich contains my JDBC driver). This is one of
several places where Java extensions can be located in Mac OS X.
Step 2: I set the CLASSPATH environment variable to the root of my
source code directory hierarchy.
Step 3: I changed my working directory to one of my package source code
directories. This directory also contains a "package.jdo" file for the
package.
Step 4: I compiled all my source code files:
javac *.java
This worked fine - javac managed to locate both the Kodo libraries and
my source code files.
Step 5: I ran the Kodo byte-code enhancer:
jdoc package.jdo
This also worked fine - jdoc properly enchanced all of my class files.
It was able to locate all of them with no trouble.
Step 5: I ran the schema tool:
% schematool -action refresh package.jdo
Exception in thread "main" java.lang.ClassNotFoundException:
my/big/long/package/path/MyClassName
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.main(SchemaTool.java:111
5)
The tool was unable to locate the first class listed in package.jdo:
"MyClassName".
As I mentioned in the original article, I'm quite easily avoiding this
problem by simply enumerating all 12 Kodo ".jar" files in my CLASSPATH
environment variable and not trying to put them in that Mac OS X
extensions directory. Schematool has no problem with this. So I'm
getting plenty of work done and this is more a curiosity than a real
problem.
The big curiosity for me is why jdoc can find my classes but schematool
can't.
John Norstad
Academic Technologies
Northwestern University--
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code

Similar Messages

  • Gcc4.5, lapack/blas libraries, fink/mac ports  - need help

    I have been compiling a model for my research on our lab's Linux cluster, and want to switch to running in on my macbook (osx 10.5.8). I have to set user-specified fc and cc overrides, flags for lapack and blas libraries, and env. variables for mpi and netcdf libraries.
    I just installed xcode; a colleague suggested I install the latest gcc 4.5 (w/ gfortran) using fink, but I have been reading on Apple's Developer Forum's that packaging / porting managers like fink can cause problems.... This is all very new ground for me, so I don't even know whether I can access unix-based lapack and blas libraries w/o fink or mac ports. I should probably buy a leopard bible...
    if i ultimately have to have either fink or mac ports to link lapack and blas libraries, any suggestions on which direction to go?

    ericmeyers wrote:
    Perfectly safe.
    Safe, yes - but not necessarily without problems.
    Go for it.
    Not so fast
    Let's review:
    justabovemaine wrote:
    I have been compiling a model for my research on our lab's Linux cluster, and want to switch to running in on my macbook (osx 10.5.8). I have to set user-specified fc and cc overrides, flags for lapack and blas libraries, and env. variables for mpi and netcdf libraries.
    It would probably be easier if you had 10.6.2. Any open-source libraries that Apple includes are going always going to be a bit older.
    a colleague suggested I install the latest gcc 4.5 (w/ gfortran) using fink
    MacOS X isn't like Linux. You don't want to do what a typical Linux user might do and just grab the latest of everything and let your package manager update all the dependencies automatically. It may work fine. I will definitely give you a set of duplicate libraries and configure an environment that might never have been tried on Mac before. If your results are incorrect, you can't blame Apple.
    I don't even know whether I can access unix-based lapack and blas libraries w/o fink or mac ports. I should probably buy a leopard bible...
    I don't know if the Leopard Bible will help very much. Developer questions are pretty specific. This is a good place to start. The Apple Mailing Lists are another good resources. Apple also just dramatically lowered the price of their Mac developer program to $99. It comes with two free tech support instances per year.
    Also, and this is the important part, both lapack and blas libraries ship with the OS. They are already on your machine. There is no need to get anything from Fink or MacPorts. I don't know much about those libraries, but the versions that come with MacOS X may be optimized by Apple. See this link for more information.
    if i ultimately have to have either fink or mac ports to link lapack and blas libraries, any suggestions on which direction to go?
    That is an easy one. http://www.finkproject.org/ or http://www.macports.org/
    I would encourage you to try to use what Apple ships with the OS before trying to replace it. That way, if there are bugs, Apple will look into it. If you use some 3rd party, Apple won't care - even if they are the same Apple bugs. Plus, you could then more easily develop with Xcode because you wouldn't have to hack up everything to use the fink/macports environment.

  • Libraries on mac

    hi I'm using an Imac 2009 with 2.66 Ghz processor Intel Core i5: Untill one moth ago I had all my libraries (aperture and itunes) located ,as defaoult, on my mac HD.
    Then I had a problem with the system because I'm usyng too much space (700 GB used and 300 free), so I moved the 2 libraries to one external drive.
    It seems everithing was fine and working properly, then some s.m.a.r.t. errore messages appair and the mac had stuck problems and frequent crashs of the system.
    Could be that moving the 2 libraries I made a mistake? otherwise I have to thake in consideration other options, and verify that the real probelm is.
    thanks

    What is the proper extension for a mac library? (I'm used to libName.so on linux)
    .dylib (although no one will put you into jail for using .so)
    Do I use the environment variable LDLIBRARYPATH for the search paths to library files?
    It's considered antisocial to require a user to set that environment variable (or DYLIDLIBRARYPATH). For more info see this and this. It is better to hard-code the absolute path. eg:
    <pre>
    % otool -L /usr/bin/gcc
    /usr/bin/gcc:
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.3)
    </pre>
    - If I had a trivial library, I would compile it like so on linux -
    Source files: sourcea.h sourcea.c sourceb.h sourceb.c
    g++ -c sourcea.c -fpic -o sourcea.o
    g++ -c sourceb.c -fpic -o sourceb.o
    g++ -o libSimple.so sourcea.o sourceb.o -shared
    Is this the same for my Mac?
    Yes.

  • Two libraries, one mac, one apple tv

    Hi, I have browsed this community but can't find a sollution. I have one mac and one apple TV (2nd generation). My wife and I have seperate itunes libraries on the mac. How can I access both libraries at the same time from my Apple tv?
    Homesharing is configured. I can access both libraries - but not at the same time. Only the library of the active account is visible. Any ideas?

    You need to turn off the option to copy content to the iTunes folder in iTunes preferences, then when you add new content to iTunes you will need to place the content on one of the HDDs and then drag and drop it onto iTunes from a finder window.
    Or you can alternatively leave the "Copy" option on and simply press the Alt-key when dragging and dropping content to momentarily suspend the "Copy" of the dragged content to the library. (I.e., iTunes will gladly manage both copied and non-copied content as long as you do not move or delete the non-copied files at the Finder level after adding them to the iTunes database.)

  • Sync libraries on Mac and PC

    Trying to figure out how to sync the libraries on my sisters iMac G5 and her Dell Windows 7. The Mac is running 10.5.8 with iTunes 10 on both. She wants to be able to plug her iPhone 4 to either one without losing the songs. The Mac has her music collection, but the Windows has those few songs that ship with PCs. I can copy the folder from the Mac to the PC, but can I sync them so that as a song is added to one the other syncs up. They bare both on the same wireless netowrk. I had just gotten them to share a printer which went so very smoothly.
    I Googled the info, but it hasn't been much help. If I turn on Home Sharing can this prevent the Windows machine from erasing the songs from her iPhone when she plugs it in?

    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972
    No way to do it automatically I know of, certainly not with music other than iTunes purchases.  The only "automatic" way I know if is to have them share the same library file on a common drive.
    Dragging should work.  It works in neither direction?  Mac iTunes does not support WMA format.

  • Merging iPhoto libraries on mac with 2 users

    Hi, I have iphoto manager but can't figure out how to merge iphoto libraries
    I have my daughters macbook as she passed away in May
    I used time capsule to move the contents of my macbook to hers but it made as new user
    I want all the photos in one library on my user account but I can't choose her iphoto library as
    it says I don't have permission
    Weird how everything is on one computer but having 2 users seems like you can only access your own stuff
    I just want to have all photos on my iphoto
    Any help?

    This worked thank u so much
    Another quick question, iTunes doesn't seem to be aware that id like to use this computer as my new home base
    I think I already had it authorized as we shared songs.
    I had checked that I wanted certain faces from iPhoto but it included quite a few I didn't have checked
    I'm not sure how to tell it this is my "new computer"

  • Shared Libraries on Mac OSX Server - Colorsync Profiles, Fonts etc.

    Hello,
    Our office have 10.5.5 Server running with approximately 25 clients attached (all on Mac OSX 10.5.5). We have a number of colour printers which we regularly profile, and are trying to find a way to syncronise Colorsync profiles across the client machines.
    I have read that it is possible to share a library on the Server...ie. update the Colorsync profiles in one location on the server and all the clients would have immediate access to this. Makes sense.
    However, our external IT consultant has advised me that when you share a Library, it will share everything (fonts, settings, application support files etc.) and will essentially replace an overwrite the local library on each machine. We would like to avoid this as we only want to share the Colorsync profiles and have them be additive to the local library rather than overwrite the whole lot.
    Is he correct? I can't believe that it wouldn't be possible just to share the Colorsync profiles...ie. set the share point at the 'Colorsync' level in the library?
    Any help would be much appreciated. Thanks!

    anyone?

  • Apple tv cannot see All libraries on Mac.

    After my latest holiday I have put all my photos onto my Mac, I can browse and view them all in iPhoto and have downloaded them to my iPad, but when I try to view them using apple tv, I can see all the other events/folders but the latest holiday event/folder is just not there, spent hours trying to solve it but I am lost.
    Please help.

    Have you restarted AppleTV and iTunes?

  • 2 accts(2 libraries), 1 mac via airport-please help

    Hi,
    I just picked up the 5th gen airport extreme; managed to set it up and link an external HDD on my admin account and worked fine but I ran into some issues when I switched over to my girlfriend side.  The hdd does not mount like a regular hard disc on her desktop. It does appear in the finder as a shared drive but it shows up as empty (0gig) and/or it shows up as a blue folder with a red X in the corner with no accessible data.  It wsn't until I ran the utility on her side that I was able to retrieve/view the contents on the drive yet it became all screwy on my side/account when I went back and I had to run the utility again.
    Basically what I'm trying to do is to link my GF's iTunes library via the shared HDD w/o unlinking my own iTunes library on my account/side.  It seems that I can only get one account to link to any given iTunes library but not both at the same time.  It's driving me insane.  Any help would be appreciated.

    Bump

  • Can i share iPhoto libraries between macs

    I just bought a MacBook Air and am looking to share the library in my iPhoto between my iMac and MacBook Air.  Is this possible?

    You can try Pointing iPhoto on the Air to the iPhoto Library that is on you iMac. It is in your user folder. This means that that Library will only be accessible when both systems are on the same LAN (Network) and can actually talk to one another (Netwroked together).
    When Opeiing iPhoto on the Air hold down the Option key and a windows will come up asking "What Library do you want to use". Browse, over the network, to the iMac and to the original iPhoto Library and select it.

  • 1 mac 2 users, 2 iphones(+), 2 itunes libraries and 1 itunes account!

    Hi.  This is an enigma!  Both my husband nad I have iphones which we sync with my mac although on different user accounts.  We both use different libraries but also both use only 1 itunes account. 
    Problems 1:  Husband has created his own account now but how do we transfer the purchases he has made via my account to his?
    Problem   2:   We both have found since upgrading iphone that we have duplicae enries all over the itune on the iphones only - not showing up in the individual iTunes libraries on Mac.
    We have not had any problems for a long time with syncing - not since this new software.  I have my account enabled on my iphone for game centre etc, but my husband has closed his as he keeps getting my details flashing up. 
    Not sure if this is an itunes issue or iphone?  Both I think!
    I realise that until the 'accounts' issue is sorted neither of us can use iCloud which is extremely frustrating - speicially as I just paid and downloaded Lion!
    SM

    I vaguely recall reading about some commercial library manager that is supposed to help with merging libraries.  Simply adding the files will not, of course, carry across playlists or some metadata some people want to keep  such as playcount, ratings, last played date, etc.  However, all the ways I can think of doing that are pretty complicated (and the commercial utility basically uses some of those tricks).  You may be able to do playlists by exporting them from one library and importing in the keeper library.

  • Can I have my iTunes Library on another Mac in addition to my main one?

    My wife and I both have MacBook Pro's and separate i-Tunes libraries and i-Pods. We just bought a 13in White MacBook to use for travel only. Can we copy our library onto that Mac and still leave it on our existing Macs? We also have both of our i-Tunes libraries and Macs backed up on a Time Capsule.

    Can we copy our library onto that Mac and still leave it on our existing Macs?
    Yes. Drag the iTunes folder inside the item in the Finder's sidebar named Music on the MacBook Pro to the corresponding location on the MacBook. The folder can be put somewhere else if needed; if so, launch iTunes with the Option key held down, click on Choose Library, and point it to that location.
    (44544)

  • 2nd Mac - best practices using iPhoto on both?

    Hi -
    I just got a new MacBook and have an iMac that is still the "hub" of my photo library. It is, in fact, about a 180 GB iPhoto library. I know that I can't sync libraries between Macs (a shame - someone should come up with a way to that assuming they haven't already!) so I'm just looking for any best practices?
    I got the MacBook to be able to work on some photos while on the road - I can at least work on post processing in Photoshop, etc. I'm thinking now that my best strategy is to possibly work with the images on my MacBook, importing them into the iPhoto library if desired. Then use my Photo sharing service - Phanfare - to "sync" them? It requires me to download them on the other side and pull them again into the iPhoto Library on the iMac?
    I don't use the Mobile Me Gallery but I suppose that would be another way to have access to them on the alternate computer?
    Any other best practices or suggestions?
    Thx!

    So, if there are times when I'm not home to access my external drive, then going with the two libraries is the best solution, yes?
    Perhaps, but you can get very small and portable external HDs these days.
    I'm not sure though if I should really make both a 180 GB iPhoto library, do you? It is a back up true, but seems like a chunk to move
    But you only do it once. The first time. Thereafter you're simply updating the other with the changes.
    At least maybe I could split into pictures from 2009 - 2010 and have that library for both my iMac and the MacBook. I very rarely access before then (only if I need something specific) so then I could access that via the iMac exclusively?
    That would be viable.
    I would maintain a +full Library+ on the Desktop, the mobile versions a Smaller subset.
    I'm sort of ruling out the one library on the external solution because it eliminates the possibility of being remote -
    As I said above you can get tiny portable drives...
    unless there is some swanky Login to My Computer or something that works with a Mac that can go remotely to my computer and then to my external drive.
    *_This_* might help.
    Regards
    TD

  • Help! How do I synchronize iPhoto library mac to mac?

    I have an imac and powerbook. one iphoto library has stuff the other doesn't and vice versa. can someone PLEASE tell me the easiest way to synchronize my libraries w/o having to do massive import/exports and re-doing all my photo edits?? thanks!!

    Dorothy,
    Although you can create a backup scheme and copy the current and entire iPhoto Library between your two Macs, there is no way to synchronize iPhoto between multiple machines.
    Sharing iPhoto libraries between Macs works very well but it may not accomplish what you want.
    Hope this helped!
    Sam

  • Kodo 4.0/ Eclipse Plugin problems

    Hi,
    I have added Kodo plugin (2.1.0) to Eclipse (3.1.1) plugin folder as
    described in the manual. I've also copied all the Kodo libraries and
    classes12.jar into Eclipse\plugins\kodo.eclipse_2.1.0 and modified
    plugin.xml.
    I can see the menu item "Kodo" in Eclipse, but I can't start the Kodo
    preferences under Windows->Preferences. Following Error:
    Plug-in kodo was unable to load class
    kodo.jdbc.integration.eclipse.KodoPlugin.
    Does anyone have an idea?
    Thanks,
    Ingo Schneider

    Schneider wrote:
    Hi,
    I have added Kodo plugin (2.1.0) to Eclipse (3.1.1) plugin folder as
    described in the manual. I've also copied all the Kodo libraries and
    classes12.jar into Eclipsepluginskodo.eclipse_2.1.0 and modified
    plugin.xml.
    I can see the menu item "Kodo" in Eclipse, but I can't start the Kodo
    preferences under Windows->Preferences. Following Error:
    Plug-in kodo was unable to load class
    kodo.jdbc.integration.eclipse.KodoPlugin.
    Does anyone have an idea?
    Thanks,
    Ingo SchneiderI use http://www.eclipse.org/dali plugin for EJB3-persistence. It allows
    me to have different EJB3 vendors. KODO was ok for me to work with.

Maybe you are looking for

  • How do I add pages to a pdf file?

    I am new to iMac. I am used to using Adobe Acrobat for Windows to create pdf files. In Acrobat, when you scan a page, you have the option to add the page to an existing pdf file. I know how to use the Scan feature on Print & Fax to create pdf files o

  • Sequence settings advanced tab

    I'm working on PAL DVCAM 16:9 in FCP 7. Looking at the advanced tab in compresson settings (within sequence settings) does anyone know if it matters whether 4:3 or 16:9 is selected. I've been working foir a while always in 16:9 and have only recently

  • How do i get rid of mackeeper popup

    How do I get rid of mackeeper popup?

  • How to OPEN downloaded Photoshop Elements 10 on my hard drive disc?

    PHOTOSHOP ELEMENTS 10 DOWNLOADED ONTO MY HARD DRIVE DISC BUT DOES NOT SHOW AS ONE OF THE PROGRAMS ON MY COMPUTER AND I CAN NOT OPEN IT SO THAT I CAN USE IT... WHAT TO DO?

  • Mandatory profile: default printer always reverts to last installed printer

    The only constant is: the last installed printer stays as the default printer (user can install it). How is that tracked by the system? I cannot find it anywhere. example printer A, then B is installed. Printer B always reverts to being the default o