ELF file's phentsize not the expected size - ERROR on Linux

I followed all the steps shown on the javasoft/tutorial on JNI and created the following files
ThreadTool.c
~~~~~~~~~~~~~~~~~~
#include <jni.h>
#include "ThreadTool.h"
#include <jvmdi.h>
JNIEXPORT jint JNICALL Java_ThreadTool_getThreadStatus
(JNIEnv *env, jclass clazz, jobject thread)
jint threadStatus;
jint suspendStatus;
jvmdiError error = JVMDI_GetThreadStatus (env, thread, &threadStatus, &suspendStatus);
return (threadStatus);
ThreadTool.h
~~~~~~~~~~
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class ThreadTool */
#ifndef IncludedThreadTool
#define IncludedThreadTool
#ifdef __cplusplus
extern "C" {
#endif
#undef ThreadTool_THREAD_STATUS_UNKNOWN
#define ThreadTool_THREAD_STATUS_UNKNOWN -1L
#undef ThreadTool_THREAD_STATUS_ZOMBIE
#define ThreadTool_THREAD_STATUS_ZOMBIE 0L
#undef ThreadTool_THREAD_STATUS_RUNNING
#define ThreadTool_THREAD_STATUS_RUNNING 1L
#undef ThreadTool_THREAD_STATUS_SLEEPING
#define ThreadTool_THREAD_STATUS_SLEEPING 2L
#undef ThreadTool_THREAD_STATUS_MONITOR
#define ThreadTool_THREAD_STATUS_MONITOR 3L
#undef ThreadTool_THREAD_STATUS_WAIT
#define ThreadTool_THREAD_STATUS_WAIT 4L
#undef ThreadTool_SUSPEND_STATUS_SUSPENDED
#define ThreadTool_SUSPEND_STATUS_SUSPENDED 1L
#undef ThreadTool_SUSPEND_STATUS_BREAK
#define ThreadTool_SUSPEND_STATUS_BREAK 2L
* Class: ThreadTool
* Method: getThreadStatus
* Signature: (Ljava/lang/Thread;)I
JNIEXPORT jint JNICALL Java_ThreadTool_getThreadStatus
(JNIEnv *, jclass, jobject);
#ifdef __cplusplus
#endif
#endif
ThreadTool.java (This is my test class)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public class ThreadTool {
public static final int THREAD_STATUS_UNKNOWN = -1;
public static final int THREAD_STATUS_ZOMBIE = 0;
public static final int THREAD_STATUS_RUNNING = 1;
public static final int THREAD_STATUS_SLEEPING = 2;
public static final int THREAD_STATUS_MONITOR = 3;
public static final int THREAD_STATUS_WAIT = 4;
public static final int SUSPEND_STATUS_SUSPENDED = 1;
public static final int SUSPEND_STATUS_BREAK = 2;
public static native int getThreadStatus (Thread t);
static {
String currpath = System.getProperty("java.library.path");
String newpath = currpath+":/home/apota/";
System.setProperty("java.library.path", newpath);
System.loadLibrary ("ThreadTool");
public static void main(String[] args) {
Reaper rp = new Reaper(1000, "apota");
Reaper rp1 = new Reaper(2000, "drice");
rp.start();
rp1.start();
while (true) {
System.out.println("Apota thread "+ThreadTool.getThreadStatus(rp));
System.out.println("Drice thread "+ThreadTool.getThreadStatus(rp1));
I use the following command to compile on Linux
gcc -I/usr/local/java/include -I/usr/local/java/include/linux ThreadTool.c -c -o libThreadTool.so
When I run the java program to test it, I get the following
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/home/apota/libThreadTool.so: /usr/home/apota/libThreadTool.so: ELF file's phentsize not the expected size
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1419)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1343)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at ThreadTool.<clinit>(ThreadTool.java:21)
Whats going on?
(FYI: I am trying ot get the status of a Thread in Java using the JVMDI C API)

aldus99 wrote:
I use the following command to compile on Linux
gcc -I/usr/local/java/include -I/usr/local/java/include/linux ThreadTool.c -c -o libThreadTool.so
I could be wrong, but it looks like you're invoking gcc all wrong.
1) You're using the -c flag which tells the compiler to only compile, yet you're trying to also link.
2) The last time that I used gcc, I believe you had to use a special flag to tell it that you wanted a shared library... something like -G. (It's not smart like Kai's KCC or Forte).
3) On top of all that, you may have to use a -thread option to make sure you are generating multi-thread safe code.
I suggest taking a second look at the man pages for gcc.
God bless,
-Toby Reyelts

