Testing ViewObject from ApplicationModule

Hi all,
I am trying to test the ViewObject from the ApplicationModule, but the ViewObject is null, what is the proper way to initialize it? Here is my code:
public static void main(String[] args) {
MyAppModuleImpl impl = new MyAppModuleImpl ();
MyClazzViewObjectImpl vpl = new getMyClazzViewObjectImpl1();
vpl.executeQuery(); //NULL POINTER OCCURS UPON REFERENCE TO vpl
System.out.println(vpl.getAllRowsInRange().length);
Can someone point me to the right direction? Thanks very much in advance.

Thanks John for the quick response, I should of been a bit more detail in my original post. After doing a bit more digging around here is the solution I found:
public static void main(String[] args) {
try
ApplicationModule am = Configuration.createRootApplicationModule("model.MyAppModule", "MyAppModuleLocal");
System.out.println(am.getTransaction().isConnected()); //should print true.
ViewObject vo =am.findViewObject("MyClazzView1"); //This string should correspond to the accessor definition inside your Application Module.
vo.executeQuery();
am.getTransaction().commit();
Row[] rows = vo.getAllRowsInRange();
System.out.println("Rows in range: " + rows.length); //Should print out a number if you defined your VO correctly.
catch (Exception ex) {
ex.printStackTrace();
-W

Similar Messages

  • How to avoid ViewObject or ApplicationModule cache?

    I am developing a web application using JSP, EJB (SessionBean) and BC4J.
    How to avoid ViewObject or ApplicationModule cache?
    Is there any method in Oracle API (oracle.jbo, oracle.jbo.server, ...) to do this?
    null

    Objects returned from queries against your session are the shared/cached instances and should not be changed. Changes applied directly against these instances will not be reflected in the database.
    To apply changes against objects within a transaction and isolate these changes from other thread while they are pending you must use a UnitOfWork. The UnitOfWork will provide you a transactional isolated working copy where changes can be safely made. Then when the UnitOfWork is committed the minimal change-set is calculated and written to the database prior to being merged into the shared cache.
    Some useful links into the documentation:
    http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10313/undrstdg.htm#1110428
    http://download-west.oracle.com/docs/cd/B10464_01/web.904/b10313/xactions.htm#1127587
    Doug

  • To check ink levels I am told to print self test. page from cpu or printer.

    There is no way to print a test page on my" psc 2410 all in one" connected to a HP cpu with Win 7, 64 bit. Is there a workaround/

    The page here shows how to print a self-test report from the front panel, but it does not appear to have ink level information.  I have not used a PSC 2410 for years, but the following may give you what you need:  press the # and * buttons together on the printer.  The screen will say "Enter special key combination".  Press 1 2 3.  This should bring up a service menu.  Use the right arrow button repeatedly to bring up a "Special Reports" screen, OK, then right arrow to select "Cartridges" or some similar, then press OK. A page will print with ink level information shown about the middle of the page.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • HP 1055 cm Plus Plotter will not print Test Page from any port - Vista 64

    Hello,
    Have a brand new computer with the Vista 64 bit platform and an HP 1055 cm Plus Plotter.  I have downloaded the software and drivers from the web, and got it to recognize the plotter.  With the plotter as the default, it will not print a test page from any of the ports.  I have tried all of the ports multiple times.  I must have the wrong driver, or is there another problem I am missing? 
    Please help, and help quickly, my idiotic boss keeps hounding me and making the most ridiculous suggestions "try turning it on and off again" "Why do you even need a driver, just print it", etc. etc.  HELP!

    This forum is focused on consumer level products.  For the Designjet you may have better results posting in the HP Enterprise Designjet forum here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How to change the status of test cases in Test Plan from Design to Ready using Excel VBA

    HI,
    How to change the status of test cases in Test Plan from Design to Ready using Excel VBA

    Thanks Florin,
    Your piece of code has worked alot, and it was very helpful in changing the Status of the Workitem to "READY" for all the Users fo the workitem.
    Points have been rewarded for your help.
    Process: We have acheived this using the "Work Item Exits", Usng "AFTER_EXECUTION" Method.
    Note: The Exit will be executed if "exit_cancelled"  statement is present/used in the work item method. if not it is not taking to the exit code. I'm unable to find the reason for it. Florin can u please explain this point.
    Please check the link for adding the code in Work Item Exits.
    http://wiki.sdn.sap.com/wiki/display/ABAP/ProgramExitsIn+Workflow
    Please find the Code:
    method IF_SWF_IFS_WORKITEM_EXIT~EVENT_RAISED.
    Get the context of the workitem
      me->wi_context = im_workitem_context.
    After execution of the workitem call the method AFTER_EXECUTION
      if im_event_name eq swrco_event_after_execution.
        me->after_execution( ).
      endif.
    endmethod.
    METHOD AFTER_EXECUTION.
    This method acts as the Event Handler for SWRCO_EVENT_AFTER_EXECUTION
      DATA: LCL_L_WID TYPE SWW_WIID,
            L_STATUS TYPE SWR_WISTAT-STATUS,
            L_NEW_STATUS  TYPE SWR_WISTAT,
            L_SWR_MESSAG  TYPE STANDARD TABLE OF SWR_MESSAG,
            L_SWR_MSTRUC  TYPE STANDARD TABLE OF SWR_MSTRUC.
    Get work item
      CALL METHOD WI_CONTEXT->GET_WORKITEM_ID
        RECEIVING
          RE_WORKITEM = LCL_L_WID.
      L_STATUS = 'READY'.
      CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_STATUS'
        EXPORTING
          WORKITEM_ID    = LCL_L_WID
          STATUS         = L_STATUS
          USER           = SY-UNAME
          LANGUAGE       = SY-LANGU
          DO_COMMIT      = 'X'
        IMPORTING
          NEW_STATUS     = L_NEW_STATUS
         RETURN_CODE    = SY-SUBRC
        TABLES
          MESSAGE_LINES  = L_SWR_MESSAG
          MESSAGE_STRUCT = L_SWR_MSTRUC.
      IF SY-SUBRC EQ 0.
      ENDIF.
    ENDMETHOD.
    Thank You Once Again,
    Ajay Kumar Chippa

  • Cloning a test CMS from a Production environment - process?

    Hi there - I am attempting to clone a test environment from a production CMS system database.
    ENVIRONMENT
    BO Version: XI3.1
    O/S: Linux
    Web Server: JBOSS 4.3
    Database platform: Oracle 10g
    BOXI SETUP
    1. BOXI environment type on Production (clustered with two nodes.)
    *. Linux servernames for each BOXI node=Prod100 and Prod 101.
    *. JBOSS ports on both nodes=15000. CMS port on both nodes=6400.
    *. Database Sid=BOCMS@PROD
    2. BOXI environment type on Perf (clustered with two nodes)
    *. Linux servernames for each BOXI node=Perf100 and Perf 101.
    *. JBOSS ports on both nodes=15100.
    *. CMS port on both nodes=6400.
    *. Database Sid=BOCMS@PERF
    Process and requirement
    For each project, as part of performance testing, we copy the production database (CMS / system database) in order to clone it. The idea is that we have a copy of production which we can then use for performance testing. We do not need to rebuild the BOXI 3.1 server (that remains there), but we need to rebuild system database. In version five we would copy the BO_REPADMIN schema into the PERF database and then change the connections in Supervisor. Can this process also be done in XIR3.1 ?
    Options considered so far
    1. The DBAs recommended just copying the BOXI CMS / System Database tables from PROD to the PERF database. My question is - don't we then need to change the settings in the CMS database (PERF) to somehow so point to the correct physical servers / correct SIA etc.? Could I just alter th FRS references and use the cmsdbsetup.sh to alter all the details or are there other steps required (manally altering ccm.config) ?
    2. Copying the CMS from the PROD to the PERF CMS schema. However it seems like this is not an option as the Admin guides stipulates:
    "However, you cannot change the BusinessObjects Enterprise installation path, operating system, and machine name"
    As the installation path for the BOXI performance environment is different to production and they reside on different physical machines it sounds to me that this isn't an option, right?
    3. Use the cmsdbsetup.sh script - create a blank new CMS on the PERF database then migrate all production objects from PROD to PERF using the Import Wizard.
    Could anyone recommend further options? Thanks in advance.

    Hi;
    Can any one explain the detaild process about Operating level snapshot to prepare a test setup from a production databaseMainly; We are using IBM disk and our disk team take snapshot of disk and we can work on those snapshot than storage team again revert back system orginal state.
    As you can see its performed by storage team contact wiht your vendor.
    If you dont have storage team than I suggest see my below post:
    http://heliosguneserol.wordpress.com/2011/12/08/11g-snapshot-standby-for-real-time-testing/
    Regard
    Helios

  • Generate Test Report from database

    Hi
    How can i generate a Html Test Report from a UUT Test that i logged about a week ago?
    Does Teststand have a pre built sequence for this?
    Help share your knowlegde

    Shako-
    I see that you also posted this question in this forum.  As Taylor mentioned, there isn't a tool to generate a report from data in a database.  You can create a sequence to call into a database and then generate a report.  I would look at the example located at C:\Users\Public\Documents\National Instruments\TestStand\Examples\Database for reference.
    Thanks,
    Sean
    Applications Engineering Specialist - Semiconductor Test
    National Instruments

  • Test message from RWB: Error when sending message: 401 Unauthorized

    Hi Experts,
    While I am sending test message from RWB, I am getting following error:
    Error when sending message: 401 Unauthorized
    I am using correct userid/password as I am working with Repository/directory. Also in one of the test scenario files are picking up from folder but never got processed because of similar issue (HTTP_RESPONSE_CODE_NOT_OK) and SERVICE NOT AVAILABLE.
    I am having SAP_ALL authorizations and few days back everything was fine.
    I think something wrong with configuration in XI but I am unable to pin point.
    Please help.
    Regards,
    Gourav

    Yes,
    but
    Role of Business System : Integration system
    Corresponding Integ. Server : http://<XI server>:<http port>/sap/xi/engine?type=entry
    How can I change it to Application system
    and RUNTIME->IS_URL = http://<XI server>:<http port>/sap/xi/engine?type=entry
    Regards,
    Gourav

  • Changing MS Office (test drive) from default word processor

    Sorry for sucking up so much topic space, but I spent the better part of an hour trying to figure out how to change my legitimate MS word 2004 to the default word processor from the test drive version that comes on the MBP. Everytime I click on a MS word file I get an error message because I deleted the test drive version that was set as the default to open the word documents--how do i change this???
    Any ideas? Seriously, I googled it and everything, it must be more simple than this!

    Hi seagonus,
    If you have removed the test drive from your computer, and now have the full version of Office installed, highlight the file, click on the More Info tab to the right. A box will open that will have a drop down that says "open with" . In the list you will see the option for Microsoft Word (default). If this doesn't work, then you haven't truly removed the test drive, and that could be the problem. If so run the uninstaller again that comes in your MS Office folder under "Additional Tools". Good luck!

  • Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic. can anyone tell me what is the best way to clone the environment, can I just tar the weblogic file syste

    Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic..
    Can anyone tell me what is the best way to cloning the application from different environment, the test and production are in different physical server.
    Can I just tar the weblogic file system and untar it to the new server and make the necessary changes?
    Can anyone share their experiences and how to with me?
    Thank in advance.
    Katherine

    Hi Katherine,
    yes and no . You need as well weblogic + soa files as the database schemas (soa_infra, mds...).
    Please refer to the AMIS Blog: https://technology.amis.nl/2011/08/11/clone-your-oracle-fmw-soa-suite-11g/
    HTH
    Borys

  • Error running web service enabled from ApplicationModule Service Interface

    Hi,
    I have created a web service from from ApplicationModule Service Interface and exposed a view instance update operation. When I run the service (right click on serviceimpl and run), I am getting the following error
    <BEA-101371> Error: There was a failure when processing annotations for application context. Please make sure that the annotations are valid. The error is message
    Description     There was a failure when processing annotations for application context. Please make sure that the annotations are valid. The error is message
    Cause     The descriptor has an invalid servlet-class, filter-class or listener-class
    Action     Fix the descriptors in application or the library.
    I have looked at web.xml, weblogic.xml, but couldn't figure out the issue.
    Our packaging structuring is some like this.
    Model -> Contains EO's, associations
    UIModel -> Contains AM, VO's Webservices
    UI -> Jsp, taskflows.
    But when I tried created a sample application with Model and View Controller. and a webservice in Model project, it runs OK.
    Please guide with on this issue.
    Appreciate your help in advance.
    Regards,
    Vara

    I am getting the same error. What was the solution that worked for you? Please help

  • Operating level snapshot to prepare a test setup from a production database

    Hi ,
    Can any one explain the detaild process about Operating level snapshot to prepare a test setup from a production database
    Thank You

    Hi;
    Can any one explain the detaild process about Operating level snapshot to prepare a test setup from a production databaseMainly; We are using IBM disk and our disk team take snapshot of disk and we can work on those snapshot than storage team again revert back system orginal state.
    As you can see its performed by storage team contact wiht your vendor.
    If you dont have storage team than I suggest see my below post:
    http://heliosguneserol.wordpress.com/2011/12/08/11g-snapshot-standby-for-real-time-testing/
    Regard
    Helios

  • Labview 8.2 close or crashes when opening up Test Exec. from labview 5.1

    Why  would Labview 8.2 close or crashes when opening up Test Exec. from 5.1? Labview 8.2 begins to load the Test Executive VI, then, stops and closes labview altogether.  I remember getting it to load before but do not know what could be causing this?  I am tasked with updating the old code from Labview 5.1 to Labview 8.2.1; actually Labview 8.5, since it is the latest.
    Thanks, Mike

    Dennis,
    Thanks for the response.  The odd thing is that I am able to open some of the subvi's.  And I've opened the test executive before.   Now, during the initial loading of the Test Executive, there are some drivers that are not executable by Labview 8.2.1 (i.e.  ni-daq cards.... for MIO and DIO boards).  Could that be it?  I would expect the program to load but not run.  I have gotten the program to load before, so I am confused by it not loading now.  Thanks for the tip on Labview 8.5 as I was ultimately going to that version, too! 
    My ideal situation would be to load all drivers ( including Traditional Ni-daq and Ni-VXI 3.3.1, etc) and run this program using Labview 8.5 or 8.2.1 on an XP platform.  This original program was created in Labview 5.1 and Windows NT.  Any help and suggestions would be appreciated.
    Thanks for your help,
    Michael

  • When I try to use the Vision Acquisitio​n vi, I get an error message saying that " The system did not receive a test packet from the camera."

    Error -1074360271 occurred at IMAQdx Start Acquisition.vi
    NI-IMAQdx: (Hex 0xBFF69031) The system did not receive a test packet from the camera. The packet size may be too large for the network configuration or a firewall may be enabled.

    Bruce Ammons wrote:
    Did you try disabling test packets?  I know Basler cameras have a "Enable Test Packets" setting buried in Advanced Network settings or something like that.  You have to change the setting in MAX to show all settings instead of just acquisition, then locate the setting.  I have been told regularly that the setting must be turned off for Basler cameras to work properly.  Perhaps your camera has the same setting and the same requirement.
    Bruce
    A very specific firmware revision for certain Basler cameras had an issue where the test packet would not be sent for certain packet sizes and certain specific conditions, causing a false report of a test packet failure when a normal acquisition would in fact succeed. However, this was fixed in later firmware revisions and I have never seen a similar issue on any other types of cameras. 
    Aside from this specific case, if a test packet fails, it generally means an acquisition will as well. Given that Pleora's software can acquire, we can rule out networking topology and hardware, assuming you are using the same packet size as the Pleora software is. The only other thing that would seem a likely candidate would be a software issue like a firewall or some other filter driver that is interefering with IMAQdx receiving the data.
    Eric

  • Create test database from standby without some data

    Hi. I want to create test database from my standby database using rman.
    But i have some some tables and where information is too large i dont want backup all data from this tables. because i dont have enough space on my test server.
    Have u any idea for solution this problem.
    Thanks

    But have suggestion.
    You can create duplicate database on based your target database (to new host) and skip undesired tablespaces...
    bash# rman target /
    RMAN> ....
    your code should be like :
    run {
    allocate auxiliary channel 'dev_0' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_1' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_2' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    allocate auxiliary channel 'dev_3' type 'sbt_tape'
    parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=my,OB2BARLIST=MY DAILY)';
    SET UNTIL SCN 7769764681915;
    DUPLICATE TARGET DATABASE TO MYTS SKIP TABLESPACE TOOLS_IDX,TOOLS,ARCHIVE,IDX;
    Edited by: Ulfet Tanriverdiyev on Dec 21, 2010 3:42 AM

Maybe you are looking for

  • Keyboard and trackpad freeze if I don't use them for 11 seconds

    If I stop using input (either with the built-in keyboard or trackpad) for 11-12 seconds (it's consistent), I'm locked out of using the keyboard or trackpad for anywhere between 4 and 60 seconds. The computer continues to function normally (if a movie

  • Multiple CLOB's/BLOB's in one SELECT

    Hi Is there a standard way to retrieve several CLOB fields from a resultset? I get an SQLException, Stream has already been closed if I do not select the fields out, one at a time. What is the correct way to deal with this? I'd love to be able to whi

  • Urgent: How to bring the workspace launcher window back in Eclipse

    Hi all, I accidently checked the "Use this as the default and do not ask again" checkbox appeared in the workspace launcher window in eclipse. Now I want to create a new workspace. But don't know how to do it. I guess if I can see the workspace launc

  • What to do if you loose your system account password

    I have recently been giving ownership of an application that uses 10g Express Edition. Unfortunately the only user documention I have is an low level user. I am unable to backup/restore this database b/c of priveledge issues. What are my options if I

  • When Change LDAP Port , Have to Rebuild?

    I need to change LDAP port(389-> 1389) - Admin port : 390 -> 1390 - 3 Master Replication - Sun Java System Directory Server Enterprise Edition 5.2 SP6 sure, I need to remove exsting Replication Agreements and create Replication Agreements. then, I ha