This discussion is archived
6 Replies Latest reply: Feb 27, 2013 12:47 AM by NeoSong RSS

error ORA-93652 raised when i close a java application imported into a form

NeoSong Newbie
Currently Being Moderated
I imported a java application which switches background color when corresponding botton is clicked into a simple test form.I added the class path to the CLASSPATH environment variable and the default.env file.
After I compiled the form and run it, when I clicked the button which would trigger the application, the application run well;
but when i close the application window manually(by clicking the top-right close button) and then click the trigger button, the error ORA-93652 came out.

Anybody could help me out,please? Thanks a lot!

here is the WHEN-BUTTON-PRESSED trigger code.

declare
obj ORA_JAVA.JOBJECT;
a0 ORA_JAVA.JARRAY;
begin
obj := actiontest.new();
ora_java.delete_global_ref(obj);
end;
  • 1. Re: error ORA-93652 raised when i close a java application imported into a form
    krzysztof.lorencki Explorer
    Currently Being Moderated
    Hi
    I'm not 100% sure but try to remove following code:
    ora_java.delete_global_ref(obj);
    you should use DELETE_GLOBAL_REF only for global objects created by ORA_JAVA.NEW_GLOBAL_REF
    Regards
    kikolus
  • 2. Re: error ORA-93652 raised when i close a java application imported into a form
    NeoSong Newbie
    Currently Being Moderated
    Thank you for your reply.

    In fact firstly the application is just a normal application with a void main method. So I call it in the form by using

    actiontest.main(a0);

    the error occured.

    then I replace the main method with a constructor method, that's why I can use new() method to call it. Well, the problem is still there.

    just a moment ago I tried the method you advised but the error still occurred.

    And I just find that if I click the trigger button a few times without closing any one of the windows, then if I close one of them, all the others exit, too.

    There must be something to do with this, while I don't know what it is.
  • 3. Re: error ORA-93652 raised when i close a java application imported into a form
    krzysztof.lorencki Explorer
    Currently Being Moderated
    HI,
    It's strange behavior :( Are you able to run your application outside forms (as standalone Java application)? Is it working fine? I use Java forms as a beans, never as standalone application, but there wasn't any problems when closing window. Maybe you should convert your application to bean?
    Regards
    Kikolus
  • 4. Re: error ORA-93652 raised when i close a java application imported into a form
    NeoSong Newbie
    Currently Being Moderated
    Thanks again for your reply.
    Firstly the application is just a very simple one, when you click a button, the panel background will switch its color, and it works very well using java command in command line mode.
    Just as what you advised I am studying how to use beans in oracle forms.Now I have known that how to use java beans in a java application. But before that, I found that somebody said Java application can be imported into forms.Though what he said is not an application, that is ,no popup panel, just one class which can calculate numbers or show some messages. I think there is no reason why an application can't work.

    Regard,
    Neo

    Edited by: untied-boat on 2013-2-25 下午11:50
  • 5. Re: error ORA-93652 raised when i close a java application imported into a form
    krzysztof.lorencki Explorer
    Currently Being Moderated
    Hi,
    I never try embedded java application into forms, but use Java beans very often. This beans can look like a standalone application (with own window manager etc.) It's rather simply (I can describe you step-by-step procedure how to run it within forms). All beans implements a interface named IHandler. This interface is responsible for communication between forms engine and your beans (e.g. checks if bean is still alive, send message to forms about finishing work etc.). Maybe this is missing when you run your applicaiton: forms engine doesn't know when the control should back to forms? I don't know.
    There is also possibility that your code is OK, but OAS is unable to see your classes (probably you get FRM-93652 error not ORA-93652) or OAS sees old version of class. As far I know there are 2 settings responsible for that:
    - CLASSPATH variable within your env file (e.g. default.env) - should include full path including file name
    - formsweb.cfg file: archive section which is responsible for initial loading libraries (normally there is only frmall.jar) - maybe this is missing in your case
    regards
    kikolus
  • 6. Re: error ORA-93652 raised when i close a java application imported into a form
    NeoSong Newbie
    Currently Being Moderated
    Thank you for your reply.
    I can get a lot of useful information from your reply.I am reading a book about java, in fact, a classical one, by Horstmann, and I think you must know him.
    Now I am studying the part of java security.
    I will try the beans in form, but may be some other days in the future.Thank you.

    Regard
    Neo

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points