Getting a -30987 (DB_PAGE_NOTFOUND) after using struct as data in the C API

Hi,
I'm using the Berkeley DB on my Ubuntu for some time now. Today, I've spend several hours on the following problem:
My function for writing in the DB looks like that:
- I've written the following code for writing in the db:
+==========+
+int write_entry(char argv_entry, char main_header){+
+typedef struct write_entry {+
+char *header;+
+char *entry;+
+} WRITE_ENTRY;+
u_int32_t flags;
int ret;
DBT key, data;
+DB *blog_db;+
WRITE_ENTRY my_entry;
int buffsize, bufflen;
+char *databuff;+
+/* === Open DB */+
ret = db_create (&blog_db, NULL, 0);
+if (ret != 0){ printf(":( - ERROR while db_create\n"); }+
flags = DB_CREATE;
ret = blog_db->open(blog_db, NULL, "blog.db", NULL, DB_BTREE, flags, 0);
+if (ret != 0){printf("ERROR\n"); }+
+/* === declaring vars and mem */+
unsigned long my_key;
my_key = time (NULL);
my_entry.header = main_header;
my_entry.entry = argv_entry;
buffsize = (strlen (my_entry.header) strlen (my_entry.entry) + 2);+
databuff = malloc (buffsize);
memset(databuff, 0, buffsize);
memcpy (databuff, my_entry.header, strlen (my_entry.header));
bufflen = strlen (my_entry.header) 1;+
memcpy (databuff bufflen, my_entry.entry, strlen (my_entry.entry));+
bufflen = strlen (my_entry.entry) + 1;+
+/* rdy to store */+
memset (&key, 0, sizeof(DBT));
memset (&data, 0, sizeof(DBT));
key.data = &(my_key);
key.size = sizeof(unsigned long);
data.data = databuff;
data.size = bufflen;
ret = blog_db->put(blog_db, NULL, &key, &data, DB_NOOVERWRITE);
free(databuff);
+if(ret == 0) { return 0; }+
+else { return (ret); }+
+if (blog_db != NULL){+
blog_db->close(blog_db, 0);
+}+
+}+
+==========+
I use the following code to receive data from the DB:
+==========+
+void main(){+
write_entry ();
+}+
+write_entry(){+
+typedef struct write_entry {+
+char *header;+
+char *entry;+
+} WRITE_ENTRY;+
int id;
DBT key, data;
+DB *my_blog;+
WRITE_ENTRY my_entry;
u_int32_t flags;
int ret;
ret = db_create (&my_blog, NULL, 0);
flags = DB_CREATE;
ret = my_blog->open(my_blog, NULL, "blog.db", NULL, DB_BTREE, flags, 0 );
memset (&key, 0, sizeof(DBT));
memset (&data, 0, sizeof(DBT));
id = 1288563852;
key.data = &id;
key.size = sizeof (unsigned long);
ret = my_blog->get(my_blog, NULL, &key, &data, 0);
if (ret != 0)
+{+
printf("RET != 0 ==> %d\n", ret);
+}+
printf("Output: %s", data.data);
+}+
+==========+
Whatever I do - I get a "-30987" after the following line:
ret = my_blog->get(my_blog, NULL, &key, &data, 0);
I also tried to replace the long variable with an int - same result.
Could anybody tell me, what's going wring here?
Greetings
Jan

Hello,
We do not have all the details here i.e. product (DS, CDS, TDS, HA),
if the application is multi-process/multi-threaded, if transactions/
environment/locking are in use, BDB version, but a few suggestions would
be:
1. make sure that there are no environment/database corruptions
2. if applicable make sure that any log/region files are not corrupted.
3. ensure that the same database is not updated both from within
an environment and outside the environment
4. make sure any cursors are closed when the application is finished
with them.
5. ensure that the same database is not accessed from within and without
a transaction
6. check if any processes/threads have been killed unexpected?
Since the application is long-running and you just hit this problem,
some type of corruption could have occurred.
Thanks,
Sandra

