This discussion is archived
4 Replies Latest reply: Aug 30, 2013 11:48 AM by usman_noshahi RSS

.jar file reusablility issue in oracle forms

usman_noshahi Newbie
Currently Being Moderated

hello all

 

i am using oracle forms

{code}

Forms [32 Bit] Version 10.1.2.0.2 (Production)

Oracle Toolkit Version 10.1.2.0.2 (Production)

PL/SQL Version 10.1.0.4.2 (Production)

Oracle Procedure Builder V10.1.2.0.2 - Production

{code}

 

 

and using Database 10g

 

{code}

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE    10.2.0.1.0      Production

TNS for 32-bit Windows: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

{code}

 

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..

PROBLEM:

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.

 

thanks

  • 1. Re: .jar file reusablility issue in oracle forms
    Michael Ferrante (Oracle) Guru Moderator
    Currently Being Moderated

    I see several potential issues here:

     

    1.  Oracle Forms 10.1.2.0.2 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 10.1.2.0.2 is an unpatch version of the product.  The last full patch made available for this product family was 10.1.2.3 (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 11.1.2.1 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.

     

    http://www.oracle.com/webfolder/technetwork/tutorials/obe/forms/11g/sms_webservice/webservices_forms_11g.htm

  • 2. Re: .jar file reusablility issue in oracle forms
    usman_noshahi Newbie
    Currently Being Moderated

    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

        )

    Is

      Ora_Obj Ora_Java.Jobject;

      Com_P    Varchar2(10);

      Cent_No  Varchar2(100);

      Send_Sms Number;

      Mesg     Varchar2(200);

    Begin

      Ora_Obj := Smsclient.New(1);

      ---------------------------

     

      Smsclient.Setcomportname(Com_P);

      Smsclient.Setmsgcenternum(Cent_No);

      --

     

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

     

    Exception

    When Ora_Java.Java_Error Then

      Message(Ora_Java.Last_Error);

    When Others Then

      Message(Sqlerrm);

    End;

     

    --------------------------------------------------------------------------------------------

     

     

    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..

     

    ------

     

     

    thanks

  • 3. Re: .jar file reusablility issue in oracle forms
    usman_noshahi Newbie
    Currently Being Moderated

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

     

    please....

     

    thanks

Legend

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