4 Replies Latest reply: Aug 30, 2013 1:48 PM by usman_noshahi RSS

    .jar file reusablility issue in oracle forms


      hello all


      i am using oracle forms


      Forms [32 Bit] Version (Production)

      Oracle Toolkit Version (Production)

      PL/SQL Version (Production)

      Oracle Procedure Builder V10. - Production




      and using Database 10g



      Oracle Database 10g Enterprise Edition Release - Prod

      PL/SQL Release - Production

      CORE      Production

      TNS for 32-bit Windows: Version - Production

      NLSRTL Version - Production



      i am developing an application in oracle forms that sends message through GSM mobile when any transaction is commited.

      i wrote a class in java , made .jar file , edited default.env file CLASSPATH = "my .jar file"

      everything is working fine when i am trying the code in NETBEANS IDE, it sends messages again and over again with no delay..


      the problem is that when i try to send message from oracle forms using that JAR file , it sends message for only single time , after that it neither shows me any error nor sends the message,

      (1) can it be problem of closing COM port for reusablity.

      (2) any other way to reuse the jar file.

      (3) should i program to closo the used port. (but java program is working very well in NETBEANS IDE).


      please suggest me what should i do to reuse .jar file again and over again.



        • 1. Re: .jar file reusablility issue in oracle forms
          Michael Ferrante-Oracle

          I see several potential issues here:


          1.  Oracle Forms uses Java 1.4.2 on the server side.  I suspect you did not use Java 1.4.2 to build your java code.   If I am correct, there likely is a compatibility issue.  Do not attempt to change the Java version used in the installation to any version newer than the 1.4.2 family.  Doing so will break the installation.


          2.  Oracle Forms is an unpatch version of the product.  The last full patch made available for this product family was (Patch ID 5983622).  This patch includes hundreds of bug fixes compared to what you are using.  Although it does not include a newer JDK, the fixes it does include likely are valuable.


          3.  You did not mention how you are calling this external java, so being too specific will be difficult.  Please explain if you are using the Forms Java Importer, HOST command, Java Bean, or other method of calling your external java code.


          Although it has little to do with the problem, I thought it important to mention that Application Server (Forms/Reports) 10.x is no longer supported.  This is an old version.  It is recommended that you upgrade to version as soon as possible.  Keep in mind that this version uses Java 6 on the server side, so it may help to correct your current issue.


          Finally, you may want to consider reviewing the following as it may offer some hints.  This information is for Forms 11, but the same concepts can be used for Forms 10 assuming the correct Java version is used.



          • 2. Re: .jar file reusablility issue in oracle forms

            thanks for your reply.


            sorry if forgot to mention that how i am using this java code.

            yes! i am using that java code using Java Importer in oracle forms 10g.

            importing that jar file i used PL/SQL code to use the static public veriables in oracle forms



            Procedure Send_Message(

                Cel_N In Varchar2



              Ora_Obj Ora_Java.Jobject;

              Com_P    Varchar2(10);

              Cent_No  Varchar2(100);

              Send_Sms Number;

              Mesg     Varchar2(200);


              Ora_Obj := Smsclient.New(1);







              Send_Sms:= Smsclient.Sendmessage(Ora_Obj,Cel_N,Mesg);



            When Ora_Java.Java_Error Then


            When Others Then







            this Smsclient.Sendmessage Class is working very well in both plateforms in NETBEANS IDE and oracle forms but the difference is in this class that

            in NETBEANS IDE (when i run this class using F6 ) it works every time with no delay

            but when i use this same class in pl/sql code through oracle forms it works only for one time.

            COM ports and GSM modem is working property but why .jar file works for once.. and when i restart OC4J & oracle form at run time then it works for only once , meanse after starting OC4J i am able to send message through mobile for one time, means .jar file works only once, why not every time i call the class through oracle form..


            what should i check .. please..






            • 3. Re: .jar file reusablility issue in oracle forms

              i am still having problem , .jar file is working only one time,