How to catch exception from shared library on Linux?

Description:
JNI dynamically loads shared library. Shared library throws exception (class CTestException). JNI can not catch it by CTestException name, only (...) works.
My config:
Linux RH AS 4 (x86 64)
gcc: 3.4.5
glib: 2.2.5
Java 1.5.0_06
g++ compiler options for JNI and shared libraries:
g++ -Wl,-E -fPIC -shared ...
There are multiple bugs on Java bugs database regarding C++ ABI incompatibility between Java binaries and stdc++ libraries linked with native code. But I could not find any conclusions on these bugs. Only plans/suggestions to recompile Java on new gcc. These bugs were quite old (regarding Java 1.3, 1.4). Now 1.6 is available but still there is same incompatibility. Maybe I am missing something and there is a way to fix this problem? Like to use specific gcc/glib versions for compilation? How people solve such problems? Any help is appreciated.

It isn't any different; the commands are the same. You can find the exp executable in tehe $ORACLE_HOME/bin directory.

Similar Messages

  • How to catching exceptions from another thread

    hi,guys,i have some code like this:
    public static void main(String[] args) {
    TimeoutThread time = new TimeoutThread(100,new TimeOutException("超时"));
         try{
         t.start();
         }catch(Exception e){
         System.out.println("eeeeeeeeeee");
    TimeoutThread will throws an exception when it runs ,but now i can't get "eeeeeeeeeee" from my console when i runs the main bolck code.so ,somebody help me ,thk.

    hi,ejp,this is my scene:
    getHttpParty(String name) is a method get some information from a web site,this maybe cause many times.now this method is called in my main(String args[]) method.
    i want to terminate getHttpParty if it runs 2s, can you give some simple code to do this.
    thank you very much.
    Edited by: user5449747 on 2010-11-17 上午12:03

  • How to copy media from shared library from ipad

    Hello,
    I have home sharing turned on and i have a local computer as a media server which stores all my media files. I can access the data from within my network on all my devices.
    I am hoping there is an easy, with just using the ipad(iphone), to choose a movie from the library to take with me on a trip. It is easy to copy media from computer to computer with itunes. I was hoping there is an equally easy way from the ipad or iphone.
    For example, launching the video app allows you to access shared libraries. Is there a way to copy that content to the ipad or iphone from an app?
    FYI, i have all pc based computers
    Thanks,
    Jeremy

    Hi ralph,
    Can i sync a particular movie without logging into the pc? Thats what I am hoping to accomplish. I want to navigate to a movie thats in my home shared library "from my ipad" and copy it to my ipad. I just cant find a way to do it

  • I want to move a movie from Shared Library to LIbrary, how do I do this?

    I want to move a movie from Shared Library to LIbrary, how do I do this?

    this extra info helps a lot. with home sharing you should be able to just import the file from your iMac into your MBP. this is the way i've done it at home.
    -just make sure both are on with itunes open
    -select your imac's library
    - hightlight the file you want then click on import towards the bottom of the screen.

  • How to create a c++ shared library (.so) for linux real time (for myRio) with Eclipse to use in LabView?

    I tried already these Tutorials and Advices but I didn't find a solution:
    - http://www.ni.com/tutorial/14625/en/
    - http://www.ni.com/tutorial/14690/en/
    - http://forums.ni.com/t5/LabVIEW/Shared-Library-on-myrio-Linux-Real-time-system/m-p/2842540/
    - http://forums.ni.com/t5/LabVIEW/How-to-create-shared-library-for-linux-real-time-target-in/m-p/28218...
    - and some more
    I want use c++ codes on linux real time. For testing reasons I want to have a function that adds 2 values and gives the result.
    I've done these steps:
    1. writing a c++ file in Eclipse (see screensot 2)
    2. building a shared library (.so) from my c++ project in Eclipse (with Cross GCC)
    3. putting this file on myRio (path: /usr/local/lib/)
    4. creating a VI that calls this library from Labview with a "Call Library Function Node" (see screenshot3)
    5. Setting the properties for the "Call Library Function Node" (see screenshots 4-7)
    After I run this VI i get this error message: LabVIEW:  (Hex 0x627) The function name for the ... node cannot be found in the library. To correct this error, right-click the Call Library Function Node and select Configure from the shortcut menu. Then choose the correct function name. (see screenshot1)
    I've tried a lot things to solve this problem but I couldn't find a solution. Would be very happy if anyone can help me. I guess that I have to edit my c++ code to export my function (symbol). But I have no idea how to make it. I also tried it with a dll file in the same folder but it didn't help.
    Perhaps someone can send an example which works on myRIO.
    Thanks!
    screenshot1
    screenshot2
    screenshot3
    screenshot4
    screenshot5
    screenshot6
    screenshot7

     can see it in the screenshot8 there is a function called "_Z8AddierenddPd" instead of "Addieren". I copied this name to Labview (see screenshot9) and it worked.
    I'm sure that there is a way to compile the shared folder with gcc without decorations (mangling). But I don't know how. If someone has a recommendation I would be very glad!
    Prepend each function declaration that you want to be available without name decoration with
    extern "C" <your function declaration>
    Or if you have multiple functions you want to export you can in the header file where you declare your functions simply use:
    #ifdef __cplusplus
    extern "C" {
    #endif
    <all your function declarations>
    #ifdef __cplusplus
    #endif
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Music from shared library will not display by artist or album.

    How do I set up home sharing to display music from shared library by artist and album?

    I am not sure if the fix that cuatro476804 suggested is the issue here.  I have also been experiencing freezing issues with my Apple TV since the latest Apple TV/iTunes updates.  Here is the bug report I just submitted to Apple:
    Since the last update to Apple TV or the last updates to iTunes (not sure which is the culprit) Apple TV freezes when trying to play music streamed from iTunes on a Mac.
    I have an iMac running iTunes [11.01 (12)] and a 3rd gen Apple TV running the latest OS release as of 12-20-2012.  Since the last software update for iTunes and Apple TV, the Apple TV will freeze when playing a song after about 10 - 20 seconds.  This happens whether I am using my computer directly or when using the "remote" app on my iPhone 5.  I can restart my song again by pressing play, but the song will freeze again after another 10 - 20 seconds.
    I can temporarily cure the bug by unplugging my Apple TV for 5 seconds to cold start the gizmo, and then both iTunes and Remote seem to be able to stream without any issues.
    but when I try to play music the next day, the same freezing issue occurs again like clockwork.
    I thought this was just a rare buggy issue, maybe even a WiFi or other communication problem, but I have been playing tunes on my Apple TV for a couple years streamed from my iMac with not problems.  This only started happening after the last software update.  Again, not sure if this is the Apple TV update, or the iTunes 10.01 (12) update causing this.
    Daily rebooting of the Apple TV is not an acceptable solution.  Were this a Microsoft product, sure, but Apple product... its just supposed to work :-)
    I hope others will report the same issue so this gets repaired soon.
    -- Jon

  • How to catch exception in JSP????

    how to catch exception in JSP?
    I use JDeveloper 3.1
    I use connection with database .
    When I insert record in database
    when have duplicate of primary key
    how to catch this exception and
    back to previous page?
    I trying with folowing:
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <% try {
    RowEditor.setUseJS(true);
    RowEditor.initialize(pageContext, "package2_Package2Module.Drzavi1View");
    RowEditor.setSubmitText("Save");
    RowEditor.setTargetUrl("Drzavi1View_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    catch(Exception e) {
    %>
    <script>
    alert("primary key duplication");
    history.back();
    </script>
    <% } %>
    but i't not working
    please help me

    i catch exceptions as you do, i don't have any problem...
    are you throwing the exception from your bean?
    actually i don't catch an Exception, but an SQLException...
    but it works... here is my code...
         try
    myclass.addElement(); // this is an insert into Oracle
    catch( DataBaseFailException e ) /// an exception that i throws inside after i receive an SQLException
              session.setAttribute("gMessage","e.getMessage()); // error code

  • How to delete video from iTunes library? del and shift+del are not working - no any reaction

    how to delete video from iTunes library? del and shift+del are not working - no any reaction.

    seb963 wrote:
    Hi
    Currently, iMatch is turned off on my computer, as I do not want to upload any more songs. If I turn it on, will it upload all songs that are currently in my library? Is there another way that deleting them one by one?
    You must enable iTunes Match on the new computer. The best way to accomplish what you want to do is to create a new, empty library by launching iTunes while holding down the Option key (Shift on Windows) and choosing "new library." Do not let iTunes scan for new content, but do enable iTunes Match on the empty library. Once the scan is finished you may delete tracks from the cloud. When you are done switch back to the main iTunes library.

  • HT201317 how to delete photos from photo library iphone4s

    how to delete photos from photo library iphone4s?

    Nope I am using the same Photo Library, not the camera roll and by the looks of it you don't have your iphone updated to the newst version because I have an extra field in the bottom bar for photostreaming.
    When I go in any of the above folders I can remove pictures as well as you can see in the pictures below!?
    Hope this helps...

  • HT201317 How to delete photos from photo library?

    How to delete photos from photo library?

    Connect your device to your computer, open iTunes, go to the Photos tab of your iTunes sync settings, uncheck the folder containing the photos you want to remove (or to remove them all, uncheck "Sync Photos"), then click Apply at the bottom to sync your device.  If you only want to remove individual photos rather than the entire folder, move them out of the folder on your computer, then sync.

  • HT2731 I have 2 iPhone 4's in my name.  How do I stop from sharing my photos from one phone to the other.  When I take a photo it shows up on my husbands phone and vise versa. We have our iCloud turned off

    I have 2 iPhone 4's in my name.  How do I stop from sharing my photos from one phone to the other.  When I take a photo it shows up on my husbands phone and vise versa. We have our iCloud turned off in both phones.

    well i think one of you should change yalls name on the iphone its may not be the icloud but the names

  • How to drag and drop from shared library to iphone/ipad?

    Since our Mac Pro has more storage, that's where I keep our iTunes videos, to avoid taking up space on my wife's laptop. Sharing the libraries works ok, except for one issue.
    When my wife wants to put movies onto her iPhone or iPad, iTunes won't let her drag and drop them directly from the shared library. She can copy them just fine to her local library and from there to the devices, but that is cumbersome and takes up disk space.
    Please don't tell me it isn't possible because we did have it working for some time, I just don't know what's changed. The devices are set to "manually manage", drag and drop works locally, just not from the share.
    Thanks!

    Take a look at this tutorial: [url http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html]How to Use Drag and Drop and Data Transfer.
    If you read it carefully and study the samples, I think you should get rid of your first question.
    Concerning the second question, you can overwrite the isCellEditable(int row, int column) method to return false. This will block any editing from the table.
    Hope this helped,
    Regards.

  • How to catch exception thrown from a function module?

    Hi all,
             When we are calling a function module from JSPDynpage setting some import parameters, If in some case an exception is thrown in the function module.  How can we catch the same exception in the JSPDynpage program?
    Thanks & Regards,
    Ravi

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • Help Me, How to catch exception thrown from ejbStore

    Hi,
    I am working on application running on Iplanet Application Server 4.0. Problem is the application exception thrown from the ejbStore don't reach the calling servlet, calling servlet receive TransactionRollback exception which is system exception. But there is no sign of my application exception thrown from ejbStore. Can anybody tell me how I can get my ApplicationException thrown from ejbStore in my calling servlet.
    I am calling entity beans set method in servlet and in entity bean ejbStore method I am throwing Application exception.
    in entity bean
    public void ejbStore() throws MyException
    if(true) throw new MyException();
    in servlet
    try {
    MyEntityHome home = .......
    MyEntityRemote remote = home.findBy.....
    remote.setMyValue(MyValue value); //Transaction required Container managed
    }catch(MyException e) {
    e.printStackTrace(); // Not cahcing My Exception
    }catch(Exception e) {
    e.printStackTrace(); //catching TransactionRolledBackException
    Thanks
    Shakti

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • TS2972 How do I stream music from shared library to my iPad/iPhone?

    I have home sharing activated on PC and iPhone and iPad. Music stored on PC shows up on iPad/iPhone when I select my shared library. When I select a song on my iPad/iPhone to play it is played on the PC (i.e., through the PC speakers) and not through the iPad/iPhone speakers - like the iPad/iPhone only acts like a remote control device for the PC iTunes Player instead of streaming the song to my iPad/iPhone. Any suggestions?

    What are you using to play them? If you are using the Remote App, then yes that is the expected behavior.
    You must go into the Music or videos App, and find the Shared Library. It will then play in the iPad or iPhone.

Maybe you are looking for

  • 2008 macbook pro is running very slow.

    Even simple things like trying to change a font in excel cause the spinning wheel to display before the font selection becomes visible. Any suggestions to resolve this?  I have over 40gb of storage available and 4gb of memory.

  • Tint Tween and Button

    So I finally have my buttons working! Thanks for the help... but... I want to include a tint tween. I know how to create them, but not how to link them to my button. Do I need to put them inside my button symbol? The tweening would start at mouseover

  • Compile With GTK2 vs GTK3

    A number of programs I use are now using GTK3 (shotwell & remmina for example) and they look like crap on my system.  I know I can install a GTK3 theme to improve the look but I would prefer to use my current GTK2 theme if that is an option.  There i

  • Missing sent stuff .

    An inconsistent bother of some vaguely familiar genesis in the old Mail App . This reminds me of the recent loss's in the Sent Folder of posts containing attachments . The difference now is that instead of warning me that something cannot be saved it

  • HT4972 I have an iPhone 3g and trying to update from 4.1 version to newest...help?

    I have an iPhone 3g and I am trying to update from 41. version to newest 6.1....won't wo rk...help!!