User application-id and existing schema: Enhancer doesn't work properly

I want to use JDO, but I have an existing schema and I need to use my own
primary keys.
Unfortunately the documentation and examples show only one thing at a
time.
Either it describes how to use an existing schema or it shows how to use
application-controlled keys.
Below I pasted a simplified example which shows my problem.
Is there something obviously wrong in my setup? Do I forget something
maybe quite simple?
Thanks for any help - I am pretty much stuck here,
Claudia
Error:
======
Enhancing first seems to have worked fine.
But when using the enhanced classes in my business code (before
actually creating or querying) I get an error message which shows
that during the enhancement process something went wrong:
java.lang.VerifyError:
(class: DBEntry, method: jdoCopyKeyFieldsToObjectId signature:
(Ljavax/jdo/PersistenceCapable$ObjectIdFieldManager;Ljava/lang/Object;)V)
Bad type in putfield/putstatic
My package.jdo:
================
<?xml version="1.0"?>
<jdo>
<package name="de.erv.be.biz.conf.jdo">
<class name="DBEntry" identity-type="application"
objectid-class="MyObjectId">
<extension vendor-name="kodo" key="table" value="DB_TABLE"/>
<extension vendor-name="kodo" key="pk-column" value="ID"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="id-data-column" value="ID"/>
</field>
<field name="data">
<extension vendor-name="kodo" key="data-column" value="DATA"/>
</field>
</class>
</package>
</jdo>
My class DBEntry which matches a table in the database:
=======================================================
package jdoTest;
import javax.jdo.*;
public class DBEntry{
private Long id;
private String data;
public void setId(Long p_id){
id = p_id;
public void setData(String p_data){
data = p_data;
public Long getId(){
return id;
public String getData(){
return data;
My class MyObjectId:
====================
public class MyObjectId{
public Long id;
public boolean equals(Object other){
          if (other == this)
               return true;
          if (!(other instanceof ObjectId))
               return false;
          ObjectId obj = (ObjectId) other;
          return this.id == obj.id;
public int hashCode(){
return id.hashCode();

The problem here is actually a bug in the 0.95 spec, which Kodo 2.2.x
implements. It has been resolved in the 1.0 spec. Keep an eye on this
newsgroup for an announcement of our 1.0-compliant beta sometime tomorrow.
To temporarily resolve the problem at hand, see
https://bugzilla.solarmetric.com/show_bug.cgi?id=123.
-Patrick
On 6/4/02 10:37 AM, "Claudia Bach" <[email protected]> wrote:
I want to use JDO, but I have an existing schema and I need to use my own
primary keys.
Unfortunately the documentation and examples show only one thing at a
time.
Either it describes how to use an existing schema or it shows how to use
application-controlled keys.
Below I pasted a simplified example which shows my problem.
Is there something obviously wrong in my setup? Do I forget something
maybe quite simple?
Thanks for any help - I am pretty much stuck here,
Claudia
Error:
======
Enhancing first seems to have worked fine.
But when using the enhanced classes in my business code (before
actually creating or querying) I get an error message which shows
that during the enhancement process something went wrong:
java.lang.VerifyError:
(class: DBEntry, method: jdoCopyKeyFieldsToObjectId signature:
(Ljavax/jdo/PersistenceCapable$ObjectIdFieldManager;Ljava/lang/Object;)V)
Bad type in putfield/putstatic
My package.jdo:
================
<?xml version="1.0"?>
<jdo>
<package name="de.erv.be.biz.conf.jdo">
<class name="DBEntry" identity-type="application"
objectid-class="MyObjectId">
<extension vendor-name="kodo" key="table" value="DB_TABLE"/>
<extension vendor-name="kodo" key="pk-column" value="ID"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="id-data-column" value="ID"/>
</field>
<field name="data">
<extension vendor-name="kodo" key="data-column" value="DATA"/>
</field>
</class>
</package>
</jdo>
My class DBEntry which matches a table in the database:
=======================================================
package jdoTest;
import javax.jdo.*;
public class DBEntry{
private Long id;
private String data;
public void setId(Long p_id){
id = p_id;
public void setData(String p_data){
data = p_data;
public Long getId(){
return id;
public String getData(){
return data;
My class MyObjectId:
====================
public class MyObjectId{
public Long id;
public boolean equals(Object other){
if (other == this)
return true;
if (!(other instanceof ObjectId))
return false;
ObjectId obj = (ObjectId) other;
return this.id == obj.id;
public int hashCode(){
return id.hashCode();
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com

Similar Messages

  • I bought a new macbook pro 13inch retina and sometimes the charger doesn't work properly, I dont know if its the charger or my laptop?

    I bought a new macbook pro 13inch retina and sometimes the charger doesn't work properly, I dont know if its the charger or my laptop? i always have to take the charger in or out for it to work ... -.-

    Apple Portables: Troubleshooting MagSafe adapters
    http://support.apple.com/kb/TS1713

  • Anyone notice the Calendar doesn't work properly in the IOS 5?  Can't put a new event in there and can't change calendars

    I just updated to IOS 5 and now the calendar doesn't work properly.  Can't enter a new event or change Calendars.  Nothing updates from the Remiders either.  Anyone have an answer as to what may be wrong?

    I just updated to IOS 5 and now the calendar doesn't work properly.  Can't enter a new event or change Calendars.  Nothing updates from the Remiders either.  Anyone have an answer as to what may be wrong?

  • Time machine only copies User Info and Users (Applications, Library, and System are missing) from my quad core Mac Pro.  45 Gb of 162 Gb are missing.  Any one having success with time machine copying all folders using Mavericks?   What do I need to do dif

    Time machine only copies User Info and Users (Applications, Library, and System are missing) from my quad core Mac Pro.  45 Gb of 162 Gb are missing.  Any one having success with time machine copying all folders using Mavericks?
    What do I need to do differently?

    The late, great Pondini was investigating that issue before he passed away.
    See here: https://discussions.apple.com/thread/5125969
    I think there might be information there on how to reset Time Machine to do a full backup. I think you basically have to reset it and start over.

  • Some of my application in macbook pro doesn't work properly with Os Yosemite, such as dictionary and  MplayerX and etc

    I face to this problem since new OS, Yosemite has installed on my mac book
    some of my application in macbook pro doesn't work properly with Os Yosemite, such as dictionary (mac dictionary) and  MplayerX and etc
    For example when I make MplayerX and such application fullscreen the screen become white and just voice of video can be heard  or when I use Mac Dictionary (look-up dictionary) in any pages the meaning of work is not appear ( look at the picture above), so i need to directly open dictionary to find the meaning.
    Please help me
    tq

    Same thing here with MPlayerX (annoying)

  • I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work. Help?

    I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work.
    ^^ that's the main problem. Here's the full history.
    I bought a new 13" i5 MBP, early 2011 edition. I had an old white Macbook 2.14 ghz core2duo on Snow Leopard. I attempted to port over my time machine backup, but encountered problems in that my User was inaccessible from the new computer after the import finished, and I had to go in and change the root password, etc, and for some reason or another, I couldn't install any programs at all from that administrator's account. By "couldn't" I mean I could install them, but upon installation they would never boot. So, I took it to the apple store and did a clean install from the most up to date Lion OSX. Then, I created a brand new admin account, instead of trying to import the old one, and things seemed great. Then, I just imported my old files from the TM backup, but not any system settings, permissions, or user data. Just my Docs, pics, vids, apps, and itunes stuff.
    Here's where things get weird again. I imported this stuff under the name "old", but all of these folders have a red negative sign on them, marking them as restricted. So, from my main admin account, I cannot even peruse these folders. Since I didn't import user data, I can't sign in to the "old" account to change permissions. I already tried to change the permissions from system preferences, but that didn't change anything. And now, for whatever reason, of all the apps that were imported then, MS Office is the only set of apps that does not work. When I click on it, it just says there was a problem and asks if I'd like to send a report to apple. I tried reinstalling it to no avail. I'm an English student, so i really need access to Word. Can anyone help? The Apple store is a major detour for me and would like to fix this issue myself.

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • I have an iphone 3GS and I have upgraded it to iOS 6. Since then it doesn't work properly. Every now and then it has been restarting by itself and requiring restore. When I connect it to itunes it restarts again and again. Is there any solution?

    I have an iphone 3GS and I have upgraded it to iOS 6. Since then it doesn't work properly.
    Every now and then it has been restarting by itself and requiring restore. When I connect it to itunes it restarts again and again without letting me take any action. Is there any solution?

    Hey, There are afew things you can try.
    - Simply turn your phone off and back on again
    - Hold down your home button and your lock button and let goes as soon as the screen goes black (Phone will power down) - Then turn on your phone and hey presto!
    - Back up your iPhone to your PC, then restore it..
    this ones last cause I think you may have tried it already..
    - Close all open applications
    Hope this helps!
       Kieran.

  • My ipod touch 5th generation will not turn on and the home button doesn't work. what do i do?

    Hello my name is Leslie and i would like to ask you guys a question on how to fix my ipod or what is wrong with it. My ipod touch 5th generation will not turn on and the home button doesn't work. what can i do to fix it ?

    Has the home button worked in the past, or is this been something that hasn't worked for some time? The only way to reset the device is with the sleep/wake (power) and home buttons together. Without it, you would have to wait until the battery dies and then plug it in to try and reset it. The Home button is used for several user troubleshooting steps. Without it, you cannot perform a reset, put the device into recovery mode, or place it in DFU mode. You need to get the home button repaired.

  • I can't upload pictures to Facebook Pages albums with my IPad Mini 3. I've tried safari too and the basic uploader doesn't work. I can add photos to the wall but I need to put them in albums for my Boutique,

    I can't upload pictures to Facebook Pages albums with my IPad Mini 3. I've tried safari too and the basic uploader doesn't work. I can add photos to the wall but I need to put them in albums for my Boutiqu

    It is peculiar, that Chrome, Safari, and Skype can access FB, but not the iPhoto uploader.
    Do you see any error messages/ diagnostics in the Console Window, when you try to connect to Facebook?
    Launch a Console window from Applications > Utilities and clear the Console Window. Then try to upload. Are there any new messages?
    And also launch a Terminal and have a look, if "facebook.com" is properly resolved:
    Type 
    ping facebook.com
    into the window. Do you see any transmissions? What is the IP address used?
    I see:
    PING facebook.com (173.252.110.27): 56 data bytes
    64 bytes from 173.252.110.27: icmp_seq=0 ttl=243 time=110.486 ms
    64 bytes from 173.252.110.27: icmp_seq=1 ttl=243 time=109.365 ms
    64 bytes from 173.252.110.27: icmp_seq=2 ttl=243 time=110.101 ms
    64 bytes from 173.252.110.27: icmp_seq=3 ttl=242 time=109.829 ms
    64 bytes from 173.252.110.27: icmp_seq=4 ttl=242 time=111.323 ms
    64 bytes from 173.252.110.27: icmp_seq=5 ttl=242 time=110.346 ms
    64 bytes from 173.252.110.27: icmp_seq=6 ttl=242 time=110.708 ms
    64 bytes from 173.252.110.27: icmp_seq=7 ttl=242 time=112.685 ms
    64 bytes from 173.252.110.27: icmp_seq=8 ttl=243 time=124.256 ms
    64 bytes from 173.252.110.27: icmp_seq=9 ttl=243 time=112.106 ms
    ^C
    --- facebook.com ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 109.365/112.120/124.256/4.159 ms
    Try the same with "dig":
    dig facebook.com
    ; <<>> DiG 9.8.3-P1 <<>> facebook.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25051
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    ;; QUESTION SECTION:
    ;facebook.com.                              IN          A
    ;; ANSWER SECTION:
    facebook.com.                    775          IN          A 173.252.110.27
    ;; Query time: 11 msec
    can you "ping" facebook?

  • I don't like some features in the new iTunes and my favorite visualizer doesn't work with it . I threw everything to do with iTunes away and tried to install an earlier version but the installer kept giving us this error page telling us to quit iTunes !

    The installer is crazy . It keeps thinking that iTunes is running even though we dumped everything we could find ( preferences , application , libraries ) . Did I miss something ? Is there an uninstaller? I need an earlier than 10.5 version . I don't like the side swipe ( it feels unbalanced ) effect and my favorite visualizer doesn't work right with it . Thanks!

    No problem, glad to help!
    Update: my PC USB hub was connected to a USB 3 port, I connected the 30 pin cable directly to my PC, And the restore worked just fine. Restored phone from iCloud backup and seems to be working fine.

  • How do I use a NORMAL headset (dual 3.5mm) on my new Macbook pro retina? No usb ports available and headset buddy adapter doesn't work.

    Title says it all:
    How do I use a NORMAL headset (dual 3.5mm) on my new Macbook pro retina? No usb ports available and headset buddy adapter doesn't work.

    Hi Auracles1,
    Here's a pretty discussion regarding wireless printing with this device and a Mac.
    http://h30434.www3.hp.com/t5/Printer-networking-and-wireless/HP-Officejet-6500-E 709n-wireless-issue/m-p/258853
    I have a similar OfficeJet and it was a multi-step process. (1) Install printer drivers on the machine, (2) Add the printer queue in print & fax, (3) Run the "setup wizard" from the disc for wireless printing.

  • I have just updated my software to 10.8.2 and now my sound doesn't work. Any suggestions?

    I have just updated my software to 10.8.2 and now my sound doesn't work. Any suggestions?

    I used disk permission repair to try to resolve this as well as a 'soft' restart. Still have a grayed-out mute checkbox in the sound section of system preferences.

  • I just downloaded the updates and now my mail doesn't work. It says I now need a newer version of OS to allow I've to open my mail which I can't right now

    I just downloaded the updates and now my mail doesn't work. It says I now need a newer version of OS to allow I've to open my mail which I can't right now

    What version of the OS X are you running? Go to the Apple in the upper left corner and select About This Mac and report the Version back here.

  • HT1923 The sync function on my iPod Touch 3rd generation doesn't work properly.  My OS is up to date, but some of my podcasts won't transfer onto the iPod, and it won't delete ones I've already listened to.

    The sync function on my 3rd gen iPod Touch doesn't work properly.  It won't sync all the podcasts I've downloaded, and it won't delete ones I've listened to and deleted on iTunes.

    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 &amp; above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    iTunes 10.5 for Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

  • At the moment I can use my apple Id on my iPod touch to connect to iCloud and IMessage and FaceTime but it doesn't work on App Store. Face to an error: can not connect to iTunes Store. What's wrong? My apple Id is working on my MacBook Pro as well.

    At the moment I can use my apple Id on my iPod touch to connect to iCloud and IMessage and FaceTime but it doesn't work on App Store &amp; iTunes just on iPod  Face to an error: can not connect to iTunes Store. (Setting... itunes &amp; app store)What's wrong? My apple Id is working on my MacBook Pro as well. And it was working on this iPod before resetting . Just after resetting I can not connect to App Store &amp; iTunes and I can not instal any app even free apps

    Try
    Can't connect to the iTunes Store

Maybe you are looking for

  • Date: Is it possible to get the last Friday of each month?

    Hello all, I am trying to create a column of dates which are a specific day in each month, e.g. the last Friday of every month, or the first Monday of every month. Is this possible, and if so could you please guide me on how to? Thanks James

  • Video image problem

    Hi...A neighbor has a iMac G5 and has developed a video/image problem. The iMac boots up and sometimes shows an ok screen for a little time, sometimes not. What emerges is an array of digital black on white graphic line images (maybe I should upload

  • My itunes crash when accessing the library of IMatch

    My itunes crash when accessing the library of IMatch. I'm using Windows 7 64 bit. this error is occurring in the last update.

  • Problem with color banding on a blue sky using LR4.3

    Hi, Recently, I updated my LR3 to LR4.3 and my camera from Olympus EP2 to OMD. So, I am not sure if any of these factors play a role but, I started having severe banding on photos taken in vivid sunny day with a blue sky. I am not an advanced LR user

  • Update database

    Can anyone send me a program on updating database.I am using SQL and microsoft access to create database