LV OOP when using accessor methods (subVIs) or bundle/unbundle operation?

Hello
When should I use the (private) accessor methods (subVIs) and when the bundle/unbundle operation to access the class data? What is the reason that the bundle/unbundle operation is introduced to LabVIEW OOP? I need some rules for a coding guideline.
Thanks
Solved!
Go to Solution.

Thanks for your hints. I wanted to understand the differences between a private vi access and the unbundle operation like in the picture.
I found some more explanations on the website: http://www.ni.com/white-paper/3574/en
-> "Creating "read" and "write" methods for every data value in a class is a process acknowledged to be cumbersome. LabVIEW 8.5 introduced the ability to create accessor VIs from a wizard dialog, and LV2009 added further options to that dialog.
We were concerned about the performance overhead of making a subVI call instead of just unbundling the data. We found that our current compiler overhead for the subVI call is negligible (measured between 6 and 10 microseconds on average PC). A bundle/unbundle operation directly on the caller VI versus in a subVI is nearly the same amount of time. We do have an issue with data copies for unbundled elements because much of LabVIEW's inplaceness algorithm does not operate across subVI boundaries. As a workaround, you may also choose to avoid accessor methods in favor of methods that actually do the work in the subVI to avoid returning elements from the subVI, thus avoiding data copies. This choice is frequently better OO design anyway as it avoids exposing a class' private implementation as part of its public API. In future versions, we expect that inlining of subVIs will become possible, which will remove the overhead entirely.  
We feel in the long term it is better to improve the editor experience and the compiler efficiency for these VIs rather than introducing public/protected/community data."

