14 Replies Latest reply: Aug 16, 2012 8:33 AM by CraigB RSS

    implementing bava bean in form?

    yash_08031983
      hello experts,
      i am using oracle 10g and forms 10g.
      i found a fmb of java bean on net. download it and trying to run it.
      following step which i follow.

      download file.
      keypressed.jar: i copy it in D:\DevSuiteHome_1\forms\java

      changes in cfg a,d default env file in d2k:
      D:\DevSuiteHome_1\forms\server
      formsweb.cfg changes:
      [webutil]
      WebUtilArchive=frmwebutil.jar,jacob.jar
      WebUtilLogging=off
      WebUtilLoggingDetail=normal
      WebUtilErrorMode=Alert
      WebUtilDispatchMonitorInterval=5
      WebUtilTrustInternal=true
      WebUtilMaxTransferSize=16384
      baseHTMLjinitiator=webutiljini.htm
      baseHTMLjpi=webutiljpi.htm
      archive_jini=frmall_jinit.jar,D:\DevSuiteHome_1\forms\java\keypressed.jar
      archive=frmall.jar
      lookAndFeel=oracle

      defaul.env file changes:
      CLASSPATH=d:\DevSuiteHome_1\j2ee\OC4J_BI_Forms\applications\formsapp\formsweb\WEB-INF\lib\frmsrv.jar;d:\DevSuiteHome_1\jlib\repository.jar;d:\DevSuiteHome_1\jlib\ldapjclnt10.jar;d:\DevSuiteHome_1\jlib\debugger.jar;d:\DevSuiteHome_1\jlib\ewt3.jar;d:\DevSuiteHome_1\jlib\share.jar;d:\DevSuiteHome_1\jlib\utj.jar;d:\DevSuiteHome_1\jlib\zrclient.jar;d:\DevSuiteHome_1\reports\jlib\rwrun.jar;d:\DevSuiteHome_1\forms\java\frmwebutil.jar;d:\DevSuiteHome_1\forms\java\keypressed.jar


      also i set the system enviornment path:
      d:\DevSuiteHome_1\jdk\jre\bin\classic;d:\DevSuiteHome_1\jdk\jre\bin;d:\DevSuiteHome_1\jdk\jre\bin\client;d:\DevSuiteHome_1\jlib;d:\DevSuiteHome_1\bin;d:\DevSuiteHome_1\jre\1.4.2\bin\client;d:\DevSuiteHome_1\jre\1.4.2\bin;d:\oracle\product\10.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\oracle\product\10.2.0\db_1\jdk\bin


      when i open the fmb and show the layout the this message is commit:

      frm-13008 : cannot find javabean with name 'oracle.forms.fd.keypressed.'

      i found some thread on google but not found solution.
      one i found , version of .jar file that i don't know.

      please suggeste me.

      thanks yash
        • 1. Re: implementing bava bean in form?
          437800
          You need to add your .jar files path to FORMS_BUILDER_CLASSPATH in windows registry

          Like HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_DevSuiteHome10g..
          • 2. Re: implementing bava bean in form?
            yash_08031983
            please suggest how?

            thanks
            yash
            • 3. Re: implementing bava bean in form?
              437800
              Click Start
              Click Run
              Type REGEDIT
              Click OK
              The Registry Editor will now open
              Browse to the key containing the value you wish to modify. Click once to highlight the key.
              The values contained in the key will now appear in the right pane. Right-click the value you wish to modify.
              • 4. Re: implementing bava bean in form?
                yash_08031983
                i made the changes in forms_builder_classpath as:

                d:\DevSuiteHome_1\forms\java\frmbld.jar;d:\DevSuiteHome_1\jlib\importer.jar;d:\DevSuiteHome_1\jlib\debugger.jar;d:\DevSuiteHome_1\jlib\utj.jar;d:\DevSuiteHome_1\jlib\dfc.jar;d:\DevSuiteHome_1\jlib\help4.jar;d:\DevSuiteHome_1\jlib\oracle_ice.jar;d:\DevSuiteHome_1\jlib\jewt4.jar;d:\DevSuiteHome_1\jlib\ewt3.jar;d:\DevSuiteHome_1\jlib\share.jar;d:\DevSuiteHome_1\forms\java\frmwebutil.jar;d:\DevSuiteHome_1\forms\java\frmall.jar;d:\DevSuiteHome_1\forms\java\keypressed.jar;

                but my problem still exist.


                thanks
                yash
                • 5. Re: implementing bava bean in form?
                  949572
                  if u r using JRE change ur archive parameter else change all ur archive_jini parameter.

                  Hope this will helps u

                  Edited by: kk's diku on Aug 8, 2012 2:28 AM
                  • 6. Re: implementing bava bean in form?
                    yash_08031983
                    i did not understand what you said? please elaborate.

                    thanks
                    yash
                    • 7. Re: implementing bava bean in form?
                      CraigB
                      frm-13008 : cannot find javabean with name 'oracle.forms.fd.keypressed.'
                      This error is caused by only one thing; your java bean was not found. If you only get this error in the Forms Builder, then you need to add the full path to your java bean to the Windows Registry in the FORMS_BUILDER_CLASSPATH entry.

                      Keep in mind, that the default.env and formsweb.cfg only affect the Forms Runtime - any change to the FORMS_PATH or CLASSPATH in the default.env will need to be made to the registry so the Forms Builder will be configured similarly.

                      If this is a Runtime Error, then double-check your CLASSPATH entry in the default.env to ensure your path to the java bean is correct and there are no misspellings. Also, you will need to check the ARCHIVE parameter in the formsweb.cfg. Looking at your example,
                      archive_jini=frmall_jinit.jar,D:\DevSuiteHome_1\forms\java\keypressed.jar
                      archive=frmall.jar
                      I have to assume you are using the Oracle Jinitiator instead of the Oracle JRE.

                      The first thing I see wrong here is you have the full path listed. You only need the file name. The full path is only needed in the CLASSPATH variables. Try this instead:
                      archive_jini=frmall_jinit.jar,keypressed.jar
                      Hope this helps,
                      Craig B-)

                      If someone's response is helpful or correct, please mark it accordingly.
                      • 8. Re: implementing bava bean in form?
                        yash_08031983
                        thanks craiqB, Now that error disappear in form layout.
                        but my WCIM trigger is not firing .

                        code which i am using on trigger:
                        form level.
                        when-new-form-instance:
                        Set_Custom_Property('BL.BEAN',1,'INIT','');
                        bean item level trigger
                        WHEN-CUSTOM-ITEM-EVENT
                        DECLARE
                           
                            eventName varchar2(30) := :system.custom_item_event;
                            eventValues ParamList;
                            eventValueType number;
                            LC$Code   varchar2(25); -- code
                            LC$Char   varchar2(25); -- char
                            LC$Modif  varchar2(25); -- modifier
                        
                           
                        BEGIN
                           message('hello');
                           IF (eventName='KEY_PRESSED') THEN
                              eventValues := get_parameter_list(:system.custom_item_event_parameters);
                              get_parameter_attr(eventValues,'KEY_CODE',eventValueType, LC$Code);
                              get_parameter_attr(eventValues,'KEY_CHAR',eventValueType, LC$Char);
                              get_parameter_attr(eventValues,'KEY_MODIFIER',eventValueType,  LC$Modif);
                              
                              :BL.RESULT := :System.cursor_item || ' Key pressed:'|| LC$Code || ' (' || LC$Char||') '||' modif:'||LC$Modif ;
                              Synchronize ;
                            message('hello2');
                           END IF;  
                           
                        END;
                        thanks
                        yash
                        • 9. Re: implementing bava bean in form?
                          yash_08031983
                          hello experts,

                          i re-create the showmessage.jar with java 6 and netbean7.2. and replace the old showmessage.jar which i download from net.
                          now it again showing layout error : oracle.forms.fd.showmessage not found.

                          if i replace the old , error disapear.

                          i create the new jar with java code provided with showmessage.jar file and showmessage.fmb

                          if i used old showmessage.jar it donot raised any error but output is not showing according to jar file.


                          please suggest some simple program with least package , so that i successfully implement the bean example in my form.
                          i can create jar file:
                          i am using:
                          jdk6
                          netbeans7.2
                          oracle 10g
                          oracle forms 10g


                          thanks.
                          yash
                          • 10. Re: implementing bava bean in form?
                            CraigB
                            i re-create the showmessage.jar with java 6 and netbean7.2. and replace the old showmessage.jar which i download from net.
                            now it again showing layout error : oracle.forms.fd.showmessage not found.>
                            How did you do this? Did you completely recreate the "showmessage.jar" or did you update the java file and simply update the .jar using WinZip or other archive tool?

                            Did you keep the same internal structure of the original jar? If not, you will need to update the item implementing your JavaBean to point to the new directory structure in your updated jar.

                            Also, you may need to clear the Java Cache on the client after adding your new version of the showmessage.jar.

                            Additionally, did you digitally sign your new version of the showmessage.jar? This would not have prevented your application from finding it, but it is a necessary step or you will receive Java Security warnings.

                            Craig...
                            • 11. Re: implementing bava bean in form?
                              yash_08031983
                              How did you do this? Did you completely recreate the "showmessage.jar" or did you update the java file and simply update the .jar using WinZip or other archive tool?
                              Did you keep the same internal structure of the original jar?
                              when i explore the jar file , there was code for showmessage.txt file. i compile it on java6 and create the jar file again. it compile successfully.
                              i do not update it.

                              If not, you will need to update the item implementing your JavaBean to point to the new directory structure in your updated jar.
                              in updating, what have to update, class file or just the jar?
                              Additionally, did you digitally sign your new version of the showmessage.jar? This would not have prevented your application from finding it, but it is a necessary step or you will receive Java Security warnings.
                              please tell me how to perform these activity??



                              thanks
                              yash
                              • 12. Re: implementing bava bean in form?
                                CraigB
                                when i explore the jar file , there was code for showmessage.txt file. i compile it on java6 and create the jar file again. it compile successfully.
                                While I have built one or two Forms Java Beans (JBs), I am by no means an expert at this. I have always used Oracle's JDeveloper because it has all of the extension for creating Forms related JBs. If the internal structure of your new JB doesn't match the structure of the original JB, then you will need to update the way you implement the JB in your form. For example, if the original JB has an internal directory structure of:

                                oracle/forms/showmessage.class - implementation is: oracle.forms.showmessage

                                If your new JB directory structure is:

                                showmessage.class (with no internal directories) then the implementation is: showmessage

                                i do not update it.
                                please tell me how to perform these activity??
                                Signing a jar is pretty straight forwards. Google is your friend, Take a look here! for how to sign a jar.

                                Craig...
                                • 13. Re: implementing bava bean in form?
                                  yash_08031983
                                  Thanks craigeB,


                                  please give me simplest example of using JB in my form with smallest java program of just display some message with steps to follow.
                                  as i am very desperate to use the JB in my form but not getting success.

                                  i am not so much familiar with Jdeveloper but i will manage to use.


                                  thanks
                                  yash
                                  • 14. Re: implementing bava bean in form?
                                    CraigB
                                    Tell you what. Let's start back at the beginning. Where did you get your Java Bean (JB)? All of the JBs I've seen on the internet come with instructions on how to use them. Some make the assumption that you already know how to configure your system to use the JB so they don't include this information, but I haven't seen one that doesn't list how to use the JB. Looking at your original post,
                                    frm-13008 : cannot find javabean with name 'oracle.forms.fd.keypressed.'
                                    this error message suggests that Francios Degrelle wrote the JB. All of his JBs (that I've seen) have the ".fd." in the implementation. Francois does a good job of documenting his JBs so I suggest you return to his site and print the instructions. If this is not one of Francois' JBs, then you still need to return to the author's web site and print the instructions for using this bean. I don't recommend you modify the bean, unless you need to add functionality to it.

                                    Craig...