Similar Messages

  • My SWF is not the same size as my Flash document size

    My SWF is not the same size as my Flash document size. How can I get it to be the same.
    Thanks

    I spent a little time trying to figure out if there's some setting anywhere that might explain this, but couldn't find anything.  That doesn't mean there isn't any--I just don't know of any.
    I'm wondering if you could take a screen shot that shows the stage size versus the swf size when it plays?  It will help to make sure the problem is what I think you have it explained it to be.
    Does this happen in all files you create or is it occuring just in one particular file?  What version of Flash are you using?  If you can make your file available maybe someone can see if the problem remains when they open it--possibly even track down some cause.  I am unable to open CS4 files (don't have it), but if it's an earlier version I can take a look.
    If you are using CS4, have you updated it to the latest release (10.0.2, I believe)?  There were numerous bugs when CS4 was released, though I don't know if this would be one of them.

  • HP 4500 printing file name but not the context

    I have an hp 4500 connected to my router via an rj45 and have a laptop connected via wireless to my router. When I print a document from word it prints the file name and not the context.
    I have also tried to print an image but the same happen the file name got printed.  
    can any one help how i print the context on the file and not the name?
    is it due to my BT router?

    BT routers don't play well with HP printers, sorry.
    However, before we blame the BT, re-install the HP software from the "Support & Drivers" link at the top of this page.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • I received a replacement iPad. On my original iPad I had dozens of books and PDF's. I completely backed up my original iPad. The categories of my iBook files transferred but NOT the actual PDF and Books. Please help.

    I received a replacement iPad. On my original iPad I had dozens of books and PDF's. I completely backed up my original iPad. The categories of my iBook files transferred but NOT the actual PDF and Books. Please help.

    Are the PDFs and ibooks on your computer's iTunes ? If so then you should be able to re-sync them, if not then you can re-download ibooks for free as long as they are still available in the store and you use the same iTunes account as you originally used to buy them : http://support.apple.com/kb/HT2519 . The backup doesn't contain the contents of the ibooks app, so for them to be restored to the device they needed to be in your iTunes library.

  • [HELP] Error creating property: file. Please verify the Property size is within the Repository limits.

    I am using portal 8.1
    was trying to upload a file (.doc) to the repository, and encountered such error.
    com.bea.content.RepositoryRuntimeException: Error creating property: file. Please
    verify the Property size is within the Repository limits.
    TIA

    Hi,
    hopefully this may help towards a solution.
    Are you using the Loader EJB ?
    1) Are you publishing to a root node within the "BEA repository" ?
    -> does this work ?
    Do you have code that reads something like:
    loader.loadDirectory("firstNode");
    loader.loadFile("firstNode", myBinaryValue, myBytes, myProperties);
    -> Having banged our heads off a lot of walls on this, we think that it is only when you try to publish to a sub-node within the repository that problems appear.
    2) Try publishing to a sub-node in this manner:
    loader.loadDirectory("firstNode/secondNode"); // Ensure exist in Repository
    String contentNodeName = "firstNode/secondNode/myContentNode");
    loader.loadFile(contentNodeName, myBinaryValue, myBytes, myProperties);
    --- Drop us a line as well as replying to this group (as I don't check daily etc). Myself and a collegue, Niamh Fitzpatrick, have been looking at this. Thanks Niamh.
    Hopefully this will work.

  • After clean install of Snow Leopard, Time Machine did not restore all files.  When I try to restore these files I get "Not enough disk space" error.  What do I need to do to get these important files back onto my Mac from my external hard drive??

    After clean install of Snow Leopard, Time Machine did not restore all files.  When I try to restore these files I get "Not enough disk space" error.  What do I need to do to get these important files back onto my Mac from my external hard drive?? 

    Janet.b wrote:
    About 3 years old...pretty dated now I guess.  Am thinking I may just need to have it upgraded by a Mac tech.
    For what the Apple Store's charge you can buy almost buy a new computer.
    Just for giggles I brought my old laptop in for a drive upgrade and asked, they wanted $600 for a drive that only cost $120 at the time and it was a slow 5,400 RPM drive. The new Mac's of a similar make were going for $1000.
    I did the drive replacement myself, got a faster drive of better quality for $300 instead.
    Then another time I asked for a RAM upgrade from 4GB to 8GB, they wanted to charge $400 + $35 for the labor.
    The same RAM is on Crucial.com for $90 and all I need is a 00 micro phillips screwdriver.
    So you see what's going on here.
    I think what you should do, if your out of warranty/AppleCare, is to call up the local PC tech guy who also does Mac's and have them fix you right up.
    They can offer more personalized care which you need. Clone your old drive to the new and everything.
    With Apple they are overworked at the Genius Bar and just place roadblocks so you buy a new machine instead.
    For instance, all new iMac's now have proprietary drive software installed on the hard drives for heat monitoring. So now the only choice a user has is to bring their iMac into a Apple Store for a very expensive drive upgrade, which a person then decides the money is better spent buying a new machine.

  • Exporting CS5 file to PDF causes the document size to enlarge on PDF!

    I need help... FAST! I have a 14-page 4CP calendar that bleeds on three sides. The bleed size is 3/16", per the printer's requirements. When I export the file from InDesign to PDF, the overall page size is increased by exactly 3/16"! I nearly missed this and approved the job for printing. Luckily, I turned on the rulers in the PDF file to double-check all the page elements were properly placed and wouldn't fall on the fold. That's when I discovered that objects that I had placed on a page were extending into the fold and onto the next page. I went back to my InDesign file and found that those elements were properly placed and did not extend into the fold as they were doing in the PDF file. I tried different PPDs, exporting the file with and without printer's marks... all to no avail. I finally printed the file to a Postscript (PS) file and then exported that file to PDF and got it to work. However, I would prefer to avoid that extra step. What is going on? Why is the file enlarging (coincidentally the EXACT same amount that the bleed was set for) and/or what am I doing wrong? Any help would be GREATLY appreciated!

    Are you familiar with bleeds etc?  i.e. have you used them before?  It sounds to me as if you're doing everything mostly right but not realising that Acrobat and Reader (please don't mention Mac Preview) show the size including the bleeds when you choose those options upon export from Indesign.
    Go back and check your document setup.  Page size should be excatly just that, finished page size.  Bleed settings (you might have to tick more options to see them) should be also just that.  Export the PDF, go to 'Marks and bleeds' tick 'Use Document bleed settings' and you're done.  The document will appear bigger.
    oh and use the camera button for screenshots.
    You can see the actual size of the doc by going Advanced > Print Production > Crop Pages and toggling between TrimBox (the size the page will get trimmed to) and CropBox (which includes the bleeds and is what displays).

  • In iPhoto, I can see the thumbnails but not the full-size photos

    In iPhoto, I can see the thumbnails along the bottom but I can't see the full-size photos - I just see a black screen. What should I do?

    There are several possible causes for the Black Screen issue
    1. Permissions in the Library: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the option to check and repair permissions.
    2. Minor Database corruption: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    3. A Damaged Photo: Select one of the affected photos in the iPhoto Window and right click on it. From the resulting menu select 'Show File (or 'Show Original File' if that's available). (On iPhoto 11 this option is under the File -> Reveal in Finder.) Will the file open in Preview? If not then the file is damaged. Time to restore from your back up.
    4. A corrupted iPhoto Cache: Trash the com.apple.iPhoto folder from HD/Users/Your Name/Library/ Caches...
    5. A corrupted preference file: Trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    If none of these help:
    As a Test:
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Itunes saves my songs in a new file that is not the default setting

    My settings for downloading purchased music from itunes is c:\pop\music.
    Since a few months itunes generates a 2nd file named "music" within the existing file "music" and downloads all new songs in there. (It just happens, I surely didn´t tamper with the settings.)
    So everytime I buy music from the itunes store the new files are now saved under c:\pop\music\music.
    Also my ipod now only synchronizes the new files as long as they´re in c:\pop\music\music and not under c:\pop\music where I want to have them to be able to combine them with the others.
    I checked under "Information" of the new songs and for each song the setting for the place where it´s (supposed to be) saved under is still c:\pop\music. Also my default settings are still c:\pop\music.
    So why does itunes create a new file?????
    I can change almost every entry under "Information" but not the storage location.
    I don´t know why this happened and how I can change this back. Can anyone help me here, please!

    What im trying to say is, i purchased a imac after getting a new phone, which was on windows.
    So i now need to sync it so i can enjoy all the easy pleasures of genius so on and so on
    However not eveything made the shift over, so now my itunes on phone has songs from my old library, that due to whatever multiverse lays between mac and pc, are now not available on my new smarter and amazing mac.
    So if i sync the phone i will lose my songs, yes which did cost me money!! Does anyone know a way to prevent this?
    please bare in mind I am Mac simple, quite ******** really
    thank you in advance

  • When downloading a file, only the first word of the attached file is included in the 'file name' field, not the entire file name, as it used to.

    Regardless of filetype, only the first word of the file is filled into the "Enter name of file to save to..." dialog box. I'm set up to 'save file' in the FF Options > Applications tab for the basic MS and Adobe files. To successfully use/find the downloaded file, I type in the remainder of the file name. Have I overlooked an additional setting? Running FF 18.0 on a Win7 PC.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    A possible cause is that the server sends a wrong response header.
    The server may not comply to RFC 5987 and sends a wrong Content-Disposition:attachment; filename header.
    * https://developer.mozilla.org/en/Firefox_8_for_developers#Network

  • F110 DME File selected is not the correct file

    Hi Gurus,
    Could you advise on this issue please?
    We have executed a payment run F110 for vendors on SAP. The payments documents are created successfully. When we view the payment list via F110 -> EDIT -> Payment List -> generate via RFZALIZ0 program the payments are all correct.
    But there is a problem with the DME file. Under F110 -> Environment -> Payment Medium -> DME Administration the total displayed for teh DME file is all fine. However, when we view the DME file created by the run using the Display (gllasses) icon on this screen the data is not correct. The system is selecting data from the last payment run executed in this company code. When we do a download of the file, it is the previous run's data that is contained in the file and not the current run.
    The DME variants all seem to be maintained correctly. We have executed payment runs for other company codes and these are all picking up correctly. The DME files are all being stored in the same DME filepath /usr/sap/PMG/dme/ plus company code ID.
    When we use FDTA to select out the DME file, again we get the same view as we see in F110 -> Environment -> Payment Mdeium. The totals on the F110 run look good. But the data in the DME file is incorrect.
    Can you advise why is the system picking up the wrong DME file for the paymnet run in this company code. All other company codes are fine. We have tested the problem Company Code in our Quality system (where the DME filepath is also /usr/sap/PMG/dme/ plus company code identifier and it works OK there.
    How do we get the system to link to the correct DME file data?
    Thanks for your quick response.
    Michael Ryan

    Hi Akhilesh,
    We don't use the IDOCs here but just a DME file. The issue here was the DME filesystem is only mounted on one of the application servers. The end user was logged onto the wrong application server and so the paymnet run could not find the file. It was theerfore picking up the last file that it could see from the server that the user was logged onto.
    When the user logged onto the correct serevr, the payment run then pciked up the file.
    Thanks & regards
    Michael

  • How can I make sure under Windows 8 in Explorer to get a real pdf document content file miniature and not the Adobe logo miniature?

    This is not a typical Windows 8 problem, I had the same problem with all my previous Acrobat versions on all previous Windows versions.
    How can I make sure that when consulting pdf files via Windows explorer the pdf file is represented as a genuine miniature of the document content itself and noit just a document icon with Adobe logo?

    Hi Josialaers,
    Turn the 'Preview Pane' ON and you should be able to see the content of the pdf when clicked.
    When 'Show preview handlers in preview pane ON' is checked in 'Folder Options' of Windows Explorer.
    Regards,
    Rave

  • CS4 Save For Web not the right size

    I'm having problems with Illustrator images when I use the Save For Web. The image size always comes out the same size as my artboard. In other words I set up a new document to be letter size, create my drawing within that document. My drawing is only about 300 px by 150 px. When I Save for Web my image is the same size as the document or artboard not my drawing. Is this something new in CS4? Do I have a preference set incorrectly? The only way I have found to get rid of the background is to adjust the size of the artboard manually. Is there a way to adjust the artboard to fit my drawing automatically, like cropping to an object in Photoshop?

    CS,
    Basically the same issue was up, and answered, recently here:
    http://forums.adobe.com/message/2667045

  • Can the font size in Itunes Help files be increased? The font size is way to small to... 4pt!

    Itumes for Windows 10.6
    Windows 7 x 64
    Is there a way to increase the font size displayed in the Itunes Help files? The size seems to be < 4pt and very difficult to read. Please advise.

    Sometimes this can be altered by going inside the "plist" for the project and making specific changes. It is beyond my scope, but someone on these forums should be talented enough to suss it out.

  • When exporting to PDF, the pictures are not the same size I "placed" them

    I am "placing" pics that are 653 x 983 pixels, 300 DPI, using CS4.  However, my issue is when exporting to PDF, the PDF doesn't look like the same size I "placed" the pic until I blow it up to about 350%.  I do not have a printer set up to my computer so I can't do the print/pdf option.  Am I doing something wrong here?  I can't figure it out.  Your help is appreciated.  Thanks!

    Well, right when I open the PDF, it's just way too small, imagine it being the size of a business card.  I have to keep zooming in until it gets to the size I originally intended it to be.  When I create a new document am I suppose to make it the same size as the picture?

Maybe you are looking for

  • SPLITTING MORE THAN ONE LINE ITEM IN ECC6.0

    Hi everyone. I am using New GL functionality in ECC6.0. I have a big question regarding multiple objects splitting. Ej: Purchase of a service. If I set one cost centre in the expense line item, the profit centre and segment are determined automatical

  • ESS Benefits and Payments

    Hi, I am getting the following errors when i click the "FlexBens: Open Enrollment" as well as "FlexBens: Print Form" on ESS benefits and payments No correct adjustment reason specified: com.sap.pcuigp.xssfpm.java.FPMRuntimeException: No correct adjus

  • Edit titles in VOB video files

    I created a dvd from still images made into a slideshow in Photoshop 10 and imported to Premier Ele. 10.  the images are of fungi and each fungi has a "title" added to name the fungi.  This burned to a DVD to play on widescreen HD TV.  Some of the "t

  • Difference between intercompany sales and STO (inter)?

    HI Experts Can any one tell me what is the difference between  between intercompany sales and STO(inter)? LNaidu

  • Acrobat Reader - Tools - Export PDF shows trail has ended . . .

    I am paid up for a year.  But under tools, while reading in Adobe Reader (ver 10.1.1) the little blue box is still showing "Your Trail has eneded . . . Subscribe now"  But when I log in I can use the Export feature.  But this blue box still does not