Similar Messages

  • Using Accessor Method from Within Considered Best Practice?

    I was wondering what is considered best practice in the AS3 world regarding this topic.
    In C++ and .NET world, as well as PHP I would consider using accessor methods, instead of directly accessing the class property, bad practice due to unnecessary overhead.
    What are your thoughts in this?

    Getters and setters and bindable vars can be public, protected or private.  Which one you choose follows standard object-oriented practices.
    is just like a macro that defines a particular get/set pair.  I would only use it on vars.  Using it on a getter simply wraps the getter in another get/set pair which is wasteful.  The Flex Framework rarely uses .  Instead, we typically define get/set pairs with metadata so we can control what event fires and when.  It also saves SWF size because the compiler doesn't have to generate a long and ugly name to avoid name collisions.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Error when using findbykey method

    hi am having this error when using below method cannot assign of type sms1405.common.agrROW TO variable of type oracle.jbo.row[]. type 'oracle.jbo.row[]' excepected but 'sms1405.common.agRROW' found the error is in this line agrRows = (AGRRow)agrRows[0]; the methos is
    am using this sample
    http://amulyamishras-tech-blog.blogspot.com/2011/01/viewobject-getrow-vs-findbykey.html
    where does EmpVORow in EmpVORow empRow =
    (EmpVORow)EmpVO.getRow(key); define from above sample
    where does EmpVO from EmpVORow empRow =
    (EmpVORow)EmpVO.getRow(key); define from above sample
    am in Jdeveloper 11.1.2.1.0
    Edited by: Tshifhiwa on 2012/07/03 4:36 PM

    Man, you should be able to find this out your self by now!
    Hint: there is one 's' too much in the line you get the error (i guess cut & past error)
    Try to understand the code you copied!
    Timo

  • Crash when using Invoke Method: Library:Deploy Library

    I'm trying to set a library of shared variables to deploy when a VI runs. When using the method to deploy a library, Labview will crash with no error log. I am able to use Library.Open to, for example, HiliteInProjectWindow, and Library.GetFileLVVsersion (8.6). But for the life of me I cannot get deploy to work. Any ideas?

    hbcnb,
    I'm not quite sure why that is happening, but I
    can give you a work around for it.  There is a property node that
    returns the mode that LabVIEW is running in (Run-Time, Development,
    Evaluation).  If you output this value to a case structure, you can
    include your deploy code in the run-time version but not in your
    development version so that it will cease to crash.  Place down the
    property node, then select  Application » Kind.  I've included a
    picture of how to wire this up. Let me know if this helps work around
    the problem a bit easier.  
    Sincerely,
    Chris G in AE
    Attachments:
    application_pic.jpg ‏27 KB

  • [svn:fx-trunk] 10891: Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants

    Revision: 10891
    Author:   [email protected]
    Date:     2009-10-06 09:46:47 -0700 (Tue, 06 Oct 2009)
    Log Message:
    Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants
    QE notes: None.
    Doc notes: None
    Bugs: SDK-22676
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22676
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Have you tried using com.adobe.air.crypto.EncryptionKeyGenerator instead?

  • Can you turn off the charging feature when using accessories?

    Can you turn off the charging feature when using accessories with the iPad?

    You cannot overcharge the battery when using the power adapter. Once the battery is fully charged, the iPad will no longer continue to charge if it is still connected. I leave my iPad on the power adapter for hours on end - on weekends when I am not at work.
    iPad - Charging the Battry
    http://support.apple.com/kb/HT4060
    About the iPad Battery
    http://www.apple.com/batteries/ipad.html
    These are both worthwhile reading for concerns about the battery and how to properly maintain it.
    I know nothing about external speakers with the iPad since I do not use them - but If the speaker is with a dock of some sort that charges the iPad - you should have no worries. If it is a dock that charges the iPad - I know of no way to turn off the charging feature, but it will not shorten the life of the battery anyway as long as the battery is properly maintained and cared for.
    Message was edited by: Demo

  • Error when using the method cl_gui_frontend_services= file_open_dialog

    Hello Experts,
    I am currently practicing BDC and I think the first step is to locate where my text file is. Now based on my code below, after selecting my text file nothing happens.
    Also, what will be my next after getting the file from a specific location? Thanks guys!
    REPORT  z_aris_practice_bdc_0
            NO STANDARD PAGE HEADING
            LINE-SIZE 255
            LINE-COUNT 64
            MESSAGE-ID zz.
    *BDC Data
    DATA: BEGIN OF bdc_tab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Internal Table
    DATA: BEGIN OF it_input OCCURS 0,
             user     TYPE usr02-bname,
             title    TYPE sza5_d0700-title_medi,
             lname    TYPE addr3_data-name_last,
             fname    TYPE addr3_data-name_first,
             initials TYPE addr3_data-initials,
             nickname TYPE addr3_data-nickname,
             function TYPE addr3_data-function,
          END OF it_input.
    DATA: gt_lines TYPE sy-tabix,
          gt_file  TYPE filetable,
          wa_file  TYPE filetable,
          gt_subrc TYPE i.
    *CONSTANTS
    CONSTANTS: c_mask(60) TYPE c  VALUE ',..'.
    *Selection Screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_input LIKE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
       WINDOW_TITLE            =
       DEFAULT_EXTENSION       =
       DEFAULT_FILENAME        =
       FILE_FILTER             =
          initial_directory       = 'C:\Temp\'
          multiselection          = 'X'
        CHANGING
          file_table              = gt_file[]
          rc                      = gt_subrc
       USER_ACTION             =
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          OTHERS                  = 4.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM put_in_itab.
      PERFORM process_records.
    *&      Form  get_files
          text
    FORM put_in_itab.
      DATA: lv_file TYPE string.
      lv_file = p_input.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = lv_file
        FILETYPE                      = 'ASC'
         has_field_separator           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
        CODEPAGE                      = ' '
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
        CHECK_BOM                     = ' '
        VIRUS_SCAN_PROFILE            =
        NO_AUTH_CHECK                 = ' '
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          data_tab                      = it_input
       EXCEPTIONS
         file_open_error               = 1
         file_read_error               = 2
         no_batch                      = 3
         gui_refuse_filetransfer       = 4
         invalid_type                  = 5
         no_authority                  = 6
         unknown_error                 = 7
         bad_data_format               = 8
         header_not_allowed            = 9
         separator_not_allowed         = 10
         header_too_long               = 11
         unknown_dp_error              = 12
         access_denied                 = 13
         dp_out_of_memory              = 14
         disk_full                     = 15
         dp_timeout                    = 16
         OTHERS                        = 17
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        DESCRIBE TABLE it_input LINES gt_lines.
      ENDIF.
    ENDFORM.                    "get_files
    *&      Form  process_records
          text
    FORM process_records.
      LOOP AT it_input.
      ENDLOOP.
    ENDFORM.                    "process_records

    Hii viraylab,
    go throgh this link..This sample code solves ur problem....
    /people/milind.upasani/blog/2007/03/07/step-by-step-approach-to-ceate-simple-bdc-session-program-using-reusable-template
        U are new to BDC it seems...
        first u read the sap help ... then u will come know what to do after wards....
        http://help.sap.com/saphelp_47x200/helpdata/en/fa/097720543b11d1898e0000e8322d00/frameset.htm
    Be familiar with the structure BDCDATA.
    <b>Data transfers</b>  In this page..
    Next u need to know about the <b>transaction RECORDER the tcode is SHDB.</b>
    Nothing is difficult in this ..
    For example When u r creating a data element in SE11 u go through some screens in a flow, by clicking some pushbuttons and by generating some function codes manually, and entering values manually...
    But here u wont do it manually, these values will be populated from file into an internal table...
    Before calling a transaction into which u r going to populate the data is to be filled into a table with structure <b>BDCDATA.</b>
    <b>U need to use CALL TRANSACTION 'SE11' using BDCDATA or
    the session method..</b>
    Reward points for helpful answers...
    sai ramesh

  • Invalid meta tag generated when using XHTML method

    Hi,
    I'm trying to generate an XHTML file using XSL and the XHTML output method. However, transformation results in adding the following XHTML-invalid meta tag (uppercase and non-closing) in the head tag:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    Is it a bug in the XDK or am I missing something? Transform is performed using the JXTransformer provided in 11g.
    Thanks in advance,
    Stephane
    input file:
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xml:lang='en' lang='en' xmlns='http://www.w3.org/1999/xhtml'>
    <head>
         <title>Some title</title>
    </head>
    <body></body>
    </html>
    xsl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xhtml="http://www.w3.org/1999/xhtml">
         <xsl:output method="xhtml"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
    <xsl:template match="*">
         <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
              <xsl:apply-templates />
         </xsl:element>
    </xsl:template>
    </xsl:stylesheet>
    output:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    *<META http-equiv="Content-Type" content="text/html; charset=UTF-8">*
    <title>Some title</title></head><body></body></html>

    For some reason when I use MapForce tool to generate my xslt mapping source, it is generating the following statement in the xsl file.
         <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
    So at the root element of XML file, it is replacing the character n with '#default' for some reason, I don;t know the purpose of this.
    As you suggested, I changed the name space, still I experienced same problem.
    It is now resolved after removing the above xsl statement from the xsl file before creating/uploading the relevant zip file into archives folder.
    It works fine now. Thanks for the clue.

  • Uri-escaping in XSLT-Processor when using html-method in xsl:output

    I've a problem with the XSLT-Processor:
    He tries to escape non-ASCII Characters in the href-Attribute when I use the output method "html". This is correct according to XSLT 1.0 and HTML4, but the processor doesn't really escape the characters, he just gives me a %3F ('?'-character) instead of %HH (where HH corresponds to the hex value of the char).
    I searched the forums and found a thread with the same problem, but there was no solution to this issue. The thread was started in 2002 so maybe someone came up with a solution.

    Add the non-ascii character to <xsl:text disable-output-escaping="yes"></xsl:text>

  • NullPointerException thrown when using get method in CMR relationship outsi

    We are using weblogic 9.1 CMP entity beans with BEA's XA oracle driver. We have a bean called User that has a many address beans. When calling the getAddresses method on a UserLocal a NullPointerException gets thrown if the stateless session bean method that is marked as @LocalMethod(transactionAttribute=Constants.TransactionAttribute.SUPPORTS). If we change it to REQUIRED the method returns addresses successfully. Does anyone have any ideas as to what could be causing this? Below is the stack trace.
    My best guess is that an exception is occurring and when weblogic tries to handle the exception EJBRuntimeUtils.throwEJBException encounters the NullPointerException.
    javax.ejb.EJBException: EJB Exception: : java.lang.NullPointerException
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68__WebLogic_CMP_RDBMS_addresses_Set.<init>(echo_user_User_l47u68__WebLogic_CMP_RDBMS_addresses_Set.java
    :93)
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68__WebLogic_CMP_RDBMS.getAddresses(echo_user_User_l47u68__WebLogic_CMP_RDBMS.java:1161)
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68_ELOImpl.getAddresses(echo_user_User_l47u68_ELOImpl.java:770)
    at gov.nasa.echo.subsystems.user.UserTypeMap.convertUser(UserTypeMap.java:66)
    at gov.nasa.echo.subsystems.user.UserSubsystem.getUserByUserId(UserSubsystem.java:321)
    at gov.nasa.echo.subsystems.user.UserSubsystem.getUsersByUserId(UserSubsystem.java:302)
    at gov.nasa.echo.services.authentication.AuthenticationServiceBean.login(AuthenticationServiceBean.java:442)
    at gov.nasa.echo.services.authentication.AuthenticationServiceBean_plcr77_ELOImpl.login(AuthenticationServiceBean_plcr77_ELOImpl.java:1001)
    at gov.nasa.echo.v8.AuthenticationServicePortImpl.login(AuthenticationServicePortImpl.java:105)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:91)
    at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:68)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:84)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:60)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:124)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    ; nested exception is: java.lang.NullPointerException
    at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
    at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:643)
    at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
    at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
    at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
    Truncated. see log file for complete stacktrace

    Jason Gilman wrote:
    We are using weblogic 9.1 CMP entity beans with BEA's XA oracle driver. We have a bean called User that has a many address beans. When calling the getAddresses method on a UserLocal a NullPointerException gets thrown if the stateless session bean method that is marked as @LocalMethod(transactionAttribute=Constants.TransactionAttribute.SUPPORTS). If we change it to REQUIRED the method returns addresses successfully. Does anyone have any ideas as to what could be causing this? Below is the stack trace
    My best guess is that an exception is occurring and when weblogic tries to handle the exception EJBRuntimeUtils.throwEJBException encounters the NullPointerException.
    Open an official support case. This has nothing to do with jdbc.
    Joe
    >
    >
    javax.ejb.EJBException: EJB Exception: : java.lang.NullPointerException
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68__WebLogic_CMP_RDBMS_addresses_Set.<init>(echo_user_User_l47u68__WebLogic_CMP_RDBMS_addresses_Set.java
    :93)
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68__WebLogic_CMP_RDBMS.getAddresses(echo_user_User_l47u68__WebLogic_CMP_RDBMS.java:1161)
    at gov.nasa.echo.dataaccessobjects.user.echo_user_User_l47u68_ELOImpl.getAddresses(echo_user_User_l47u68_ELOImpl.java:770)
    at gov.nasa.echo.subsystems.user.UserTypeMap.convertUser(UserTypeMap.java:66)
    at gov.nasa.echo.subsystems.user.UserSubsystem.getUserByUserId(UserSubsystem.java:321)
    at gov.nasa.echo.subsystems.user.UserSubsystem.getUsersByUserId(UserSubsystem.java:302)
    at gov.nasa.echo.services.authentication.AuthenticationServiceBean.login(AuthenticationServiceBean.java:442)
    at gov.nasa.echo.services.authentication.AuthenticationServiceBean_plcr77_ELOImpl.login(AuthenticationServiceBean_plcr77_ELOImpl.java:1001)
    at gov.nasa.echo.v8.AuthenticationServicePortImpl.login(AuthenticationServicePortImpl.java:105)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:91)
    at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:68)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:84)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:60)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:124)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:53)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    ; nested exception is: java.lang.NullPointerException
    at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
    at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:643)
    at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:604)
    at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:347)
    at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:286)
    Truncated. see log file for complete stacktrace

  • Null Pointer Exception when using exec() method of runtime.

    Hi There,
    I am using a Random Access File to access text data. Then I am using the text data with the Runtime class to activate native programs (such as Word, Outlook, etc).
    I have designed my code so that the length of the text file is compared to the current file pointer. If the current file pointer is less than the length of the file then a string is loaded with the text (path) details relevant for the activation of a program (e.g.: Word). In the case where the end of text data in the file has been reached I load the relevant string with null. Here is a little run down of the code:
    String Path1;
    long FileLength = TxtFile.length(); //Find file length.
    long PointerPosition = TxtFile.getFilePointer(); //Find current position
      try
          if(PointerPosition < FileLength)
            Path1 = TxtFile.readLine();        //Read line into string
          else
            Path1 = null;                      //Make string null.
       }catch(IOException e){}Once the code above has been run I then use the Runtime class's exec() method along with path details held in the string to start a native program as follows:
        if(e.getActionCommand().equals("Word"))
          if(Path1.equals(null))
            EntryBox = new DataEntryBox();  //Create a dialog box for user.
          else
            try
              Runtime.getRuntime().exec(new String[]{Path1}); //Starts prog
            catch(IOException f){}
        }Whenever I press a button on my program that does not contain a path and instead contains the null value for the relevant string I get the following error message:
    C:\j2sdk1.4.0\bin\javaw -classpath "D:\Java\JavaQuickLauncher\classes;C:\j2sdk1.4.0\jre\lib\charsets.jar;C:\j2sdk1.4.0\jre\lib\jaws.jar;C:\j2sdk1.4.0\jre\lib\jce.jar;C:\j2sdk1.4.0\jre\lib\jsse.jar;C:\j2sdk1.4.0\jre\lib\rt.jar;C:\j2sdk1.4.0\jre\lib\sunrsasign.jar;C:\j2sdk1.4.0\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.0\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.0\jre\lib\ext\localedata.jar;C:\j2sdk1.4.0\jre\lib\ext\sunjce_provider.jar;C:\j2sdk1.4.0\lib\dt.jar;C:\j2sdk1.4.0\lib\htmlconverter.jar;C:\j2sdk1.4.0\lib\tools.jar;C:\j2sdk1.4.0\demo\plugin\jfc\Java2D\Java2Demo.jar;C:\j2sdk1.4.0\demo\jfc\Java2D\Java2Demo.jar" javaquicklauncher.Begin
    java.lang.NullPointerException
         at javaquicklauncher.GUI.actionPerformed(GUI.java:160)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
         at java.awt.Component.processMouseEvent(Component.java:5021)
         at java.awt.Component.processEvent(Component.java:4818)
         at java.awt.Container.processEvent(Container.java:1380)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Container.dispatchEventImpl(Container.java:1437)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
         at java.awt.Container.dispatchEventImpl(Container.java:1423)
         at java.awt.Window.dispatchEventImpl(Window.java:1566)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    It is my feeling that the exec() method of Runtime is causing this ream of errors, however I feel that my test condition -- if(Path1.equals(null)) -- should avoid trying to run the exec() method when the string is truly null. I am really stuck with this one, any help / suggestions will be greatly appreciated.
    Thanks for your time.

    Path.equals(null) ... and if the Path is null u ll get a NullPointerException.
    U r trying to do an equals on null.

  • Problems with My Nano when using Accessories

    I bought my nano in November and haven't had any problem with it...until now. For x-mas I got an ITrip and a music station. My Nano doesn't like them. It worked once, and then stopped working. I took my nano to an Apple Store where they reset everything. It worked...for a day and now my nano won't play music through the ITrip or music station! Any ideas because I don't want to reset it and then re-load everything when I want to use my accessories. Thanks!
    Nano-4g   Windows XP  
      Windows XP  

    Hello Ashers,
    Welcome to Apple Discussions.
    I don't want to reset it and then re-load everything when I want to use my accessories.
    Resetting will not delete songs/photos from your nano. Sometimes there's a glitch in the nano, where you would have to reset:
    Resetting iPod
    The next time when you plug your nano to your iTrip and music station, you might want to try turning your nano on first. See if that helps.
    Gary

  • Parent Refresh After Modal Close when using .show_modal method

    I followed the manaul ".show_modal" method in this thread: open Skillbuilders modal page from report
    My question ishow do I refresh the parent when the modal closes?

    svk1965 wrote:
    I followed the manaul ".show_modal" method in this thread: open Skillbuilders modal page from report
    My question ishow do I refresh the parent when the modal closes?Are you talking about refreshing a region in the parent page? If yes, you can execute the following JS code after the modal closes to refresh a specify region:
    parent.$('#<your-region-static-id-here>').trigger('apexrefresh');

  • How to preserve old dtd when using writetofile method

    Hi,
    I have one doubt.How to preserve the dtd of xmlfile before parsing it with the xml parser for pl/sql ,write this saved dtd to the document object and use to writofile method of the dom object.If this is possible then can anyone ,please give me suggestions.
    I illustrate the situation ,given below is the dtd of the file before parsing :-
    <!DOCTYPE family [
    <!ELEMENT family (member*)>
    <!ATTLIST family lastname CDATA #REQUIRED>
    <!ELEMENT member (#PCDATA)>
    <!ATTLIST member memberid ID #REQUIRED>
    <!ATTLIST member dad IDREF #IMPLIED>
    <!ATTLIST member mom IDREF #IMPLIED>
    ]>
    After parsing and using the writetofile method ,the dtd present below is the changed dtd of the new xml file.
    <!DOCTYPE family [
    <!ELEMENT member ANY>
    <!ATTLIST member memberid ID >
    ]>
    Can anyone say how to stop this.Any help would be great
    Regards
    gopal

    Hi, Kiran,
    As the others have said, the only way ^1^ to get the result set in any particular order is to use an ORDER BY clause.
    Here's the general way to do that in SQL in case of a UNION:
    WITH  union_results     AS
         select 'a' AS txt, 1 AS sort_key from DUAL
        union
         select 'd',        2             from DUAL
        union
         select 'b',        3           from DUAL
        union
         select 'c',        4           from dual
    SELECT    txt
    FROM       union_results
    ORDER BY  sort_key
    ;In SQL, you can only ORDER BY expressions that arei n the SELECT clause, so to avoid displaying sort_key, the sub-query is necessary. A lot of people don't use pure SQL for this; they have their front end hide the sort_key column. In SQL*Plus, for example, you can say COLUMN sort_key NOPRINT.
    ^1^ There is one exception, which does NOT apply to this case, or most others. CONNECT BY, even without ORDER BY, does impose a partial ordering.

  • Crystal reports "Database login failed" when using push method

    I have a web application (ASP.NET, .NET v3.5), that pushes data to a CR 2008 report. On two servers one of the three reports returns a "Database login failed" error. I am stumped since there is no login, it's push not pull; in addition the problem is hard to debug since it works fine from my developers workstation. I have "updated" the xsd in that report, reinstalled the app, etc., non of which helped. If anyone has a solution or even ideas I'd appreciate the help.

    What about following the troubleshooting steps as described in the blog;
    Create an XML file off of your dataset. Make sure this is done just before you set the dataset to the report:
                rpt.Load(rptPath)
    myDataset.WriteXml(xmlPath, XmlWriteMode.WriteSchema)
    rpt.SetDataSource(myDataset)
    Copy the above created XML to your development system
    Open the problem report in the Crystal Reports designer
    In the Desigger, go to the Database menu and select u201CSet Datasource Locationu201D
    In the u201CReplace with:u201D pane, expand the u201CCreate New Connectionu201D folder.
    Double click the u201CADO .NET (XML)u201D icon
    Browse to the location of the XML file you created in step (1)
    Click on the path to the XML. The <Update> button should enable
    Click on the <Update> button
    Typically, either of the following will happen:
    You will get a u201CMap Fieldsu201D dialog. This indicates that the XML written off of your dataset does not match what the report is expecting. This may be due to incorrect fields name, incorrect field type, etc. You will now need eliminate the difference.
    Incorrect data or no data. There is an issue with your dataset and you need to determine why the data is not present in your dataset. Looking at the XML may be a good place to start.
    Ludek

Maybe you are looking for

  • How to extract data from a file?

    o to all labview users. I am currently learning labview to control the network analyzer hp8720 as part of my project. Through my program, i am able to do a sweeping function with my NA and the sweeping data are written to txt file. and i want to extr

  • The data from a table of a database are not retrieved in ADF BC Application

    I have two separate ADF BC applications. Each application retrieve the data from the same scheme of a database. Both applications work well when I launch them under embedded OC4J. I have deployed these applications to a standalone OC4J. When I launch

  • MAC OS X 10.6.3 issues with iTunes/Magic mouse

    This is strange. Somehow I was able to upgrade Snow Leopard 10.6 to 10.6.3. How was that possible? I did this about a week or so ago. 10.6.3 is not available on Apple's download site today 2-7-2010. How did I get access to it? A couple of weeks ago,

  • Random Colour

    Does anyone know how to pick a random color from a list of colors, say {"red", "green", "yellow", "blue"} ?

  • Help! Anti-Virus Software

    I recently bought a macbook pro two weeks ago and with my previous laptops (they were windows) ive always had to get anti-virus software. Do i need security for my macbook pro?