Genericall​y compacting arrays using a test function

Is there a way to do the following (or at least this stuff in the box) generically. Is there a name for this algorithm?
Essentially I want to reduce an array to just its elements that pass a test. The test can just be another array of booleans which say whether the array passed the test or not. I feel like I write this code a lot and it bothers me that I write it so much.
Thanks!
Solved!
Go to Solution.

Thanks all for the responses.
I find it so frustrating that Labview sometimes can't even do things that are so simple in other languages (see like http://docs.python.org/2/library/functions.html#fi​lter) or that can be trivial to implement in other languages (see C++). 
My hope was that no variants would be necessary at all as they add clutter and bypass compile time type checking. Clearly one way to make functions like this generic is to use variant data. I was kinda hoping to avoid it all together. The reason I wrote out the function the way I did is because it's space and time efficient in more cases, generally.
It's true you're probably fine doing this in one loop (using a preallocated array with the same size as the input array). Consider though that if you want to avoid making a full sized copy of the array, generally, seperating out the loops is needed. Labview doesn't make a copy of any array data until it passes the data into the test function (and if the test function isn't even a vi then it doesn't make a copy at all) which it will only do one or P at a time, depending. Then the only new allocation of significance is the allocation by initialize array, which in many cases will be substantially smaller than the input array.
This time the performance doesn't matter. But I'd sure like to make generic functions like these that could be generally performant. One day maybe.