Similar Messages

  • I have never been able to upgrade my phone I always get an error message after it goes 2 hours on the computer someone told me I could do it wifi but I don't know where to go to start the download

    I have never been able to upgrade my phone I always get an error message after it goes 2 hours on the computer someone told me I could do it wifi but I don't know where to go to start the download

    Make sure you have the right system requirements before you start to update the iOS, you will need:
    Apple ID (required for some features)
    Internet access
    Syncing with iTunes on a Mac or PC requires:
    Mac: OS X v10.5.8 or later
    PC: Windows 7; Windows Vista; or Windows XP Home or Professional with Service Pack 3 or later
    iTunes 10.5 or later (free download from www.itunes.com/download)

  • "Message is used to carry data between the BlackBerry handheld and an associated server"

     Hi everyone,
    I'm a first time poster!
    I've been receiving about a 100 of these emails everyday for over a week now!  
    Bell mobility and Bell ISP both say it's not their issue or problem to fix and told me to contact the other!  
    The e-mails are orginating from:
    [email protected]
    Any suggestions?
    Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    This message is used to carry data between the BlackBerry handheld and an
    associated server. Please do not delete, move or respond to this message - it
    will be processed by the server.
    BEGINETP 116
    AdxV+90AAAAAIBAIMzAzQUM3MUQgGWZyaXp6ZWxsQHBlaS5zeW1wYXRpY28uY2EAI/HrYFAF
    Q01JTUUDQICAgIAyAAAwOENGOEQ3NkIrRysxALbQEVSv1zvyA8fJF15bAW0AGb/C87pyXKXe
    k+KxQN/Inek!
    ENDETP 70196029
    Message Edited by Frazzledazzle on 09-17-2009 11:44 AM

    HI and Welcome to the forums!
    Here are several KB's that discuss the issue...hopefully one of them has what you need:
    KB04254 Network@etp email messages arrive on the BlackBerry smartphone
    KB10289 What is a Network@etp message
    KB13551 Receiving both email messages and network@etp email messages on the BlackBerry Smartphone
    KB12643 ETP messages are not deleted from the Inbox after delivery to the BlackBerry smartphone
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server.

    I have a client with a BlackBerry Pearl 8110. It was (is) configured to receive email from a Microsoft Exchange Server via his Outlook account.  I have uninstalled the Desktop Manager and re-installed ensuring the computer transmits his email via the Re-Director. All settings in the Desktop Manager are correct. The phone was working fine for over 5 years. Now he is getting emails both on his phone and in Outlook saying:
    This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server.
    I have verified that his phone is not attempting to perform the Enterprise Activation process by checking :
    Options > Advanced Options > Enterprise Activation.
    He does however have a Service Book entitled "CMIME"
    How can I resolve this issue?

    Is the user needing the Redirector service?
    Step 1: If you're not using Redirector or Enterprise, you should uninstall Desktop Manager and then reinstall it using the BlackBerry Internet Service option.
    Step 2: On your device, go to: Options > Advanced > Service Book, and delete all service books for [Desktop]
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • This message is used to carry data between the BlackBerry handheld and an associated server.........

    Hi everyone,
    I am having issues with a couple of BlackBerry's, where they are receiving a message on their phone saying:
     "This message is used to carry data between the BlackBerry handheld and an associated server. Please do not delete, move or respond to this message - it will be processed by the server."
    Email is from "[email protected]"
    This has only appeared since installing the BlackBerry Desktop Software version 6.
    We have used the link below which resolved the issue on one of the BlackBerry's but on the other neither of the options are there.
    http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB04254&sliceId=SAL_Pub...
    The link I have just posted references to version 5, just wondered if anyone knows how to resolve it in version 6 or some other option. Original email is still received fine but want to stop the other email about "This message is used to carry data between.......".
    Thanks in Advance.
    Kevin

    An alternative, if you cannot stop it via the two recommended fixes, is to send those messages to your jiunk folder at the email server level so that they never reach your BlackBerry...
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • After i erased whole data from the ipod touch 3rd gen. when i put back to sync it. it says in the windows connect to itunes, which i did,i also installed new itunes but still it doesnt recognise . pls help me if u have gone thru same trouble like me.

    after i erased whole data from the ipod touch 3rd gen. when i put back to sync it. it says in the windows connect to itunes, which i did,i also installed new itunes but still it doesnt recognise . pls help me if u have gone thru same trouble like me
    Thanks

    I do not understand what "it says in the windows connect to itunes" means?
    What is "it" and what is "windows"?
    Maybe:
    iOS: Device not recognized in iTunes for Mac OS X
    Or
    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or                     
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - Then do the other actions of:
    iOS: Device not recognized in iTunes for Windows
    paying special attention to item #5
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • After using Merge Clips in CS6, the resulting file now has two audio tracks

    Hey guys,
    I'm running into a weird problem after using the Merge Clips option. I have my video and audio selected, I've already moved the audio so they're both synced. It looks like this:
    Then I use Merge Clips and pull the new file into a new sequence which in turn looks like this:
    I checked the audio channels for both and apparently the merged file separated the left and right audio channels into two separate streams as opposed to using the single stream for both channels like the original.
    Anyway to prevent it from doing this?

    So according to Adobe's website: http://help.adobe.com/en_US/premierepro/cs/using/WS2bacbdf8d487e582-73725e6a12e5a6165d0-7f ff.html
    At the very bottom they list limitations, one of which being "Merged clip audio results in mono track audio only."
    Which I was familiar with before posting this. It doesn't seem however that the two tracks are mono it looks like they are two separate stereo tracks. If I mute one I still get audio in both speakers even though I muted the "right" track.
    Here's what they look like in the audio mixer
    The original only has the left most track.
    I guess the only thing to do is just deal with it or render out each clip uncompressed to have that single audio channel.

  • Using SFTP with FTP Adapter: The SSH API threw an exception.

    Our SOA suite veriosn is 10.1.3.4.
    We have to get the file from SFTP server and put it on the SOA Server. (SFTP and SOA server are running in different machine)
    If Incoming file and outgoing file directory is located in SFTP server..GET and PUT operations works fine.
    but if I give Incoming File location = <SFTP location>... and Outgoing file location = <SOA server location>... I get the below error...
    <2011-01-28 01:45:51,043> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::Outbound> file:/C:/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPTest_1.0_f57b8d368277e2d025bfbd2992350d66.tmp/put.wsdl [ Put_ptt::Put(opaque) ] - Could not invoke operation 'Put' against the 'FTP Adapter' due to:
    ORABPEL-11445
    The SSH API threw an exception.
    The SSH API threw an exception.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    <2011-01-28 01:45:51,043> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::Outbound> file:/C:/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPTest_1.0_f57b8d368277e2d025bfbd2992350d66.tmp/put.wsdl
    [ Put_ptt::Put(opaque) ] - Rolling back JCA LocalTransaction
    <2011-01-28 01:45:51,043> <ERROR> <default.collaxa.cube.ws> <WSIFInvocationHandler::invoke> Fault happened: file:/C:/OracleAS_1/bpel/domains/default/tmp/.bpel_FTPTest_1.0_f57b8d368277e2d025bfbd2992350d66.tmp/put.wsdl [ Put_ptt::Put(opaque) ] - WSIF JCA Execute of operation 'Put' failed due to: The SSH API threw an exception.
    The SSH API threw an exception.
    ; nested exception is:
         ORABPEL-11445
    The SSH API threw an exception.
    The SSH API threw an exception.
    Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
    anyone can offer any help?
    Thanks,
    AB
    Edited by: AB on Jan 28, 2011 3:38 AM

    Hi,
    Thanks for the reply.
    As per client's requirement, we shouldn't be using java service for this functionality.
    And as you said, the oracle adapters are not taking anywhere, but guess have no other choice..
    Cheers,
    Varun

  • Inventory: Movement after count with post date before the count date.

    Hi,
    We have stock movements all the days of the week.
    We conduct physical inventories on Sunday mornings. There are not stock movements on Sunday mornings (stock movements on Sunday starts at night).
    Usually we create the SAP Physical Inventory Document on Fridays, assigning Saturday as the Planned Count Date.
    We enter the SAP Physical Inventory Count on Sunday (at the end of the count) or on Monday.
    How you recommend us to use SAPu2019s Physical Inventory feature in order to calculate the Book Inventory considering all stock movements with posting date less than or equal to Saturday?
    Please, suggest us a solution that If we register a movement after we enter the count but with post date before the count date (and the count is not posted yet), the Book inventory is modified accordingly.
    Thanks in advance for your support!!

    SAP takes the book inventory in the moment you enter the count.
    Best you set  block movements , this block will be removed automatically when you enter the count. So you can prevent users from posting until you have entered the count.
    If you set the freeze book inventory, then SAP takes the book inventory in the moment you create the document.
    This is not a good way if you still have movements after inventory document creation and actual count.
    You have to make sure - organisational  wise, outside SAP - that all movements that happened before inventory count  are posted before you start entering the count. There is nothing in SAP that can help you in this case.

  • Using lots of data in the background, without counting on the data counter

    I am having a pretty big problem with my phone where it is regularly using 171kb of data without me doing anything with the phone at all, even when I'm connected to WiFi. Last night it used 13MB without me even doing a single thing and that has been going on since I got the phone. And then, to make things worse, it doesn't record any of this data usage on the internal counter. I spoke to a CS person at Rogers who said she had never seen anything like it before and transferred me to technical support. That guy, who was about as useful as a hole in the head basically said nothing was wrong.
    So here I have an iPhone that is eating up all of my data allowance, running itself towards an inevitable overage charge.
    Any ideas?

    Yeah no, I don't have push on. When I found out about this problem, I promptly turned not only push off, but I also disabled my email accounts and synced calendars.
    Today I turned my phone off for about 5 hours and confirmed with Rogers that no data was transmitted during the time it was off. I also restored the phone.
    Luckily, a really nice guy at Rogers customer service (I recall saying something about their customer service guys being great but the technical support people being useless, he proved it) gave me 1 month of unlimited data usage (which I was supposed to have in the first place) in order to try and troubleshoot the problem myself. So luckily the panic is over for now and I can relax and watch X-Files for a while.
    Despite all of this, my phone is still using 171kb at random. I have determined that it is likely related to the phone (an errant app perhaps?) and that the first data charge was put through only hours after I got the phone, so it's been consisted from the beginning (which if it were an app, would limit it to only a couple: Globe and Mail, Shazam, Remote, NY Times, & Facebook were the first ones I downloaded).
    I have found many other people who are having this exact same problem (here: http://www.howardforums.com/showthread.php?t=1501910&page=1&pp=15) , but nobody who has fixed it!

  • After transferring my iTunes data from the old to the new windowsPC according to the apple-instructions, the songs don't start playing when I click them as usual, although loudspeaker symbol appears on the left side

    After transferring my iTunes data from my old to the new windowsPC following exactly the original apple instructions everything LOOKS allright when I start iTunes on my new PC. But when I click the song as usual, it doesn't start playing, although the little loudspeaker symbol on the left side appears. What went wrong, what can I do?

    I guess nobody knows if the crash that occured was legitimate or not?  Apple phone support could do nothing for me, so I guess I am left to drive 45 minutes to the nearest store.

  • Can't get speakers to work after using ear buds what happened?

    I used ear buds once and now I can't get my internal speakers to work. In "system preferences" sound output I can't select internal speakers. it just has "digital out"

    No, but I thought I saw it at an earlier time and of course with the headphones connected I can hear audio. By the way, thanks for replying.
    Chuck

  • Why the Safari navigation is getting slow on Internet after using it for a while ?

    Hi, If i reset the modem, the Safari navigator is working very fine at the beginning and all the pages are appearing very fast on the screen. But after a while, I can see that the Internet pages appear more slowly and even I need sometime to wait until 10 seconds or more before a page appear on the Safari navigator. I have made all the cleaning possible (Console, Safari preferences, Disk utility, Keychain Access) into the iMac but it seems that something can get into the computer and slow the Internet navigation. Do you have an idea where the problem come from ? I am wondering if there is something wrong into the Console like the ~/Library/Logs or into var/log. Unix ? Terminal ?

    Had the same problem...
    Saw some other (ssh) broblems beind discussed and tried the fix for them and it fixed my "You can’t open the application “BovadaPoker.app” because it is not supported on this type of Mac."
    Try this
    cd /Applications/BovadaPoker.app/Contents/
    sudo chmod g+rx BovadaPoker

  • How to get a serial number after using trial?

    I downloaded the Lightroom 4 trial, and I liked it so I'm gonna buy it.  However, when I click the "buy" button on the launcher, it redirects me to the buy page and it asks me if I want to download or have a disk shipped to me.  I just want to buy a serial number to activate my copy for good, since I the trial is essentially the full version but with a time limit.  How do I do this?

    click download.  you don't have to install (or even save the download).  just use the serial number to activate the trial you've already installed.
    delete the unneeded download.

  • My Airport TC is setup with Comast as a router but now I can no longer use Airport Utility.  I get a warning stating it used to be part of the network and gives me an option to forget it which I really don't think should be done.  Any suggestions?

    As additional info, my internet is working just fine but had an opportunity to try to get my grandson's DS on the wifi and things went downhill from there.

    Try temporarily connecting your computer directly to one of the TCs available LAN ports using an Ethernet drop cable. You should be able to access it with the AirPort Utility now. Once you verified that the TC is properly configured for what you want it to do along with the Comcast-provided router, you can disconnect the computer.

Maybe you are looking for

  • Adobe ID Sign in worked on 1 computer but not another

    I installed Photoshop CS6 beta on my Windows 8 Tablet PC, signed in with the same Adobe ID that I am using now... everything worked fine.  I do the same on a Windows 7 x64 workstation connected to an Active Directory domain and signing in with the sa

  • ITunes Window does not display correctly

    Hey, I've just done the update to 10.6 and now I've started iTunes again and the windows doesn't fit in m y screen... is there a utility or fix for this i already tried removing preferences from my personal directory. See picture below for a screengr

  • Output device issue in smartform

    Hi All, I have configured smartform and driver program throough nace and testing output . I am facing the problem of  alignment of  output which is changing  depening on Printer. i.e., for printer one the field KOMVD-KBETR(VAT) is prining properly .B

  • Report on Central Excise Part1 & Part2

    Dear Friends, I've been writing a report for identification of  GRNs/Excise Invoice whose only Part1 has been done and not Part2. I have been using the Excise Header (J_1Iexchdr), Part1 (J_1IPart1) and Part2(J_1IPart2) tables. What could be the logic

  • WHAT IS UP WITH IPOD BATTERY?   IT'S SO WEAK....30 minutes and it's DEAD

    Dude, I saw 30 minutes worth of a movie on my Ipod and it died. Is it always that weak or can I do something for it to last longer????? thanks