I am using NetbeansIDE 5.5.1 In this, How to use java methods in xsl code ?

Hi everybody,
I am using Netbeans IDE 5.5.1, In that i am trying to call java methods in XSL code?
Can anyone help me to provide the solution for this ????
Note:
I wrote simple java class method to change the case of given input string.
Also i compiled that class.
Now i need to know, where do i put that compiled class file or the source java file, to run my xsl code......
Please reply soon..
Thanks in advance....
regards,
Selva

Jim, that sounds like a good hypothesis. Yes, I am using smart previews. I have my originals on an external drive which is connected. Still, LR can not find them. Do you know how to tell LR where to find the originals? I would like LR to identify the source automatically: if external drive is connected LR should show "original and smart preview" not only "smart preview". Thanks for your help.

Similar Messages

  • How to call java method using jsp

    how to call java method using jsp.....
    anyone can help me.....i having problem here...coz i very new in java and jsp.....
    thanks.....

    keep an eye on this person's thread...they have code there and everything.
    http://forum.java.sun.com/thread.jspa?threadID=777263&tstart=0

  • HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S, HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S

    HOW TO USE THE PANORAMA FEATURE IN IPHONE 4S?

    There is no current panorama feature.  When iOS 6 is released (Sept. 19) we will find out.

  • What's the use of the shape.id? and How to use it to refer a shape in a slide?

    Is for each shape is the intented way of using of it? Any simple ways like GetSlideById for shapes?

    Hi PrabhakaranK,
    Based on the description, you want to get the specific shape by id of shape.
    As far as know, there is no such API provided by PowerPoint object model. As a workaround, we can loop the Shapes collection and check the id of shape to see whether the shape is we are looking for.
    And here is the PowerPoint object model for your reference:
    Object model reference (PowerPoint 2013 developer reference)
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is this how to use a properties file?

    Hi:
    The following is how I intend to create and read a properties file, please verify for me that the idea is correct.
    1. create myProp.properties
    2. in myProp, the content is like such:
    a=myA
    b=myB
    c=myC
    3. In my application,
      FileInputStream in = new FileInputStream(getClass().getResourceAsStream("/myProp.properties"));
      Properties p = new Properties();
      p.load(in);
      String a = p.getProperty("a");
      String b = p.getProperty("b");
      String c = p.getProperty("c");Thanx!

    It depends on what youare doing but if you have a set of properties that you are going to always use from one running of the application to the next, they should generally be defined as static finals.
    For example, lets say you want a configuration file for an application that holds the user's preferences. You might want something like this:
    public class Preferences {
       private static final String ALWAYS_ON_TOP = "always on top";
       private Properities preferences = new Properties();
       static {
          //load the file
       public boolean setAlwaysOnTop(boolean alwaysOnTop) {
          preferences.put(ALWAYS_ON_TOP, String.valueOf(alwaysOnTop));
       public boolean getAlwaysOnTop() {
          return Boolean.valueOf(preferences.get(ALWAYS_ON_TOP));
       public void save() {
          /save file
    }

  • How i use locked iphone o2..in india, how i use locked iphone o2..in india

    sir,
    I purchased second hand iphone 4,from uk(london),how it was factory unlock,how much pay for it & what is procedure of unlock as i use it in home town(india)
    <edited by host>
    carrier O2 12.0
    ios :5.1.1
    <edited by host>

    I will only answer here, not to the email address you gave. Also not good to give serialnumbers, imeinumbers  here....
    The phone was probably not unlocked. Or maybe hacked and it will be locked again after an update.
    If the phone was not unlocked officially, you have to go to the provider in the UK, where it was used before, because only the provider-it-was-locked-to, can unlock it.
    If it was jailbroken/hacked I do not know what to do.

  • How to use sony ic recorder with macbook pro, how to use sony ic recorder with macbook pro

    Anyone can help?  I realise there seams to be no software to syncronise my IC rec with my Mac.. I had one for my PC.. but not for Mac??

    instructions from Apple: http://support.apple.com/kb/HT3131

  • How to use timer in iphone 5 camera?, how to use timer in iphone 5 camera?

    How to set timer in iphone 5 for camera

    Not possible.
    A cursory internet search will find you an application that suits your needs. I would recommend one for you, but there are so many that you will be able to find one that's perfect for you.
    For me, I only wanted the timer. But maybe you want a fake fisheye or a camera that does 360° pics. Ask the AppStore first, and if you still have trouble finding the right one, Google will have different reviews.

  • I have prepared a style using smartstyles but I do not know how to use it

    How can I integrate this style with the form?
    Thanks.

    hi Deniz,
    goto ur smartform in FORM ATTRIBUTE -> OUTPUT OPTION tab u will find STYLE -> enter ur style name.it is for whole smartform
    Apart from that u can put in every node.
    regards
    prabhu

  • Infinite loop when using the set language context API(This would be useful for f

    Hi below is the code when execute goes into the infinite loop
    Can any body throw light on this...
    Regards,
    Ranjit
    CREATE OR REPLACE procedure draw_custom_login_page
    site2pstoretoken in varchar2 default null
    ,p_error_code in varchar2 default null
    ,ssousername in varchar2 default null
    ,p_cancel_url in varchar2 default null
    ,p_submit_url in varchar2 default null
    AS
    var_bannergif                          varchar2(80);
    var_bannertitle                     varchar2(4000);
    var_bannerinfo                     varchar2(4000);
    var_linkname                          varchar2(4000);
    var_loginuser                     varchar2(4000);
    var_loginpwd                     varchar2(4000);
    var_loginbuttton                     varchar2(4000);
    var_listlangcaption                    varchar2(4000);
    var_optioneng                         varchar2(4000);
    var_optionspanish                    varchar2(4000);
    var_optionfrench                varchar2(4000);
    p_nls_language                varchar2(5);
    l_url                                   varchar2(4000);
    l_language                               varchar(2000);
    ex                                         exception;
    BEGIN
         -- for setting the browser language
              begin
                        --if (owa_cookie.get('NLS_LANGUAGE').vals.count = 0) then
                   -- if persistent NLS cookie is not found
                   -- get the preferred browser language from environment
                   --l_language := substr(wwctx_api.get_http_accept_language,0,2);
                                  --else
                                  --l_language:='us';
                        --end if;
                                  l_language := substr(wwctx_api.get_http_accept_language,0,2);
                                  l_url :='portal30_sso.draw_custom_login_page';
                                  if (owa_cookie.get('NLS_LANGUAGE').vals.count = 0) then
                                       -- set portal language and redirect instead of just redirect
                                       wwctx_app_language.set_language(p_http_language =>
                                                      l_language,p_nls_language => wwnls_api.http_to_nls(l_language),
                                       p_nls_territory => wwnls_api.territory_from_http_language(l_language),p_requested_url => l_url);
                             else
                                       owa_util.redirect_url(l_url);
                        end if;
         exception
         when others then
                   htp.p('Error Occurred');
         wwerr_api_error_ui.show_html;
              end;
         ----up to here
    --for retrieving the NLS Language Equivalents
         begin
         var_bannergif                := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_gif',wwctx_api.get_nls_language);
         var_bannertitle                := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_message',wwctx_api.get_nls_language);
         var_bannerinfo                    := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_info',wwctx_api.get_nls_language);
         var_linkname                    := portal30.wwnls_api.get_string('CBS','banner_uilink','link_name',wwctx_api.get_nls_language);
         var_loginuser                    := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_name',wwctx_api.get_nls_language);
         var_loginpwd                    := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_password',wwctx_api.get_nls_language);
         var_loginbuttton                := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_button',wwctx_api.get_nls_language);
         --for filling up the list box
         var_listlangcaption          := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_caption',wwctx_api.get_nls_language);
         var_optioneng                    := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optioneng',wwctx_api.get_nls_language);
         var_optionspanish               := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optionspan',wwctx_api.get_nls_language);
         var_optionfrench           := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optionfrench',wwctx_api.get_nls_language);
         end;
    --Up to here
    htp.p('<HTML>');
    --htp.p('<FORM>');
    htp.p('<HEAD><TITLE>'||var_bannertitle||'</TITLE>');
    htp.p('<META content="text/html; charset=utf-8" http-equiv=Content-Type>');
    htp.p('<STYLE>.bodytext {COLOR: black; FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 11pt; fontFamily: Verdana,Arial,Helvetica}');
    htp.p('.header1 {');
         htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 14pt; FONT-WEIGHT: bold; fontFamily: Verdana,Arial,Helvetica');
         htp.p('}');
         htp.p('.large {');
              htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 18pt; FONT-WEIGHT: bold; fontFamily: Verdana,Arial,Helvetica}');
         htp.p('.small {');
              htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 8pt; FONT-WEIGHT: normal; fontFamily: Verdana,Arial,Helvetica');
         htp.p('}');
         htp.p('</STYLE>');
         htp.p('<BODY leftMargin=0 topMargin=0 MarginWidth="0" MarginHeight="0"> ');
         htp.p('<TABLE background="/images/h_wave.gif" border=0 cellPadding=0 cellSpacing=0 width="100%">');
         htp.p('<TBODY>');
         htp.p('<TR>');
    htp.p('<TD height=36>  </TD></TR></TBODY></TABLE>');
         htp.p('<TABLE border=0 cellPadding=7 cellSpacing=0 width="100%">');
         htp.p('<TR>');
    htp.p('<TD height=36><IMG alt="" border=0 height=45 width=140 src="/images/'||var_bannergif||'"></TD>');
         htp.p('<TD height=36 align=right valign=top>');
         htp.p('<form name="cbs_language_select" action="PORTAL30_SSO.wwctx_app_language.set_language" method="POST">');
         htp.p('<input type="hidden" name="p_http_language" value="">');
    htp.p('<input type="hidden" name="p_nls_territory" value="">');
    htp.p('<input type="hidden" name="p_requested_url" value="portal30_sso.draw_custom_login_page">');
         htp.p('<select name=p_nls_language value="null" onChange="javascript:fn_cbs_lang_submit(p_nls_language)">');
         htp.p('<option selected>'||var_listlangcaption||'</option>');
         htp.p('<option value="us">'||var_optioneng||'</option>');
         htp.p('<option value="e">'||var_optionspanish||'</option>');
         htp.p('<option value="f">'||var_optionfrench||'</option>');
         htp.p('</select>');
         htp.p('</form>');
         htp.p('</TD> ');
         htp.p('</TR></TBODY></TABLE>');
         --htp.p('<DIV align=center>');
         htp.p('<TABLE border=0 cellPadding=5 cellSpacing=6 width=100%>');
         htp.p('<TBODY>');
         htp.p('<TR>');
         htp.p('<TD border=0 width=30%> </TD>');
         htp.p('<TD width=50%><span class=large>'||var_bannertitle||'</span>');
              htp.p('<P class=bodytext>'||var_bannerinfo||'<P>');
         --htp.p('Oracle''s financial applications to leverage the power of a single');
         --htp.p('integrated database with common data standards and core processes. This');
         --htp.p('tool empowers employees at their desktops, enabling them to requisition');
         --htp.p('goods and services, as well as pay bills and personal expenses online via');
         --htp.p('a Web browser.');
         htp.p(''||var_linkname);
         htp.p('');
         htp.p('<P align=center><A');
              htp.p('href="https://p2pweb1d.nj.ssmb.com:3043/pls/p2pdb30_portal30_sso"');
              htp.p('</TD>');
         --htp.p('<TD class=bodytext height=25>  </TD>');
         htp.p('<TD width=20% valign=top align=right >');
                        htp.p('<TABLE cellpadding=5 BGCOLOR="#F2F2F2"');
                        htp.p('<TR><TD align=right>');
                        htp.p('<p class=small><b>'||var_loginuser||'</b> <input class=small type=text size=15 name=user value="">');
                        htp.p('<P class=small><b>'||var_loginpwd||'</b> <input class=small type=password size=15 name=password value="">');
                        htp.p('</TD></TR>');
                        htp.p('<TR><TD align=right>');
                        htp.p('<input class=small type=button size=15 name=cmd_login value='||var_loginbuttton||'>');
                        htp.p('</TD></TR>');
                        htp.p('</TABLE>');
              htp.p('</TD>');
         htp.p('</TR></TBODY></TABLE>');
              --htp.p('</DIV>');
              htp.p('</BODY>');
              --htp.p('</FORM>');
              htp.p('</HTML>');
              htp.p('<SCRIPT language=JavaScript>');
                             htp.p('var l_http_language = new Array()');
                             htp.p('var l_nls_territory = new Array()');
                        htp.p('l_http_language[1] = "en"');
                        htp.p('l_nls_territory[1] = "AMERICA"');
                        htp.p('l_http_language[2] = "fr"');
                        htp.p('l_nls_territory[2] = "FRANCE"');
                        htp.p('l_http_language[3] = "de"');
                        htp.p('l_nls_territory[3] = "GERMANY"');
                        htp.p('l_http_language[4] = "ja"');
                        htp.p('l_nls_territory[4] = "JAPAN"');
                        htp.p('l_http_language[5] = "es"');
                        htp.p('l_nls_territory[5] = "SPANISH"');
                                                 htp.p('function fn_cbs_lang_submit(field){');
                                                                --htp.p('alert (document.cbs_language_select.p_http_language.value)');
                                                      htp.p('if ( field.selectedIndex != 0 )');
                                                      htp.p('{');
                                                      htp.p('document.cbs_language_select.p_http_language.value = l_http_language[field.selectedIndex]');
                                                                htp.p('document.cbs_language_select.p_nls_territory.value = l_nls_territory[field.selectedIndex]');
                                                      htp.p('document.cbs_language_select.submit();');
                                                      htp.p('}');
                                                                                              htp.p('}');
              htp.p('</SCRIPT>');
              exception when others then
              htp.p(l_language);
              htp.p(SQLCODE);
              htp.p(SQLERRM);
    END;

    Hi below is the code when execute goes into the infinite loop
    Can any body throw light on this...
    Regards,
    Ranjit
    CREATE OR REPLACE procedure draw_custom_login_page
    site2pstoretoken in varchar2 default null
    ,p_error_code in varchar2 default null
    ,ssousername in varchar2 default null
    ,p_cancel_url in varchar2 default null
    ,p_submit_url in varchar2 default null
    AS
    var_bannergif                          varchar2(80);
    var_bannertitle                     varchar2(4000);
    var_bannerinfo                     varchar2(4000);
    var_linkname                          varchar2(4000);
    var_loginuser                     varchar2(4000);
    var_loginpwd                     varchar2(4000);
    var_loginbuttton                     varchar2(4000);
    var_listlangcaption                    varchar2(4000);
    var_optioneng                         varchar2(4000);
    var_optionspanish                    varchar2(4000);
    var_optionfrench                varchar2(4000);
    p_nls_language                varchar2(5);
    l_url                                   varchar2(4000);
    l_language                               varchar(2000);
    ex                                         exception;
    BEGIN
         -- for setting the browser language
              begin
                        --if (owa_cookie.get('NLS_LANGUAGE').vals.count = 0) then
                   -- if persistent NLS cookie is not found
                   -- get the preferred browser language from environment
                   --l_language := substr(wwctx_api.get_http_accept_language,0,2);
                                  --else
                                  --l_language:='us';
                        --end if;
                                  l_language := substr(wwctx_api.get_http_accept_language,0,2);
                                  l_url :='portal30_sso.draw_custom_login_page';
                                  if (owa_cookie.get('NLS_LANGUAGE').vals.count = 0) then
                                       -- set portal language and redirect instead of just redirect
                                       wwctx_app_language.set_language(p_http_language =>
                                                      l_language,p_nls_language => wwnls_api.http_to_nls(l_language),
                                       p_nls_territory => wwnls_api.territory_from_http_language(l_language),p_requested_url => l_url);
                             else
                                       owa_util.redirect_url(l_url);
                        end if;
         exception
         when others then
                   htp.p('Error Occurred');
         wwerr_api_error_ui.show_html;
              end;
         ----up to here
    --for retrieving the NLS Language Equivalents
         begin
         var_bannergif                := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_gif',wwctx_api.get_nls_language);
         var_bannertitle                := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_message',wwctx_api.get_nls_language);
         var_bannerinfo                    := portal30.wwnls_api.get_string('CBS','banner_uitext','banner_info',wwctx_api.get_nls_language);
         var_linkname                    := portal30.wwnls_api.get_string('CBS','banner_uilink','link_name',wwctx_api.get_nls_language);
         var_loginuser                    := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_name',wwctx_api.get_nls_language);
         var_loginpwd                    := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_password',wwctx_api.get_nls_language);
         var_loginbuttton                := portal30.wwnls_api.get_string('CBS','banner_uilogin','login_button',wwctx_api.get_nls_language);
         --for filling up the list box
         var_listlangcaption          := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_caption',wwctx_api.get_nls_language);
         var_optioneng                    := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optioneng',wwctx_api.get_nls_language);
         var_optionspanish               := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optionspan',wwctx_api.get_nls_language);
         var_optionfrench           := portal30.wwnls_api.get_string('CBS','banner_listlang','listlang_optionfrench',wwctx_api.get_nls_language);
         end;
    --Up to here
    htp.p('<HTML>');
    --htp.p('<FORM>');
    htp.p('<HEAD><TITLE>'||var_bannertitle||'</TITLE>');
    htp.p('<META content="text/html; charset=utf-8" http-equiv=Content-Type>');
    htp.p('<STYLE>.bodytext {COLOR: black; FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 11pt; fontFamily: Verdana,Arial,Helvetica}');
    htp.p('.header1 {');
         htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 14pt; FONT-WEIGHT: bold; fontFamily: Verdana,Arial,Helvetica');
         htp.p('}');
         htp.p('.large {');
              htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 18pt; FONT-WEIGHT: bold; fontFamily: Verdana,Arial,Helvetica}');
         htp.p('.small {');
              htp.p('FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 8pt; FONT-WEIGHT: normal; fontFamily: Verdana,Arial,Helvetica');
         htp.p('}');
         htp.p('</STYLE>');
         htp.p('<BODY leftMargin=0 topMargin=0 MarginWidth="0" MarginHeight="0"> ');
         htp.p('<TABLE background="/images/h_wave.gif" border=0 cellPadding=0 cellSpacing=0 width="100%">');
         htp.p('<TBODY>');
         htp.p('<TR>');
    htp.p('<TD height=36>  </TD></TR></TBODY></TABLE>');
         htp.p('<TABLE border=0 cellPadding=7 cellSpacing=0 width="100%">');
         htp.p('<TR>');
    htp.p('<TD height=36><IMG alt="" border=0 height=45 width=140 src="/images/'||var_bannergif||'"></TD>');
         htp.p('<TD height=36 align=right valign=top>');
         htp.p('<form name="cbs_language_select" action="PORTAL30_SSO.wwctx_app_language.set_language" method="POST">');
         htp.p('<input type="hidden" name="p_http_language" value="">');
    htp.p('<input type="hidden" name="p_nls_territory" value="">');
    htp.p('<input type="hidden" name="p_requested_url" value="portal30_sso.draw_custom_login_page">');
         htp.p('<select name=p_nls_language value="null" onChange="javascript:fn_cbs_lang_submit(p_nls_language)">');
         htp.p('<option selected>'||var_listlangcaption||'</option>');
         htp.p('<option value="us">'||var_optioneng||'</option>');
         htp.p('<option value="e">'||var_optionspanish||'</option>');
         htp.p('<option value="f">'||var_optionfrench||'</option>');
         htp.p('</select>');
         htp.p('</form>');
         htp.p('</TD> ');
         htp.p('</TR></TBODY></TABLE>');
         --htp.p('<DIV align=center>');
         htp.p('<TABLE border=0 cellPadding=5 cellSpacing=6 width=100%>');
         htp.p('<TBODY>');
         htp.p('<TR>');
         htp.p('<TD border=0 width=30%> </TD>');
         htp.p('<TD width=50%><span class=large>'||var_bannertitle||'</span>');
              htp.p('<P class=bodytext>'||var_bannerinfo||'<P>');
         --htp.p('Oracle''s financial applications to leverage the power of a single');
         --htp.p('integrated database with common data standards and core processes. This');
         --htp.p('tool empowers employees at their desktops, enabling them to requisition');
         --htp.p('goods and services, as well as pay bills and personal expenses online via');
         --htp.p('a Web browser.');
         htp.p(''||var_linkname);
         htp.p('');
         htp.p('<P align=center><A');
              htp.p('href="https://p2pweb1d.nj.ssmb.com:3043/pls/p2pdb30_portal30_sso"');
              htp.p('</TD>');
         --htp.p('<TD class=bodytext height=25>  </TD>');
         htp.p('<TD width=20% valign=top align=right >');
                        htp.p('<TABLE cellpadding=5 BGCOLOR="#F2F2F2"');
                        htp.p('<TR><TD align=right>');
                        htp.p('<p class=small><b>'||var_loginuser||'</b> <input class=small type=text size=15 name=user value="">');
                        htp.p('<P class=small><b>'||var_loginpwd||'</b> <input class=small type=password size=15 name=password value="">');
                        htp.p('</TD></TR>');
                        htp.p('<TR><TD align=right>');
                        htp.p('<input class=small type=button size=15 name=cmd_login value='||var_loginbuttton||'>');
                        htp.p('</TD></TR>');
                        htp.p('</TABLE>');
              htp.p('</TD>');
         htp.p('</TR></TBODY></TABLE>');
              --htp.p('</DIV>');
              htp.p('</BODY>');
              --htp.p('</FORM>');
              htp.p('</HTML>');
              htp.p('<SCRIPT language=JavaScript>');
                             htp.p('var l_http_language = new Array()');
                             htp.p('var l_nls_territory = new Array()');
                        htp.p('l_http_language[1] = "en"');
                        htp.p('l_nls_territory[1] = "AMERICA"');
                        htp.p('l_http_language[2] = "fr"');
                        htp.p('l_nls_territory[2] = "FRANCE"');
                        htp.p('l_http_language[3] = "de"');
                        htp.p('l_nls_territory[3] = "GERMANY"');
                        htp.p('l_http_language[4] = "ja"');
                        htp.p('l_nls_territory[4] = "JAPAN"');
                        htp.p('l_http_language[5] = "es"');
                        htp.p('l_nls_territory[5] = "SPANISH"');
                                                 htp.p('function fn_cbs_lang_submit(field){');
                                                                --htp.p('alert (document.cbs_language_select.p_http_language.value)');
                                                      htp.p('if ( field.selectedIndex != 0 )');
                                                      htp.p('{');
                                                      htp.p('document.cbs_language_select.p_http_language.value = l_http_language[field.selectedIndex]');
                                                                htp.p('document.cbs_language_select.p_nls_territory.value = l_nls_territory[field.selectedIndex]');
                                                      htp.p('document.cbs_language_select.submit();');
                                                      htp.p('}');
                                                                                              htp.p('}');
              htp.p('</SCRIPT>');
              exception when others then
              htp.p(l_language);
              htp.p(SQLCODE);
              htp.p(SQLERRM);
    END;

  • JNI - How to use the error reporting mechanism?

    I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
    This works well, but I have encountered a weird error.
    From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
    For example, if in one of the Java functions called from the
    DLL via JNI invocation interface the following is the first statement,
    it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
    String test=""+Math.random(); // String test not used later
    Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
    So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
    One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
    Does anyone know how to use the error reporting mechanism?
    http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
    Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
    My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
    I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.

    Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
    The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
    static synchronized void print(String str)
    { MetaStockMonitor mMon=getInstance();
    if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
    mMon.logFileWriter.print(str);
    mMon.logFileWriter.flush();
    if ( mMon.getConsoleLoggingState() ) {
    mMon.jTextArea1.append(str);
    Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
    String test=""+Math.random(); // String test not used later
    Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
    I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
    All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
    JNIEnv* JNI_GetEnv()
    JNIEnv *env;
    cached_jvm->AttachCurrentThread((void**)&env,NULL);
    fprintf(logfile,"env=%i\n",env);
    fflush(logfile);
    return env;
    // function called by Metastock's MSX plug-in interface
    BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
    const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
    const MSXNumericArgsArray *a_psNumericArgs,
    const MSXStringArgsArray *a_psStringArgs,
    const MSXCustomArgsArray *a_psCustomArgs,
    MSXResultRec *a_psResultRec)
    a_psResultRec->psResultArray->iFirstValid=0;
    a_psResultRec->psResultArray->iLastValid=-1;
    jthrowable ex;
    jmethodID mid;
    JNIEnv* env=JNI_GetEnv();
    jobject chart=getChart(env, a_psDataRec);
    if ( chart==NULL) {
    return MSX_ERROR;
    jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
    jthrowable ex;
    jmethodID mid;
    int closeFirstValid, closeLastValid;
    closeFirstValid=a_psDataRec->sClose.iFirstValid;
    closeLastValid=a_psDataRec->sClose.iLastValid;
    long firstDate, firstTime;
    if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
    firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
    firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
    } else {
    firstDate=0;
    firstTime=0;
    jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
    printSBufViaJava(sbuf);
    return NULL;
    mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
    printSBufViaJava(sbuf);
    return NULL;
    // Java Function call leads to crash, if console output is turned off and
    // the first statement in the Java routine is a (useless) string concatenation.
    // Otherwise it works stable.
    jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
    securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
    (jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
    (jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
    (jint)firstDate, (jint)firstTime );
    if (ex= env->ExceptionOccurred() ) {
    env->ExceptionDescribe();
    env->ExceptionClear();
    sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
    printSBufViaJava(sbuf);
    return NULL;

  • How to use multiple video files??

    hi all,
    i am using flex 4 ...
    now i have designed video player..
    i used single flv file for execution..
    how to use more flv files in tis program???
    i have included program also..
    can any one reply for this...
    thanks in advance...
    regards,
    saran r
    video.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()" height="700" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.core.UIComponent;
                import flash.events.NetStatusEvent;
                import flash.media.Video;
                import flash.net.NetConnection;
                import flash.net.NetStream;
                private var nc:NetConnection;
                private var stream:NetStream;
                public var videoDuration:Number;
                public var nsClient:Object = new Object();
                private var videoComp:Video = new Video();
                private var meta:Object = new Object();
                private var timer:Timer = new Timer(100);
                private var uiComp:UIComponent = new UIComponent();
                private function init():void
                    nc = new NetConnection();
                    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    nc.connect("rtmp://localhost/saran");                 
                    this.addElement(uiComp);
                    uiComp.addChild(videoComp);
                    timer.addEventListener(TimerEvent.TIMER,timerHandler);
                    timer.start();
                private function netStatusHandler(event:NetStatusEvent):void
                    trace("Code ===>>>    "+event.info.code);
                    if(event.info.code == "NetConnection.Connect.Success")
                        connectStream(nc);
                private function connectStream(nc:NetConnection):void {
                    stream = new NetStream(nc);
                    videoComp.attachNetStream(stream);
                    stream.play("Terminator")
                    // stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    stream.client = nsClient//new CustomClient();
                    nsClient.onMetaData = metadataHandler;
                    trace("stream ===>>>    "+stream.currentFPS);
                    //responder = new Responder(onResult);
                    // nc.call("getStreamLength", responder, "bikes" );
                private function metadataHandler(metadataObj:Object):void
                    meta = metadataObj;
                    videoComp.width = metadataObj.width;
                    videoComp.height = metadataObj.height;
                    //positionBar.move(videoComp.x, ((videoComp.y + videoComp.height)+20));
                    //positionBar.width = videoComp.width;
                    trace("Duration ====>>>>   "+meta.duration);
                private function timerHandler(event:TimerEvent):void
                    //trace("Timer called.........."+stream.time);
                    //positionBar.setProgress(stream.time, meta.duration);
            ]]>
        </fx:Script>
    </s:Application>

    I have the same question but I am using two pc's

  • How to use the Pull List in Discrete Scenario?

    Hi Gurus,
    I am using pull list MF60 in REM.
    How to use the Pull List for creating material reservations in Discrete Scenario also?
    Anyone used this Pull list in discrete, pl share.
    How is helpful in discrete scenario?
    Srini

    Hello,
    You can use Pull list for st.location transfers, if you are into WM managed then this pull list used a lot.
    You can use the pulllist to the max. extent. But with IM managed plant the use is limited and this is used only for storage location transfers.
    Issue cannot be done for Production orders. You can bring the materials to the req. storage locations and after that you have issue in the order or manually for the order.
    Regards,
    Manick.

  • How to use the Include Statement in the BADI

    Dear All,
            I am trying to implement the BADI. So i need to use the Include in the BADI.
    How to use the Include statement in the BADI. I cant able to use it in the Public, Private and protected statement.
    Where should i mention that,,,,
    Thanks
    Yogesh

    Hi Sharat,
      Thanks for your reply.
    I need to use the BADI HRWPC_PCR_APPR_FORM. In which the values are available in the Container. So if i need to use the container values then i need to use that include <cntain>.
    Is there any possible ways to make it.
    Thanks
    Yogesh

  • New to OATS,need info on how to use data bank

    Hi,
    Please share some documents/links on how to use OATS for web functionality testing,and how to use databank.
    Thank you,
    Raju

    Hi,
    I am using OATS version: 9.10,Can someone tell me on how to use Databank for parameterization.If possible please share some document which has all the steps.
    Thank you,
    Raju

Maybe you are looking for

  • Airport Extreme + shared USB hard drive // Mac + PC Access

    We are getting ready to purchase an Airport Extreme for our home network. Here's what we are working with: 1) Airport Extreme 2) MacBook 3) MacMini 4) PC 5) TBD USB hard drive that will be connected to AirPort Extreme *for use as shared hard drive* F

  • Problem with TOC

    I made 2 styles titles of lessons titles of sections. I created a table of contents (TOC) using the styles, however half of the titles do not show. I checked all titles styles to be sure they are using the appropriate ones and they are. Here is the a

  • Where do I find settings to be able to read/print a internet page when disconnected?

    I use mobile broadband, and some times the connection can be lost for a long time. So I want to be able to download or save automatic some of my bookmarks for example.. But I cant find the setting for that feature Please advise =)

  • Email link to document in Content Server from SDV

    Experts, We would like to email links to documents stored on our Content Server while viewing them in the SAP Document Viewer.  These documents are ArchiveLinks to invoices.  When we use the 'Send object with note' button in SDV, the email sent conta

  • Implementing n-tier Architecture using java

    Hi !! I wish to know how I can proceed to implement n-tier application using java or how to implement n-tier application with JBuilder. Thanks!