Similar Messages

  • Oracle.jbo.RowCreateException: JBO-25017 -- using AM Test function

    I followed the directions in the OA Framework Developers Guide specific to creating application modules, Entity and View Objects as well as associations. (Really not any different than non-AO specific instructions).
    I created two EO's, two VO's off of those EO's and one VO based soley on a SQL statement (not EO related). When I run the AM Test option and select the VO that was created based on a simple SQL statement, it brings back the data as expected. When I double-click on the VO's that were created based on their associated EO - I get the RowCreateException. All tables have data. In addition, the VO that was created based off a simple SQL statement...which is the one that works in the AM tester is also hitting one of the same tables that one of my other VO's was created off of. (Invoice table).
    Is the BC4J AM tester a valid indicator as to whether or not my VO's are working properly or is it possible that it's buggy in any some way? Any ideas would be greatly appreciated.
    Stack trace follows:
    Thanks,
    Chris
    oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for TpcApInvoicesEO.
         at oracle.jbo.server.EntityDefImpl.createBlankInstance(EntityDefImpl.java:1054)
         at oracle.jbo.server.ViewRowImpl.createMissingEntities(ViewRowImpl.java:1532)
         at oracle.jbo.server.ViewRowImpl.init(ViewRowImpl.java:236)
         at oracle.jbo.server.ViewDefImpl.createBlankInstance(ViewDefImpl.java:1050)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1007)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2643)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2547)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1891)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1745)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1257)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2850)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2495)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2357)
         at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1541)
         at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:2313)
         at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:5240)
         at oracle.jbo.jbotester.NavBar.resetButtons(NavBar.java:475)
         at oracle.jbo.jbotester.NavBar.setIterator(NavBar.java:152)
         at oracle.jbo.jbotester.SimpleForm.setIterator(SimpleForm.java:56)
         at oracle.jbo.jbotester.SimpleForm.<init>(SimpleForm.java:50)
         at oracle.jbo.jbotester.VOTreeNode.showForm(VOTreeNode.java:112)
         at oracle.jbo.jbotester.BaseTree.processTreeMouseClicked(BaseTree.java:387)
         at oracle.jbo.jbotester.BaseTree.access$5000171(BaseTree.java:46)
         at oracle.jbo.jbotester.BaseTree$TreeMouseListener.mouseClicked(BaseTree.java:494)
         at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
         at java.awt.Component.processMouseEvent(Component.java:5103)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ## Detail 0 ##
    java.lang.InstantiationException
         at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:308)
         at java.lang.Class.newInstance(Class.java:261)
         at oracle.jbo.server.EntityDefImpl.createBlankInstance(EntityDefImpl.java:1048)
         at oracle.jbo.server.ViewRowImpl.createMissingEntities(ViewRowImpl.java:1532)
         at oracle.jbo.server.ViewRowImpl.init(ViewRowImpl.java:236)
         at oracle.jbo.server.ViewDefImpl.createBlankInstance(ViewDefImpl.java:1050)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1007)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2643)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2547)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1891)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1745)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1257)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2850)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2495)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2357)
         at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1541)
         at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:2313)
         at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:5240)
         at oracle.jbo.jbotester.NavBar.resetButtons(NavBar.java:475)
         at oracle.jbo.jbotester.NavBar.setIterator(NavBar.java:152)
         at oracle.jbo.jbotester.SimpleForm.setIterator(SimpleForm.java:56)
         at oracle.jbo.jbotester.SimpleForm.<init>(SimpleForm.java:50)
         at oracle.jbo.jbotester.VOTreeNode.showForm(VOTreeNode.java:112)
         at oracle.jbo.jbotester.BaseTree.processTreeMouseClicked(BaseTree.java:387)
         at oracle.jbo.jbotester.BaseTree.access$5000171(BaseTree.java:46)
         at oracle.jbo.jbotester.BaseTree$TreeMouseListener.mouseClicked(BaseTree.java:494)
         at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
         at java.awt.Component.processMouseEvent(Component.java:5103)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    ----- LEVEL 1: DETAIL 0 -----
    java.lang.InstantiationException
         at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:308)
         at java.lang.Class.newInstance(Class.java:261)
         at oracle.jbo.server.EntityDefImpl.createBlankInstance(EntityDefImpl.java:1048)
         at oracle.jbo.server.ViewRowImpl.createMissingEntities(ViewRowImpl.java:1532)
         at oracle.jbo.server.ViewRowImpl.init(ViewRowImpl.java:236)
         at oracle.jbo.server.ViewDefImpl.createBlankInstance(ViewDefImpl.java:1050)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1007)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2643)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2547)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1891)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1745)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1257)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2850)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2495)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2357)
         at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:1541)
         at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:2313)
         at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:5240)
         at oracle.jbo.jbotester.NavBar.resetButtons(NavBar.java:475)
         at oracle.jbo.jbotester.NavBar.setIterator(NavBar.java:152)
         at oracle.jbo.jbotester.SimpleForm.setIterator(SimpleForm.java:56)
         at oracle.jbo.jbotester.SimpleForm.<init>(SimpleForm.java:50)
         at oracle.jbo.jbotester.VOTreeNode.showForm(VOTreeNode.java:112)
         at oracle.jbo.jbotester.BaseTree.processTreeMouseClicked(BaseTree.java:387)
         at oracle.jbo.jbotester.BaseTree.access$5000171(BaseTree.java:46)
         at oracle.jbo.jbotester.BaseTree$TreeMouseListener.mouseClicked(BaseTree.java:494)
         at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
         at java.awt.Component.processMouseEvent(Component.java:5103)
         at java.awt.Component.processEvent(Component.java:4897)
         at java.awt.Container.processEvent(Container.java:1569)
         at java.awt.Component.dispatchEventImpl(Component.java:3615)
         at java.awt.Container.dispatchEventImpl(Container.java:1627)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
         at java.awt.Container.dispatchEventImpl(Container.java:1613)
         at java.awt.Window.dispatchEventImpl(Window.java:1606)
         at java.awt.Component.dispatchEvent(Component.java:3477)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    Your table didn't have columns for last_update_date, creation_date etc.
    However OAF enforces you to either have those columns so that their setters and getters can be generated in EOImpl class
    public void setLastUpdateLogin( oracle.jbo.domain.Number n ) {}
    public void setLastUpdatedBy( oracle.jbo.domain.Number n ) {}
    public void setLastUpdateDate( oracle.jbo.domain.Date n ) {}
    public void setCreationDate( oracle.jbo.domain.Date n ) {}
    public void setCreatedBy( oracle.jbo.domain.Number n ) {}
    Thanks
    Raj

  • Memory Leak, Deallocati​ng memory after using imaqImageT​oArray() function

    I have created a program (LW/CVI- Imaq Vision), which uses a timer callback to acquire an image, convert the image to an array using the imaqImageToArray() function, manipulates the data in the array, converts the data to an image, displays the image, and disposes of the image(imaqDispose()), and apparently the imaqImageToArray() function clears the allocation pointer, however does not deallocate the memory, such that the next time the function is called again, imaq allocates new memory, thus eventually the application slows down and freezes due to lack of memory. Does anyone have any suggestions?

    Hello,
    You need to call the imaqDispose() for the assigned pointer to actually clear the allocated memory.
    iPointer = imaqImageToArray(imgInputImage,IMAQ_NO_RECT, &iCols, &iRows);
    imaqDispose (iPointer);
    Let me know if you have further questions regarding this.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Question about the function module testing function

    Dear everyone
    I am trying to use the testing function of a function module in order to understand how the following
    function module works.
    <Function module>
    BAPI_SALESORDER_CREATEFROMDAT2 --> This function module is to create a sales order
    I input several data in the test function, and I was the successful result with some sales order number.
    However, this sales order is not actually registered in the system.
    Would it be possible to run the function module (in the test mode), so that it would actually
    register those documents (ex. sales orders) in the system.
    I would like to see the actual sales orders to understand how the function module works.
    Thank you very much in advance
    Takashi

    Dear everyone
    ※Sorry, my initial message was hard to understand. So I will write it again.
    I am trying to use the testing function of a function module in order to understand how the following
    function module works.
    <Function module>
    BAPI_SALESORDER_CREATEFROMDAT2 --> This function module is used to create a sales order
    I input several data in the test function, and I've got the successful result with some sales order number.
    However, this sales order is not actually registered in the system.
    Would it be possible to run the function module (in the test mode), so that it would actually
    register those documents (ex. sales orders) in the system?
    I would like to see the actual sales orders to understand how this function module works.
    Thank you very much in advance
    Takashi

  • Using BC4J to pass an array to a stored function

    I have successfully implemented the use of BC4J view objects to pass and retrive values from a stored database procedure/function as per Steve Muench's paper.
    What I am having difficulty achieving is passing through an array to a stored function. I have a multiple selection table where on submit, I retrieve the selected values and want to be able to put them in a array and pass them to a stored function.
    At the database level, I have created a nested table with one of the columns being a table of numbers. A wrapper function is called with the array type being one of the in parameters and the database updated.
    I am however having no luck building the array in my Java code and passing it to the database through an expert-only view object.
    I have :
    1. Database wrapper function has an extra parameter for the table of numbers (number(10))
    2. Changed the view object query to include the extra parameter (of type Number[])
    3. Changed the relevant view object and transaction Impl classes to pass through an array of oracle.jbo.domain.Number
    4. Update my test module class to
    -- Test module class
    String _am = "transaction2.transaction2module", _cf = "Transaction2ModuleLocal";
        String str1 = "String1";
        String str2 = "String2";
        String str3 = "String3";
        Number[] num4 = {new Number(1001),new Number(1002),new Number(1003),new Number(1004)};
        Transaction2Module testModule = (Transaction2Module)Configuration.createRootApplicationModule(_am,_cf);
        TxnResultType txnResult = testModule.getTxnResult(str1,str2,str3,num4);
    -- Transaction2ModuleImpl.java
    public ProcessTransactionImpl getProcessTxn()
        return (ProcessTransactionImpl)findViewObject("ProcessTxn");
      public TxnResultType getTxnResult(String p1, String p2, String p3, Number[] p4)
        return getProcessTxn().getTxnResult(p1, p2, p3, p4);
    -- ProcessTxnImpl.java
    public TxnResultType getTxnResult(String p1, String p2, String p3, Number[] p4)
        setWhereClauseParam(0,p1);
        setWhereClauseParam(1,p2);
        setWhereClauseParam(2,p3);
        setWhereClauseParam(3,p4);
        executeQuery();
        return ((ProcessTransactionRowImpl)first()).getTxnResult();
      }but the error message given is :
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: select transaction_wrapper(:0, :1, :2, :3) as txn_result from dual
    java.sql.SQLException: Invalid column type
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
    Can anyone offer some suggestions ?
    Thanks,
    Brent

    Thanks for the reply - I had nearly given up on this ! I did add the setWhereClause statement as you suggested
    setWhereClause("p1=:0 and p2=:1 and p3=:2 and p4=:3");but still got the same error. I have posted the entire output which may help you see what's still going wrong (hopefully!)
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. 
    Statement: SELECT * FROM (select test_array(:0,:1,:2,:3) as result from dual) QRSLT  WHERE (p1=:0 and p2=:1 and p3=:2 and p4=:3)
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
              QueryCollection.java:541
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
              ViewObjectImpl.java:2650
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
              ViewRowSetImpl.java:523
         void oracle.jbo.server.ViewRowSetImpl.executeQuery()
              ViewRowSetImpl.java:564
         void oracle.jbo.server.ViewObjectImpl.executeQuery()
              ViewObjectImpl.java:2614
         java.lang.String mypackage5.TxnViewImpl.getResult(java.lang.String, java.lang.String, java.lang.String, oracle.jbo.domain.Number[])
              TxnViewImpl.java:25
         java.lang.String mypackage5.TransModuleImpl.getResult(java.lang.String, java.lang.String, java.lang.String, oracle.jbo.domain.Number[])
              TransModuleImpl.java:29
         void mypackage5.TestArray.main(java.lang.String[])
              TestArray.java:17
    ## Detail 0 ##
    java.sql.SQLException: Invalid column type
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
              DBError.java:187
         void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
              DBError.java:229
         void oracle.jdbc.dbaccess.DBError.throwSqlException(int)
              DBError.java:292
         void oracle.jdbc.driver.OraclePreparedStatement.setObject(int, java.lang.Object, int, int)
              OraclePreparedStatement.java:2782
         void oracle.jdbc.driver.OraclePreparedStatement.setObject(int, java.lang.Object)
              OraclePreparedStatement.java:2905
         boolean oracle.jbo.server.ViewRowSetImpl.bindParameters(java.lang.Object[], java.sql.PreparedStatement)
              ViewRowSetImpl.java:1313
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
              QueryCollection.java:511
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
              ViewObjectImpl.java:2650
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
              ViewRowSetImpl.java:523
         void oracle.jbo.server.ViewRowSetImpl.executeQuery()
              ViewRowSetImpl.java:564
         void oracle.jbo.server.ViewObjectImpl.executeQuery()
              ViewObjectImpl.java:2614
         java.lang.String mypackage5.TxnViewImpl.getResult(java.lang.String, java.lang.String, java.lang.String, oracle.jbo.domain.Number[])
              TxnViewImpl.java:25
         java.lang.String mypackage5.TransModuleImpl.getResult(java.lang.String, java.lang.String, java.lang.String, oracle.jbo.domain.Number[])
              TransModuleImpl.java:29
         void mypackage5.TestArray.main(java.lang.String[])
              TestArray.java:17
    Exception in thread main
    Process exited with exit code 1.I had to do a new example as I could not find the code I was using earlier. This is my java class
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.Number;
    import mypackage5.common.TransModule;
    public class TestArray
      public static void main(String[] args)
        String _am = "mypackage5.TransModule", _cf = "TransModuleLocal";
        String str1 = "String1";
        String str2 = "String2";
        String str3 = "String3";
        Number[] num4 = {new Number(1001),new Number(1002),new Number(1003),new Number(1004)};
        TransModule testModule = (TransModule)Configuration.createRootApplicationModule(_am,_cf);
        String txnResult = testModule.getResult(str1,str2,str3,num4);
        System.out.println("Result = " + txnResult);

  • Functionality Testing Using B1 Test Composer Tool

    Hi,
    I would like to use B1 TC for functional testing of our add-ons. Will it be possible for me to do the functional testing(add-on's expected against add-on's actual) of the add-on using B1 TC? Could anyone explain with some examples so that I can start with B1 TC.
    Our add-on has a window that allows the user to filter and display BPs in the matrix. User can select a Payment Term from the drop down and click Refresh button. Then the BPs with matching payment term should be listed in the matrix/gird. Here I want to check whether the BPs listed is correct. How can I use B1 Test Composer to do this?
    Regards,
    Sam

    Hi Johan,
    Thanks for the response. Let me explain the scenario to be tested using B1 TC in detail. The Payment Term combo in our add-on's Payment Term Update Utility form will list the payment terms ZPNET30, NET30, -Cash Basic’ etc. On selecting one of these values (say NET30), the matrix in the form is expected to list only those BPs with matching payment term(NET30). Here I need to ensure that all the BPs listed here are having the same payment term as ‘NET30’.
    While recording this action using B1 TC, let us assume that the BPs listed in the matrix are as in the below image.
    But when I rerun the B1 TC script at some later time, the BPs list might vary because of addition of new BPs to the database or changing of payment term of the existing BPs. In this instance, the Compare Matrix function of B1 TC fails, as the expected matrix values are not the same when we re-run the script. But all the BPs listed will have the matching payment term(NET30). So B1 TC reports a bug even if the functioning of the add-on is correct.
    When I manually do the testing, I apply the filter and then load each of the BP Master Data to check whether the payment term matches the selected one in the form. Then I will change and update the payment term of the existing BP or add new BPs and again performs the filtering to check whether the search result is correct. Is there a mechanism with B1 TC to handle such scenario, like accessing each individual rows/cells of the matrix/grid and check the payment term of the BPs listed?
    Regards,
    Sam

  • Using call library function on a dll file created in an old version of labview

    So I'm trying to update an old labview program to work in labview 2012. Everything converted over just fine but labview will always crashoverwrote some while using a  library function in a DLL that was compiled using labview 8.5. Labview exits, stating that it vital memory area. It passes an array of data to the library call and an empty array for output. I thought I could get around this problem by changing my code to initialize the array being passed in so that it would be large enough to hold all the expected output. Now instead of overwritting areas of memory it shouldn't, I get a pop up message that says:
    fatal internal error
    memorymanager.cpp line 406
    8.5.1.f5 
    So it appears because I don't have the ability to recompile the DLL file it runs off of the 8.5 runtime instead of the more recent one. Is there any thing I can do about this?

    rjpierce wrote:
    So I've been trying to figure out a way around this on my own while waiting on a response. From what I'm reading, a dll created in one version of the labview runtime can't be used by a different labview runtime. Am I correct in this? I feel like I must be mistaken since that's basically the opposite of how a dll should work. If nothing else works I have access to the original code for the DLL but it requires the control and simulation toolkit. I would like to avoid having to recompile the DLL since it was put in to a DLL to avoid the need for the toolkit to begin with. 
    Your problem most likely is that you try to pass native datatypes to the DLL function? That only can work if the caller and callee use the same LabVIEW runtime engine. Otherwise the memory block created in the memory manager of the caller will be accessed by the memory manager in the callee and bad things happen. Instead you should define the DLL function to use standard C datatypes (Pointer to C array) and also make sure to allocate the according buffer in the caller for all output array parameters.
    An even more elegant way would be to completely abandon the DLL approach and call the according functions directly in LabVIEW. Then you won't have the problems about mismatched runtime engines. Passing C array pointers to a DLL is less performant than passing native datatypes, but if you use native datatypes you have to make sure the DLL is compiled in the same LabVIEW version as the one you call it from.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Passing an array argument to a function by referance

    Below is my function I want to call my function but there seems to be an error in the way I am calling it can you tell me the right syntax to use?
    The function accepts 3 arguments an array of ints, an array of booleans and an int.
    I am calling it as
    findamobileset ( citys, pointers, sizeofarrays);
    public void findamobileset (int citys[], boolean[] pointers, int sizeofarrays)
    int maxarraynumber = -1;
    int tempswap = -1 ;
    boolean runagain = false;
    for(int i = 0;i < sizeofarrays; i++){
    //if the mobile flag is pointing to the right: look at the +1 current position where on and if its bigger then make that the biggest k so far
    //ALSO check if its not pointing off the array
    if(pointers[i] == true && i !=citys[sizeofarrays] && citys[i+1] < citys[i] && citys[i] > maxarraynumber){
    maxarraynumber = citys;
    //if the mobile flag is pointing to the left: look at the +1 current position where on and if its bigger then make that the biggest k so far
    if(pointers[i] ==false && i != citys[0] && citys[i-1] < citys[i] && citys[i] > maxarraynumber){
    maxarraynumber = citys[i];
    //swap k with an ajacent integer the arrow is pointing too
    if(pointers[maxarraynumber] == true)
    tempswap = citys[maxarraynumber+1];
    citys[maxarraynumber+1] =citys[maxarraynumber];
    citys[maxarraynumber] = tempswap;
    else
    {  tempswap = citys[maxarraynumber-1];
    citys[maxarraynumber-1] =citys[maxarraynumber];
    citys[maxarraynumber] = tempswap;
    //reverse all numbers greater then k
    for(int i = 0;i < sizeofarrays; i++){
    if(citys[i] > maxarraynumber){
    if(pointers[i] == true){
    pointers[i]= false;}
    else
    pointers[i] = true;
    // print out the array
    for(int i = 0;i < sizeofarrays; i++){
    System.out.print(citys[i] + " ");
    System.out.println(" ");
    //test if theres a mobile integer left to redo it and flip the flag if there is
    for(int i = 0;i < sizeofarrays; i++){
    if(pointers[i] == true && i !=citys[sizeofarrays] && citys[i+1] < citys[i] ){
    runagain = true;
    if(pointers[i] ==false && i != citys[0] && citys[i-1] < citys[i] ){
    runagain = true;
    //recurviely call the algorithm again
    if(runagain == true){
    findamobileset ( citys, pointers, sizeofarrays);
    else
    {/terminate}

    1) There is no pass-by-reference in Java. At best, you have a reference that's passed.by-value (a copy of this reference, pointing to the same object).
    2) I won't read all of your code
    3) Which is unformatted anyway
    4) so I don't know what the error is. Maybe you care to tell me?

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

  • How to get the values of an Array using JSP Tags

    Hey guys,
    I need some help. I've splited a String using
    fn:split(String, delim) where String = "1,2,3,4" and delim is ,
    This method returns an Array of splited Strings. how do i get the values from this array using jsp tags. I don't wanna put java code to achive that.
    Any help would be highly appreciated
    Thanks

    The JSTL forEach tag.
    In fact if all you want to do is iterate over the comma separated list, the forEach tag supports that without having to use the split function.
    <c:set var="list" value="1,2,3,4"/>
    <c:forEach var="num" items="${list}">
      <c:out value="${num}"/>
    </c:forEach>The c:forTokens method will let you do this with delimiters other than a comma, but the forEach tag works well just with the comma-delimited string.

  • How to use the pps function from JCOP?

    Hi
    I'm trying to use the pps function from JCTerminal (JCOP API: [url http://www.cs.ru.nl/~woj/jcopapi/com/ibm/jc/JCTerminal.html#pps(int, int)]pps function ) to connect my client to a virtual card with a specific protocol (T=0).
    But I always got the error: "Protocol and parameter selection not supported by this terminal!"
    I've tried to make an ATR that support both protocol : [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]3B 90 95 80 81 1F C7 DC.
    I really don't know what value to put in the second parameter (baud rate), I've tried with 150000, which is in the range of the ATR but I'm not sure this is correct. And I could't find any example of it.
    I'm also not sure where to put the pps command, the specification say directly after a reset, so I tried this implementation:
    System.out.print("Start");
              readers = TerminalFactory.getDefault().terminals().list(State.CARD_PRESENT);
              //If no readers has a card it ends the process
              if(readers.isEmpty()){
                   System.out.println("\nNo card in the reader...");
                   return;
              System.out.println("\nReader Type: "+readers.get(0).toString());
              term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
              term.open();
              System.out.println("\nTerminal opened");
              //Getting the ATR
              atr = new ATR(term.waitForCard(2000));
              try {
                   term.pps(JCTerminal.PROTOCOL_T0, (int)150000);
              } catch (Exception e) {
                   e.printStackTrace();
              System.out.println("ATR: "+toHex(atr.getBytes()));
              //sending a data 11223344
              System.out.println("\nsending data: 11223344");
              byte[] responsesend = term.send(0,cmdsend,0,cmdsend.length);
              System.out.println("Response data is:" + toHex(responsesend));
              //close terminal
              term.close();
              System.out.println("\nTerminal closed");I've got this output on the console:
    <font size="2">StartReader Type: PC/SC terminal Virtual CAD Reader 0
    Terminal opened
    ATR: 3b 90 95 90 00 81 1f c7 cc
    sending data: 11223344
    <font color="red">Protocol and parameter selection not supported by this terminal!</font>
         at com.ibm.jc.JCTerminal.pps(Unknown Source)
         at com.test.essai.main(essai.java:46)
    </font>>
    And If I take a look at the data exchanged with the card:
    <font size="2">Running in Virtual Card mode...
    ATR: 3B909580811FC7DC
    Waiting for event (power: off, protocol: unknown/undefined)...
    Waiting for event (power: off, protocol: unknown/undefined)...
    Raw event data: 01
    Event: VCAD_EC_POWER_ON (0x01)
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_ON) ATR: 3b909580811fc7dc
    Raw reply data: 003b909580811fc7dc
    Sending reply...
    Waiting for event (power: on, protocol: unknown/undefined)...
    Waiting for event (power: on, protocol: unknown/undefined)...
    Raw event data: 06ff11957b
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: ff11957b
    Accepting any PPS request parameters: Protocol: t=1; FI=9, DI=5
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: ff11957b
    Raw reply data: 00ff11957b
    Sending reply...
    </font>>
    This (above) is the PPS command but not from the PPS function, it is always sent with protocol T=1
    <font size="2">Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0501
    Event: VCAD_EC_SET_PROTOCOL (0x05) Protocol: t=1
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_SET_PROTOCOL)
    Raw reply data: 00
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0600c10120e0
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00c10120e0
    Handling protocol-specific command...
    Protocol block:
    NAD: 0x00
    PCB: 0xc1 (T1_S_BLOCK); S-Block type: T1_SBT_IFS_REQ
    LEN: 1
    INF:
    IFS: 20
    EDC: 0xe0
    Changing IFS(other) from 32 to 32
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00e10120c0
    Raw reply data: 0000e10120c0
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0600001300a404000d54657374436c69656e7441707000f0
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00001300a404000d54657374436c69656e74
    41707000f0
    Processing app. command...
    App. block:
    NAD: 0x00
    PCB: 0x00 (T1_I_BLOCK); Seq. #: 0; More data: 0
    LEN: 13
    INF:
    00a404000d54657374436c69656e7441707000
    EDC: 0xf0
    cmd name: N/A (class #4)
    cmd: 00a40400 0d 54657374436c69656e74417070 70
    Responding with the reversed command data, SW is hardcoded to 90<INS>
    rsp: 707041746e65696c4374736554 90a4
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00000f70704
    1746e65696c437473655490a475
    Raw reply data: 0000000f707041746e65696c437473655490a475
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 060040041122334400
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 0040041122334400
    Processing app. command...
    App. block:
    NAD: 0x00
    PCB: 0x40 (T1_I_BLOCK); Seq. #: 1; More data: 0
    LEN: 4
    INF:
    11223344
    EDC: 0x00
    cmd name: N/A (class #1)
    cmd: 11223344
    Responding with the reversed command data, SW is hardcoded to 90<INS>
    rsp: 9022
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 0040029022f
    0
    Raw reply data: 000040029022f0
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 03
    Event: VCAD_EC_POWER_OFF (0x03)
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_OFF)
    Raw reply data: 00
    Sending reply...
    Waiting for event (power: off, protocol: unknown/undefined)...
    </font>>
    If someone know how to use this function or have any advice to help me to select a specific protocol with Jcop API, please let me know.
    If you you need any more information don't hesitate to ask.
    Best regards
    Edited by: Cyril on Sep 22, 2011 9:54 AM

    -1
    I'm using a virtual terminal (windows driver), and I don't see how I could turn off the Auto-pps. I've also tried with a real reader and a card and I have the same error.
    -2
    I've tried value in the range of the atr (based on this analysis: [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc ). But I don't know if only I value of baud-rate is possible in the range. Anyway I just would like to change the protocol, not the baud-rate.
    -3
    I've already tried to call pps function before, after the first reset, or with another reset later and I always got the same thing.
              term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
              term.open();
              System.out.println("\nTerminal opened");
              //Getting the ATR
              atr = new ATR(term.waitForCard(2000));
              System.out.println("ATR: "+toHex(atr.getBytes()));
              jcard = new JCard(term,atr,0);
              jcard.reset();          
              try {
                   term.pps(JCTerminal.PROTOCOL_T0, (int)312500);
              } catch (Exception e) {
                   e.printStackTrace();
              }The same pps is always send after each reset...

  • How to make use of SE37- Function Module & how to find out the table?

    Hi ,
    1.Could anyone help me what's this SE37-Function module is all about,How to make use of this?
    For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM.
    But after giving the particular name what should i do?
    Please help me.
    2.How to find out the respective table for a particular field sya for T code-COGI, T code MFBF,where its values are getting populated.,Please help in this issue.
    Thanks in adavnce for spending some time
    Raj.S

    Hi Raj
    Function Modules
    Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
    The Function Builder  also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
    Check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    You can execute function module in SE37ie you can perform the activiites defined in the function module by executing it.
    By deleting BOM you mention the FM name in se37 and execute. In some function module it will ask input parameters as developed in the program , you have to give the input parameters and execute.

  • Error using the test console of the Oracle Service Bus 11gR1

    Hi I am facing a an issue while using the test console of the Oracle Service Bus 11gR1 .
    Every time I try to execute a business service or a proxy service I end up getting the following message.
    Error Accessing Test Configuration
    *"Test Console" service is not running. Contact administrator to start this service.*
    In fact to add to my frustration I am unable to execute any of my proxy services from outside clients like SOAPUI as well.
    Is anyone else facing this too ??
    Also every time the server starts I can see some diagnostic error messages on my Eclipse console.
    *[ERROR] AdapterManager - ServletContainerAdapter manager not initialized correctly.*
    Attached the whole log at the end below.
    To provide an update on my trouble shooting
    1. ) I tried to give the IntegrationAdmin and IntegrationDeployer roles to my admin user. in fact i also tried to give it all the possible privileges.
    Result: Still the same error message.
    Error Accessing Test Configuration
    "Test Console" service is not running. Contact administrator to start this service.
    2.) I have already tried to change the following entry <java:alsb-test-console-debug>true</java:alsb-test-console-debug> in my C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\alsbdebug.xml
    I am also attaching the file contents here
    <java:sb-debug-logger xmlns:java="java:com.bea.wli.debug">
    <java:alsb-stages-transform-runtime-debug>false</java:alsb-stages-transform-runtime-debug>
    <java:alsb-alert-manager-debug>false</java:alsb-alert-manager-debug>
    <java:alsb-credential-debug>false</java:alsb-credential-debug>
    <java:alsb-jms-reporting-provider-debug>false</java:alsb-jms-reporting-provider-debug>
    <java:alsb-management-credential-debug>false</java:alsb-management-credential-debug>
    <java:alsb-management-dashboard-debug>false</java:alsb-management-dashboard-debug>
    <java:alsb-management-debug>false</java:alsb-management-debug>
    <java:alsb-management-user-mgt-debug>false</java:alsb-management-user-mgt-debug>
    <java:alsb-module-debug>false</java:alsb-module-debug>
    <java:alsb-monitoring-aggregator-debug>false</java:alsb-monitoring-aggregator-debug>
    <java:alsb-monitoring-debug>false</java:alsb-monitoring-debug>
    <java:alsb-pipeline-debug>false</java:alsb-pipeline-debug>
    <java:alsb-security-wss-debug>false</java:alsb-security-wss-debug>
    <java:alsb-service-account-manager-debug>false</java:alsb-service-account-manager-debug>
    <java:alsb-service-provider-manager-debug>false</java:alsb-service-provider-manager-debug>
    <java:alsb-service-repository-debug>false</java:alsb-service-repository-debug>
    <java:alsb-service-security-manager-debug>false</java:alsb-service-security-manager-debug>
    <java:alsb-service-validation-debug>false</java:alsb-service-validation-debug>
    <java:alsb-test-console-debug>true</java:alsb-test-console-debug>
    <java:alsb-transports-debug>false</java:alsb-transports-debug>
    <java:alsb-uddi-debug>false</java:alsb-uddi-debug>
    <java:alsb-wsdl-repository-debug>false</java:alsb-wsdl-repository-debug>
    <java:alsb-wspolicy-repository-debug>false</java:alsb-wspolicy-repository-debug>
    <java:alsb-security-encryption-debug>false</java:alsb-security-encryption-debug>
    <java:alsb-security-module-debug>false</java:alsb-security-module-debug>
    <java:alsb-sources-debug>false</java:alsb-sources-debug>
    <java:alsb-custom-resource-debug>false</java:alsb-custom-resource-debug>
    <java:alsb-mqconnection-debug>false</java:alsb-mqconnection-debug>
    <java:alsb-throttling-debug>false</java:alsb-throttling-debug>
    <java:alsb-flow-resource-debug>false</java:alsb-flow-resource-debug>
    <java:alsb-flow-transport-debug>false</java:alsb-flow-transport-debug>
    <java:alsb-flow-deployment-debug>false</java:alsb-flow-deployment-debug>
    <java:alsb-debugger-debug>false</java:alsb-debugger-debug>
    <java:alsb-console-debug>false</java:alsb-console-debug>
    <java:alsb-result-caching-debug>false</java:alsb-result-caching-debug>
    <java:alsb-bpel-debug>false</java:alsb-bpel-debug>
    <java:alsb-jca-framework-adapter-debug>false</java:alsb-jca-framework-adapter-debug>
    </java:sb-debug-logger>
    starting weblogic with Java version:
    java version "1.6.0_18"
    Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
    Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode)
    Starting WLS with line:
    C:\Oracle\MIDDLE~1\home11g\JDK160~1\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\Oracle\MIDDLE~1\home11g\WLSERV~1.3\server\lib\weblogic.policy -Xverify:none -da -Dplatform.home=C:\Oracle\MIDDLE~1\home11g\WLSERV~1.3 -Dwls.home=C:\Oracle\MIDDLE~1\home11g\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\MIDDLE~1\home11g\WLSERV~1.3\server -Ddomain.home=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1 -Dcommon.components.home=C:\Oracle\MIDDLE~1\home11g\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=C:\Oracle\MIDDLE~1\home11g\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1\config\FMWCON~1 -Doracle.server.config.dir=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1\config\FMWCON~1\servers\AdminServer -Doracle.security.jps.config=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Oracle\MIDDLE~1\home11g\USER_P~1\domains\OSB_DO~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=C:\Oracle\MIDDLE~1\home11g\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\Oracle\MIDDLE~1\home11g\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\home11g\patch_wls1033\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\home11g\patch_oepe1033\profiles\default\sysext_manifest_classpath;C:\Oracle\MIDDLE~1\home11g\patch_ocp353\profiles\default\sysext_manifest_classpath weblogic.Server
    <30-Jun-2010 16:22:43 o'clock BST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 16.0-b13 from Sun Microsystems Inc.>
    <30-Jun-2010 16:22:47 o'clock BST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 >
    <30-Jun-2010 16:22:48 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <30-Jun-2010 16:22:48 o'clock BST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <30-Jun-2010 16:22:49 o'clock BST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <30-Jun-2010 16:22:49 o'clock BST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\AdminServer.log00005. Log messages will continue to be logged in C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\AdminServer.log.>
    <30-Jun-2010 16:22:49 o'clock BST> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <30-Jun-2010 16:22:56 o'clock BST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <30-Jun-2010 16:22:58 o'clock BST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\access.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <30-Jun-2010 16:22:58 o'clock BST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\access.log00005. Log messages will continue to be logged in C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\access.log.>
    <30-Jun-2010 16:23:06 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <30-Jun-2010 16:23:06 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <30-Jun-2010 16:23:59 o'clock BST> <Warning> <JDBC> <BEA-001110> <No test table set up for pool "wlsbjmsrpDataSource". Connections will not be tested.>
    <30-Jun-2010 16:23:59 o'clock BST> <Warning> <JDBC> <BEA-001552> <The Logging Last Resource (LLR) data source wlsbjmsrpDataSource will not function when it is a participant in a global transaction that spans multiple WebLogic Server instances because remote JDBC support is disabled. LLR will function in single-server configurations.>
    <30-Jun-2010 16:25:35 o'clock BST> <Alert> <OSB Security> <BEA-387068> <There is no PKI credential mapper provider configured in your security realm. Service key provider management will be disabled. Configure a PKI credential mapper provider if you need service provider support. This is typically the case if you have Oracle Service Bus proxy services with web service security enabled or outbound 2-way SSL connections.>
    <30-Jun-2010 16:25:40 o'clock BST> <Warning> <WliSbTransports> <BEA-381917> <MQ Transport could not be registered due to : Missing MQ Library>
    [ERROR] AdapterManager - ServletContainerAdapter manager not initialized correctly.
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\OSB_domain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\OSB_domain.log00005. Log messages will continue to be logged in C:\Oracle\Middleware\home11g\user_projects\domains\OSB_domain\servers\AdminServer\logs\OSB_domain.log.>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.128.2.170:7001 for protocols iiop, t3, ldap, snmp, http.>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "OSB_domain" running in Development Mode>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <30-Jun-2010 16:26:11 o'clock BST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    This is really putting me off and its really disappointing to see all these issues in this new release.
    How can oracle let a release slip in with such a Major Issue.
    Please can any one help or provide a work around atleast.
    Regards
    Nitin

    I guess till version 10gr3.1 you only needed to start one server and it allowed to access both admin and service bus console.Yes, in 11g as well you may access the admin and OSB console by just starting the admin server but in 11g OSB configuration gets deployed on OSB server (managed server) and test service also runs over this server.
    Are you saying there is some other server I need to start just for running the test console ????Yes. Managed server osb_server1 needs to be started for deploying, testing and accessing OSB resources.
    As If the OSB server was not running how can I check my published services, modify them and do all the bits and pieces after opening the open the service bus console but not just test them???You can modify and save your configuration without staring OSB server but if you will check in change centre then all the changes being done without starting OSB server will remain in partially activated state.
    I have been using the service bus for 3 years and I have never faced any such issue.With each new release you may get new features and with a major release like 11g, architecture and functionality may change.
    If it all there is some other server I need to start then whats the process to do so ??Open command prompt. Navigate to $Domain_Home/bin and run command
    startManagedWeblogic.cmd <nameOfManagedServer>
    for eg. -
    D:\OFMW11g\mw\user_projects\domains\ofmw_domain\bin>startManagedWebLogic.cmd osb_server1
    Once this server is up and running, try using test console.
    Regards,
    Anuj

  • Using User Defined Function is SQL

    Hi
    I did the following test to see how expensive it is to use user defined functions in SQL queries, and found that it is really expensive.
    Calling SQRT in SQL costs less than calling a dummy function that just returns
    the parameter value; this has to do with context switchings, but how can we have
    a decent performance compared to Oracle provided functions?
    Any comments are welcome, specially regarding the performance of UDF in sql
    and for solutions.
    create or replace function f(i in number) return number is
    begin
      return i;
    end;
    declare
      l_start   number;
      l_elapsed number;
      n number;
    begin
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(rownum)
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('first: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(sqrt(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('second: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(f(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('third: '||l_elapsed);
    end;
    Results:
       first: 303
       second: 1051
       third: 1515
    Kind regards
    Taoufik

    I find that inline SQL is bad for performance but
    good to simplify SQL. I keep thinking that it should
    be possible somehow to use a function to improve
    performance but have never seen that happen.inline SQL is only bad for performance if the database design (table structure, indexes etc.) is poor or the way the SQL is written is poor.
    Context switching between SQL and PL/SQL for a User defined function is definitely a way to slow down performance.
    Obviously built-in Oracle functions are going to be quicker than User-defined functions because they are written into the SQL and PL/SQL engines and are optimized for the internals of those engines.
    There are a few things you can do to improve function
    performance, shaving microseconds off execution time.
    Consider using the NOCOPY hints for your parameters
    to use pointers instead of copying values. NOCOPY
    is a hint rather than a directive so it may or may
    not work. Optimize any SQL in the called function.
    Don't do anything in loops that does not have to be
    done inside a loop.Well, yes, but it's even better to keep all processing in SQL where possible and only resort to PL/SQL when absolutely necessary.
    The on-line documentation has suggested that using a
    DETERMINISTIC function can improve performance but I
    have not been able to demonstrate this and there are
    notes in Metalink suggesting that this does not
    happen. My experience is that DETERMINISTIC
    functions always get executed. There's supposed to
    be a feature in 11g that acually caches function
    return values.Deterministic functions will work well if used in conjunction with a function based index. That can improve access times when querying data on the function results.
    You can use DBMS_PROFILER to get run-time statistics
    for each line of your function as it is executed to
    help tune it.Or code it as SQL. ;)

  • How to use  Advance java function in graphical mapping in XI 2.0?

    Hi,
    currently I am using a simple java function to make an RFC call to R3 system.
    I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.
    please suggest a solution.
    I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.
    thaks in advance.

    Hi!!!
    I'm not sure if I understood you well.
    Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?
    In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.
    If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.
    Regards,
    Andrzej Filusz

Maybe you are looking for