Unit testing or integration testing?

Here it says that this example is more of an explanation of framework than best practice because of the conflation of integration/unit testing concepts: http://docs.flexunit.org/index.php?title=Using_Asynchronous_Startup
My question is, how do you define a line here between unit testing and integration testing? What kind of UI components asynchronous tests are then considered to be unit tests and not yet integration tests? Many books recommend having 100% code coverage with unit tests. How would this example look like, to be considered only a unit test and not integration test?

The question about which levels of testing to do are really dependent upon you. Let me explain a bit more.
If you are building an application, and only an application, then functional testing probably covers most of your needs. In an application environment, you have a relatively narrow pathway of options and interactions that a user might follow. So long as you test those options well, your app will probably work as well.
Where I see the real value of unit testing is testing for the unknowns. If you have a class that will be used in multiple applications in multiple ways, or perhaps it is intended to be a reusable class where others in your organization will use it in the future, then you want lower level testing. You want to have the best coverage you can because you want to know that, regardless of the way someone chooses to use the code, it will likely function or at least fail gracefully.
The same is true for integration. If I am creating a Flex component, then I can unit test part of it, but not all. So, I want to use integration tests to ensure that it works in as many circumstance as possible. Further, Flex components have a life cycle, so testing them when they are not on the display list isn't really a valid test..
So, to summarize, I see unit and integration w/Flex about testing possibilities and trying to achieve realistic code coverage for known and possible use cases. I see functional testing as testing those components in very specific use cases.
Which do you need? Depends. Are you developing reusable components across (n) projects, likely the first 2 and maybe the last. Are you an application developer testing that an application works in documented business cases? Just functional will likely work.
Hope that helps,
Mike

Similar Messages

  • Unit Testing / Integration Testing

    Hi all
    Can somebody provide links to SAP testing....
    Can anybody define & write down the step by step details on carrying out unit testing, integration testing and user acceptance testing...How it is done..which systems..tools..test scripts / test cases etc

    hi,
    For all kinds of testing the first thing is to enumerate the scenarions i.e preparing a list of scenarions that need to be tsted. this wud include the test data and also the desired results. templates are provided by the consultants to the end users. thse templates have a description of the scenarios, the data used, the transacion codes,  the docs generated and if the desired results were obtained. thse need to be certified by the concerned.
    integration and unit tsting can be done on the same or different clients depanding on system landscape. user accptance testing is generally after the interfration tests have been satisfactorily conducted. different knds of users are asked to do the tests once their id roles and profiles are created. this phase shud be handled as if live production envirionment.
    saurabh

  • Unit testing and integration testing

    hello 2 all,
                    what is the diff bet unit and integration testing? in sap what is unit teesting consists of and integration testing consists of what?
    is this the work  of test engineers r whose work is this?
    take care
    love ur parents

    Hi Sameer,
    Unit Testing
    A unit test is a procedure used to validate that a particular module of source code is working properly from each modification to the next. The procedure is to write test cases for all functions and methods so that whenever a change causes a regression, it can be quickly identified and fixed. Ideally, each test case is
    separate from the others; constructs such as mock objects can assist in separating unit tests. This type of testing is mostly done by the developers and not by end-users.
    Integration testing
    Integration testing can proceed in a number of different ways, which can be broadly characterized as top down or bottom up. In top down integration testing the high level control routines are tested first, possibly with the middle level control structures present only as stubs. Subprogram stubs were presented in Section 2 as incomplete subprograms which are only present to allow the higher level control routines to be tested. Thus a menu driven program may have the major menu options initially only present as stubs, which merely announce that they have been successfully called, in order to allow the high level menu driver to be tested.
    Top down testing can proceed in a depth-first or a breadth-first manner. For depth-first integration each module is tested in increasing detail, replacing more and more levels of detail with actual code rather than stubs. Alternatively breadth-first would proceed by refining all the modules at the same level of control
    throughout the application. In practice a combination of the two techniques would be used. At the initial stages all the modules might be only partly functional, possibly being implemented only to deal with non-erroneous data. These would be tested in breadth-first manner, but over a period of time each would be
    replaced with successive refinements which were closer to the full functionality. This allows depth-first testing of a module to be performed simultaneously with breadth-first testing of all the modules.The other major category of integration testing is bottom up integration testing where an individual module is
    tested from a test harness. Once a set of individual modules have been tested they are then combined into a collection of modules, known as builds, which are then tested by a second test harness. This process can continue until the build consists of the entire application.
    In practice a combination of top-down and bottom-up testing would be used. In a large software project being developed by a number of sub-teams, or a smaller project where different modules were being built by individuals. The sub-teams or individuals would conduct bottom-up testing of the modules which they were
    constructing before releasing them to an integration team which would assemble them together for top-down testing.
    I think this will help.
    Thanks ,
    Saptarshi

  • Unit testing and system integration testing for crystal report

    Hi gurus,
           I am creating crystal report by oracle procedure, will you please tell me how to do unit testing and system integration testing? appreciate very much.

    The focus of this forum is report design. The actual testing of reports would be subject to your own internal policies and procedures.
    Jason

  • Unit Testing and Integrating testing In HR

    Dear Sap Gurus,
    Would you be kind enough to  give me an example of unit testing and integrating testing??  what do you test, eg..TC and what else.. what happened.??. And also an example of Integrating testing  ..and an example ....I know what unit and integrating test is ..and with a good example, i will have a great idea about it ...thanks a lot.

    Hi Pooja
    Unit Testing:
    A process for verifying that software, a system, or a system component performs its intended functions.
    Unit transactions are tested against their own specifications and design documents.
    Integration Testing
    An orderly progression of testing in which software elements, hardware elements or both are combined and tested until the entire system has been integrated.
    Integration tests deal mainly with the testing of cross-application process chains in addition to transactions and business processes. The process models and the test cases derived from these form the basis of these tests.
    Regards
    Vijay

  • Unit testing, integration and functional testing

    Hello all,
    I would like to know the difference between Unit testing, integration and functional testing. And also what are the testing tools that are more commonly used?
    Thanks,
    Maxx

    Hi,
        Unit testing :
                    A complete cycle of each  module will be tested
                    ie for PP Right from requirements to planned orders /production orders
                    confirmation .
        Integration testing:
                    Here cross module testing will be carried out.
                     ie PP and MM integration
                        After confirming production order a GR is made /billing is carried out
                        and delivered.
          Functional testing:
                    This testing is carried out to see whether the system can with stand l the loads during processing by users.
                    Stress test and volume test.
                Regards,
                nandha

  • Difference between unit testing and integration testing

    What is the difference between unit testing and integration testing in SAP? Is unit testing takes place in Dev client and integration testing takes place in QA system?
    Please clarify
    thanks

    Hello Krishen,
    unit testing means veryfiingsmall / the smallet pieces of software, while integration testing checks the overall functionality of applications. Within the AS ABAP the tool ECATT + manual tests is used for integration tests and the ABAP Unit language integration for unit testing.
    When, Who, Where tests are carried out is ultimately a personal decision. As unit tests are operate even under heavy development they are often the first choice for developers, but the unit tests can also serve for regression tests over a long period. Integration tests tend too be created and executed in later stages as they require often a certain majurity of the software under test.
    Beside the mentioned links you may check out ABAP Unit infos also in the Wiki.
    https://wiki.sdn.sap.com/wiki/display/HOME/ABAP+Unit
    Best Regards
      Klaus

  • [svn:osmf:] 10581: Integration VAST unit tests into mediaframework unit tests

    Revision: 10581
    Author:   [email protected]
    Date:     2009-09-24 17:09:59 -0700 (Thu, 24 Sep 2009)
    Log Message:
    Integration VAST unit tests into mediaframework unit tests
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/.actionScriptProperties
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/VASTTestConstants.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/TestVASTLoade r.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestDefaultVAS TMediaFileResolver.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTImpres sionProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTMediaG enerator.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTTracki ngProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/TestVASTParse r.as

  • Unit Tests / Integration tests

    Hi Experts,
    I am planning to enchance the existing extract structure in R/3 by including new fields.
    After that, I need to enhance my structures and existing infoproviders in BW.
    I have just finished the blue printing phase.
    I would like to know what are the unit tests / test scenarios / test plans / test cases that I need to consider? Is there a list of standard unit tests?
    Also, what about integration tests?

    hi,
    Unit testing is the one in which the developer himself test the code.
    In Unit testing the developer will test whether all the statements will execute based on different conditions.
    There should not be any dead code after Unit test.
    Dead Code means, for any given combination the control will not go to the statement.
    you can go thru the following links
    http://en.wikipedia.org/wiki/SAP_Implementation
    http://hosteddocs.ittoolbox.com/CM021805.pdf
    Look at the below link
    http://softwarefinder.mbtmag.com/search/for/Techrepublic-Cost-of-SAP-Implementation.html
    refer to the following links.
    http://blogs.ittoolbox.com/eai/implementation/archives/gui-windows-types-unit-test-template-12961
    Integration testing is usually where the func team run processes end to end. If security is involved then generally you are validating that the roles contain required transactions, there aren't any gaps where roles can't support the processes. You may want to test org levels and +ve and -ve test controls here but it really depends on your implementation. Most security testing is usually done in UAT but you would preferably have func team using real end user roles in IT, though generally not in the first passes where they validate their config
    Ramesh

  • Unit Testing

    Hi All,
    I would like to inform to all, can any one explain to me the concept of Unit testing in FICO and how it should be drawn? If possible send any dcoumentation for this focus to my mail id: [email protected]
    Thanks with regards,
    Bala

    Hi
    refer below reward if helps
    Unit testing is done in bit and pieces. Like e.g. in SD standard order cycle; we do have 1-create order, then 2-delivery, then 3-transfer order, then 4-PGI and then 5-Invoice.  So we will be testing 1,2,3,4 and 5 seperately alone one by one using test cases and test data. We will not be looking and checking/testing any integration between order and delivery; delivery and TO; TO and PGI and then invoice.
    Whrereas System testing you will be testing the full cycle with it's integration, and you will be testing using test cases which give a full cyclic test from order to invoice.
    Security testing you will be testing different roles and functionalities and will check and signoff.
    Performance testing is refered to as how much time / second will take to perform some actions, like e.g. PGI.  If BPP defination says 5 seconds for PGI then it should be 5 and not 6 second.  Usually it is done using software.
    Regression testing is reffered to a test which verfies that some new configuration doesnot adversly impact existing functionality.  This will be done on each phase of testing.
    User Acceptance Testing:  Refers to Customer testing. The UAT will be performed through the execution of predefined business scenarios, which combine various business processes. The user test model is comprised of a sub-set of system integration test cases.
    We use different software during testing. Most commonly use are
    Test Director:  which is used to record requirement, preparing test plan and then recording the progress.  We will be incorporating defects that are coming during these testings using different test cases.
    Mercury Load Runner:  is used for performance testing.  This is an automatic tool.
    What does the following terms means :
    - Technical Unit Testing
    - Functional Unit Testing
    - IntegrationTesting
    - Volume Testing
    - Parallel Testing?
    Technical Unit Testing= Test of some technical development such as a user exit, custom program, or interface. the test usually consists of a test data set that is processed according to the new program.  A successful test only proves the developed code works and that it performed the process as as designed.
    Functional Unit Testing= Test of configuration, system settings or a custom development (it may follow the technical unit testing) These usually use actual data or data that is masked but essentially the same as a real data set. A successful test shows that the development or configuration works as designed and the data is accurate as a result.
    IntegrationTesting= Testing a process, development or configuration within the context of any other functions that the process, development or functionality will touch or integrate . The test should examine all data involved across all modules and any data indirectly affected. A successful test indicates that the processes work as designed and integrate with other functions without causing any problems in any integrated areas.
    Volume Testing= testing a full data set that is either actual or masked to insure that the entire volume does cause system problems such as network transmission problems, system resources issues, or any systemic problem, A successful test indicates that the processes will not slow or crash the system due to a full data set being utilized.
    Parallel Testing= Testing the new system or processes with a complete data set while running the same processes in the legacy system. A successful test will show identical results when both the legacy system and new system results are compared.
    I would also note that when a new implementation is being done you will want to conduct at least one cut over test from the old system to the new and you should probably do several.
    What kind of testings that are carried out in testing server?
    1. Individual Testing ( Individually which we've created)
    2. Regressive Testing ( Entire Process)
    3. Integration Testing ( Along with other integrated modules)
    The 3 types of testing is as follows:-
    1. Unit testing (where an individual process relevant to a SD or MM etc is tested)
    2. Integration testing (where a process is tested that cuts across all areas of SAP).
    3. Stress testing (where lots of transactions are run to see if the system can handle the data)
    http://www50.sap.com/businessmaps/6D1236712F84462F941FDE131A66126C.htm
    Unit test issues
    The unit tools test all SAP development work that handles business object processing for the connector. Also, the unit test tools enable you to test the interaction of your work with the ABAP components of the connector. The test tools allow you to test your development work as an online user (real-time) only.
    Note:
    It is important to understand the differences between testing the connector as an online user and testing the connector as if operating as a background user.
    The differences between testing the connector as an online user or as a background user are described as follows:
    Memory--When testing a business object, the connector must log into the SAP application.
          The connector runs as a background user, so it processes in a single memory space that is never implicitly refreshed until the connector is stopped and then restarted (therefore it is critical in business object development to clear memory after processing is complete). Since you are an online user, memory is typically refreshed after each transaction you execute.
          For more information, see Developing business objects for the ABAP Extension Module. Any problems that may occur because of this (for example, return codes never being initialized) are not detected using the test tool; only testing with the connector will reveal these issues.
    Screen flow behavior--Screen flow behavior is relevant only when using the Call Transaction API. The precise screen and sequence of screens that a user interacts with is usually determined at runtime by the transaction's code. For example, if a user chooses to extend a material master record to include a sales view by checking the Sales view check box, SAP queries the user for the specific Sales Organization information by presenting an additional input field. In this way, the transaction source code at runtime determines the specific screen and its requirements based on the data input by the user. While the test tool does handle this type of test scenario, there is a related scenario that the test tool cannot handle.
          SAP's transaction code may present different screens to online users versus background users (usually for usability versus performance). The test tool only operates as an online user. The connector only operates as a background user. Despite this difference, unit testing should get through most of the testing situations.

  • Unit Testing  approach

    Hi,
    We had done technical migration of value based roles to derived roles, and facing problem to design the unit testing approach for the same. can you please suggest what must unit testing approach and how to create test cases for authorizations specificaly to derived roles created from value based roles ?
    goal is after testing, end users should not feel any changes done in roles approach.
    Thanks.
    Regards,
    Swapnil
    <removed_by_moderator>
    Edited by: Julius Bussche on Oct 7, 2008 3:40 PM

    Hi Swapnil,
    The Testing of Security roles need to be taken in a two step approach
    Step 1 Unit Testing in DEV
    A. Prepare the test cases for each of the derived roles and ensure that your main focus is to see if you are able to execute all the tcodes that have been derived from the parent role with out authorization errors. You also need to verify if each of the derived roles are applicable to those respective Org level Values.
    B. Because there will not enough data in DEV ( except In some cases where you have a refresh of fresh PROD data) it is always advisable to do the actual testing of the roles in QA. The goal here is to see if you are able to perform a dry run of all tcodes/Reports/Programs that belong to the roles.
    C. You may create fewer Unit test ids as you only assign one ID with one role and once the role is tested you can assign the same ID to another role.
    Step 2 Integration Testing in QA
    A. Prepare the Integration Test cases for each of the Derived roles. Here most likely the testing will be performed by the  end users/Business Analysts in that respective Business Process. Each test case must reflect the possible Org level Authorization Objects and Values that need to be tested.
    B. As Integration testing is simulation of actual Production authorizations scenario, care must be taken when creating mulitple Integration test user ids and assigning them right roles and send the ids to the end users to perform the testing in QA.
    C. The objective here is that end user must feel comfortable with the test cases and perform both Positive and Negative testing. Testing results must be caputured and documented for any further analysis.
    D. In an event of any authorization errors from Integration testing, the authorization errors will be sent to the Security team along with SU53 screenshots. The roles will be corrected in DEV and transported back to QA and the testing continues.
    E. Also the main objective of Integration testing would be to check if the transactions are reflecting the right amount of data when executed and any mismatch in the data will be direct implication that the Derived roles do not contain the right Org level values.
    Hope this helps you to understand how testing of Security roles (Derived) is done at a high level.
    Regards,
    Kiran Kandepalli.
    Edited by: Kiran Kandepalli on Oct 7, 2008 5:47 AM

  • Unit testing in J2EE environment

    Hi All:
    We have been trying to use Junit for creating unit test scripts, and have been bit successful in unit testing DAOs and Value objects - but problem is testing of components like EJBs and Servlets or even classes like Actions or Commands. Since these components run under application server environment, I am not sure how to unit test them without either deploying them on the actual server or simulating app server and rest of the system.
    I was wondering if people could share their experience in writing unit test scripts especially for J2EE components - like Servlets, JSPs and EJBs. On the similar note, is there any similar tool or API for creating integration test scripts?
    Thanks,

    Well - we already have couple of other servers but that's for beta, QA and Integration testing. Problem is with the unit testing. In unit testing, some piece of code is tested by itself. And I am not sure how I can unit test some of the classes like Servlets, EJBs, JSPs or even dependent classes like Commands or Actions. For example, consider following Action class from Java Pet Store:
    public final class CartHTMLAction extends HTMLActionSupport {
    public Event perform(HttpServletRequest request)
    throws HTMLActionException {
    // Extract attributes we will need
    String actionType= (String)request.getParameter("action");
    HttpSession session = request.getSession();
    // get the shopping cart helper
    CartEvent event = null;
    if (actionType == null) return null;
    if (actionType.equals("purchase")) {
    String itemId = request.getParameter("itemId");
    event = new CartEvent(CartEvent.ADD_ITEM, itemId);
    else if (actionType.equals("remove")) {
    String itemId = request.getParameter("itemId");
    event = new CartEvent(CartEvent.DELETE_ITEM, itemId);
    else if (actionType.equals("update")) {
    Map quantities = new HashMap();
    Map parameters = request.getParameterMap();
    for (Iterator it = parameters.keySet().iterator();
    it.hasNext(); ) {
    String name = (String) it.next();
    String value = ((String[]) parameters.get(name))[0];
    final String ITEM_QTY = "itemQuantity_";
    if (name.startsWith(ITEM_QTY)) {
    String itemID = name.substring(ITEM_QTY.length());
    Integer quantity = null;
    try {
    quantity = new Integer(value);
    catch (NumberFormatException nfe) {
    quantity = new Integer(0);
    quantities.put(itemID, quantity);
    event = CartEvent.createUpdateItemEvent(quantities);
    return event;
    In order to unit test above class from say, JUnit test script class, I will have to pass HttpServletRequest object to its method - I will also have to store corresponding command params and store them in the request object - how will you write unit test script for the above class?

  • Problem creating unit testing repository (and workaround)

    I tried to create the unit testing repository with a user that had all the required system privileges granted through a different role other than RESOURCE and CONNECT roles, and who wasn't explicitely granted CREATE VIEW, but inherited it through the custom role. However the check in SQL Developer is explicitely for the RESOURCE and CONNECT roles (regardless of what privileges they have granted to them in whichever database version past, present or future) and for CREATE VIEW privilege granted direct to the user:
    SELECT DECODE (roles.required_role_count + privs.required_priv_count,
                   3, 1,
                   0)
              AS basic_privs_granted
      FROM (SELECT COUNT (*) AS required_role_count
              FROM user_role_privs
             WHERE granted_role IN ('CONNECT', 'RESOURCE')) roles,
           (SELECT COUNT (*) AS required_priv_count
              FROM USER_SYS_PRIVS
             WHERE privilege IN ('CREATE VIEW')) privsI found this SQL contained within the sqldeveloper/extensions/oracle.sqldeveloper.unit_test.jar in an XML file: oracle/dbtools/unit_test/manage_user/UserSql.xml and replaced the SQL with one that actually checks for the specific system privileges:
    SELECT DECODE (required_sys_priv_count,
                   10, 1,
                   0)
              AS basic_privs_granted
      FROM
           (SELECT COUNT(*) AS required_sys_priv_count FROM
             (SELECT privilege
                FROM role_sys_privs
               WHERE privilege IN ('CREATE CLUSTER','CREATE INDEXTYPE','CREATE OPERATOR','CREATE PROCEDURE','CREATE SEQUENCE','CREATE SESSION','CREATE TABLE','CREATE TRIGGER','CREATE TYPE','CREATE VIEW')
              UNION
              SELECT privilege
                FROM user_sys_privs
               WHERE privilege IN ('CREATE CLUSTER','CREATE INDEXTYPE','CREATE OPERATOR','CREATE PROCEDURE','CREATE SEQUENCE','CREATE SESSION','CREATE TABLE','CREATE TRIGGER','CREATE TYPE','CREATE VIEW')))This enabled me to bypass that check when creating the respository. I don't know if all these privileges are actually required by the unit testing repository or not, so maybe the above list can be reduced...
    Edited by: RDB on Mar 1, 2013 2:24 PM

    Hi Sai Vineeth,
    First of all, I appreciate your elaborate way of framing the question. That itself helps others to comment.
    On the first two questions, I am sure you'll be able to follow the answers provided and take care of your concerns.
    On your question 3), an additional piece of information that should bring smile to you
    Whether the Test is to happen in DEV or QAS or whatever 'System Role' is dependent on the Test Plan.
    So, if you have two distinct Test Plans, one for Unit Tests and the other for Integration Tests, which should be the case, as usual, you can certainly point the System Role to DEV or QAS as required.
    Feel free to pose any other query as well.
    Best regards,
    Srini

  • Unit Testing in DAC

    Hi,
    I am facing a problem in unit testing in DAC. I am able to run full loads and incremental but i am unable to do unit testing in DAC. It shows an error that my Integration Services are not up when i run an individual task . Are there any setups for unit testing in DAC. I had followed http://docs.oracle.com/cd/E15586_01/fusionapps.1111/e14849/dacquickstart.htm#BABCIIIH topic : To unit test an execution plan task. If any one would help me in running a unit test that would be a great help.
    Thanks,
    Ram

    I'm struggling with the idea of testing View/Controller classes which depend on "container things" like bindings. Since there are many ways to interact with the 'container things' I guess it depends on exactly how you're using those bindings in your View/Controller classes. I've had success using Mockito along with my own fixture classes that do things like set up a mock ADFContext and RequestContext. Within my test setUp and tearDown, I set up and tear down these fixture classes, which results in a safe, mocked-out environment in which the test can execute. It's often tricky because many of the these objects are static and singleton-like, but so far I've always found a back door by which to inject a mock object. We also have our own utility classes that look-up 'container things', so we of course make sure we have a way to provide mock 'container things' through those utility classes.
    If you haven't come across the concept of 'mock objects' before, then it may be best to do a bit of background reading first:
    [http://www.mockobjects.com/2009/09/brief-history-of-mock-objects.html]
    [http://en.wikipedia.org/wiki/Mock_object]
    There are many mocking libraries about (EasyMock, jMock, rMock) but IMO Mockito is the one to choose right now.
    Of course, the alternative is to apply some [Inversion of Control|http://martinfowler.com/articles/injection.html] and make sure that the code you right is always ignorant of exactly where the 'container things' have come from. This makes mocking much easier, but I've not yet investigated use of a D.I. container (e.g. Spring) along with ADF - I suspect your options in 10g would be limited.

  • Unit test fails after upgrading to Kodo 4.0.0 from 4.0.0-EA4

    I have a group of 6 unit tests failing after upgrading to the new Kodo
    4.0.0 (with BEA) from Kodo-4.0.0-EA4 (with Solarmetric). I'm getting
    exceptions like the one at the bottom of this email. It seems to be an
    interaction with the PostgreSQL driver, though I can't be sure. I
    haven't changed my JDO configuration or the related classes in months
    since I've been focusing on using the objects that have already been
    defined. The .jdo, .jdoquery, and .java code are below the exception,
    just in case there's something wrong in there. Does anyone have advice
    as to how I might debug this?
    Thanks,
    Mark
    Testsuite: edu.ucsc.whisper.test.integration.UserManagerQueryIntegrationTest
    Tests run: 15, Failures: 0, Errors: 6, Time elapsed: 23.308 sec
    Testcase:
    testGetAllUsersWithFirstName(edu.ucsc.whisper.test.integration.UserManagerQueryIntegrationTest):
    Caused an ERROR
    The column index is out of range: 2, number of columns: 1.
    <2|false|4.0.0> kodo.jdo.DataStoreException: The column index is out of
    range: 2, number of columns: 1.
    at
    kodo.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4092)
    at kodo.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:82)
    at kodo.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:66)
    at kodo.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:46)
    at
    kodo.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:176)
    at
    kodo.kernel.QueryImpl$PackingResultObjectProvider.handleCheckedException(QueryImpl.java:2460)
    at
    com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:32)
    at kodo.kernel.QueryImpl.toResult(QueryImpl.java:1445)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:1136)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:901)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:865)
    at kodo.kernel.DelegatingQuery.execute(DelegatingQuery.java:787)
    at kodo.jdo.QueryImpl.executeWithArray(QueryImpl.java:210)
    at kodo.jdo.QueryImpl.execute(QueryImpl.java:137)
    at
    edu.ucsc.whisper.core.dao.JdoUserDao.findAllUsersWithFirstName(JdoUserDao.java:232)
    at
    edu.ucsc.whisper.core.manager.DefaultUserManager.getAllUsersWithFirstName(DefaultUserManager.java:252)
    NestedThrowablesStackTrace:
    org.postgresql.util.PSQLException: The column index is out of range: 2,
    number of columns: 1.
    at
    org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:57)
    at
    org.postgresql.core.v3.SimpleParameterList.setLiteralParameter(SimpleParameterList.java:101)
    at
    org.postgresql.jdbc2.AbstractJdbc2Statement.bindLiteral(AbstractJdbc2Statement.java:2085)
    at
    org.postgresql.jdbc2.AbstractJdbc2Statement.setInt(AbstractJdbc2Statement.java:1133)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at
    com.solarmetric.jdbc.PoolConnection$PoolPreparedStatement.setInt(PoolConnection.java:440)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at
    com.solarmetric.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.setInt(LoggingConnectionDecorator.java:1
    257)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at
    com.solarmetric.jdbc.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:390)
    at kodo.jdbc.sql.DBDictionary.setInt(DBDictionary.java:980)
    at kodo.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1299)
    at kodo.jdbc.sql.SQLBuffer.setParameters(SQLBuffer.java:638)
    at kodo.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:539)
    at kodo.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:512)
    at kodo.jdbc.sql.SelectImpl.execute(SelectImpl.java:332)
    at kodo.jdbc.sql.SelectImpl.execute(SelectImpl.java:301)
    at kodo.jdbc.sql.Union$UnionSelect.execute(Union.java:642)
    at kodo.jdbc.sql.Union.execute(Union.java:326)
    at kodo.jdbc.sql.Union.execute(Union.java:313)
    at
    kodo.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:98)
    at
    kodo.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2405)
    at
    com.solarmetric.rop.EagerResultList.<init>(EagerResultList.java:22)
    at kodo.kernel.QueryImpl.toResult(QueryImpl.java:1445)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:1136)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:901)
    at kodo.kernel.QueryImpl.execute(QueryImpl.java:865)
    at kodo.kernel.DelegatingQuery.execute(DelegatingQuery.java:787)
    at kodo.jdo.QueryImpl.executeWithArray(QueryImpl.java:210)
    at kodo.jdo.QueryImpl.execute(QueryImpl.java:137)
    at
    edu.ucsc.whisper.core.dao.JdoUserDao.findAllUsersWithFirstName(JdoUserDao.java:232)
    --- DefaultUser.java -------------------------------------------------
    public class DefaultUser
    implements User
    /** The account username. */
    private String username;
    /** The account password. */
    private String password;
    /** A flag indicating whether or not the account is enabled. */
    private boolean enabled;
    /** The authorities granted to this account. */
    private Set<Authority> authorities;
    /** Information about the user, including their name and text that
    describes them. */
    private UserInfo userInfo;
    /** The set of organizations where this user works. */
    private Set<Organization> organizations;
    --- DefaultUser.jdo --------------------------------------------------
    <?xml version="1.0"?>
    <!DOCTYPE jdo PUBLIC
    "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
    "http://java.sun.com/dtd/jdo_2_0.dtd">
    <jdo>
    <package name="edu.ucsc.whisper.core">
    <sequence name="user_id_seq"
    factory-class="native(Sequence=user_id_seq)"/>
    <class name="DefaultUser" detachable="true"
    table="whisper_user" identity-type="datastore">
    <datastore-identity sequence="user_id_seq" column="userId"/>
    <field name="username">
    <column name="username" length="80" jdbc-type="VARCHAR" />
    </field>
    <field name="password">
    <column name="password" length="40" jdbc-type="CHAR" />
    </field>
    <field name="enabled">
    <column name="enabled" />
    </field>
    <field name="userInfo" persistence-modifier="persistent"
    default-fetch-group="true" dependent="true">
    <extension vendor-name="jpox"
    key="implementation-classes"
    value="edu.ucsc.whisper.core.DefaultUserInfo" />
    <extension vendor-name="kodo"
    key="type"
    value="edu.ucsc.whisper.core.DefaultUserInfo" />
    </field>
    <field name="authorities" persistence-modifier="persistent"
    table="user_authorities"
    default-fetch-group="true">
    <collection
    element-type="edu.ucsc.whisper.core.DefaultAuthority" />
    <join column="userId" delete-action="cascade"/>
    <element column="authorityId" delete-action="cascade"/>
    </field>
    <field name="organizations" persistence-modifier="persistent"
    table="user_organizations" mapped-by="user"
    default-fetch-group="true" dependent="true">
    <collection
    element-type="edu.ucsc.whisper.core.DefaultOrganization"
    dependent-element="true"/>
    <join column="userId"/>
    <!--<element column="organizationId"/>-->
    </field>
    </class>
    </package>
    </jdo>
    --- DefaultUser.jdoquery ---------------------------------------------
    <?xml version="1.0"?>
    <!DOCTYPE jdo PUBLIC
    "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
    "http://java.sun.com/dtd/jdo_2_0.dtd">
    <jdo>
    <package name="edu.ucsc.whisper.core">
    <class name="DefaultUser">
    <query name="UserByUsername"
    language="javax.jdo.query.JDOQL"><![CDATA[
    SELECT UNIQUE FROM edu.ucsc.whisper.core.DefaultUser
    WHERE username==searchName
    PARAMETERS java.lang.String searchName
    ]]></query>
    <query name="DisabledUsers"
    language="javax.jdo.query.JDOQL"><![CDATA[
    SELECT FROM edu.ucsc.whisper.core.DefaultUser WHERE
    enabled==false
    ]]></query>
    <query name="EnabledUsers"
    language="javax.jdo.query.JDOQL"><![CDATA[
    SELECT FROM edu.ucsc.whisper.core.DefaultUser WHERE
    enabled==true
    ]]></query>
    <query name="CountUsers"
    language="javax.jdo.query.JDOQL"><![CDATA[
    SELECT count( this ) FROM edu.ucsc.whisper.core.DefaultUser
    ]]></query>
    </class>
    </package>
    </jdo>

    I'm sorry, I have no idea. I suggest sending a test case that
    reproduces the problem to support.

Maybe you are looking for

  • Forcing Reader 9 to be the default (GPO Deployment)?

    I have a company environment with several hundred PCs running XP and Vista with some Windows 7. Most to all will have some form of Acrobat Reader installed, most likely 7 or 8 with some of the newer machines having 9. Some will have full Acrobat Stan

  • Problem on the safari

    i didnt find the "ct" plugin in both steps you give it to me before!!?????

  • AS/400 - point SQL to specific member

    When creating a result set via SQL in a java application, what is the best way to point to specific table member? I don't want to issue an OVRDBF unless I have to.

  • CS5 Master Collection Fails to Initialize

    Hi,      I am trying to install CS5 Master Collection trial on Mac OSX 10.6.3 but it fails as soon as I double click "Installer.app". I message box pops up saying "Installer failed to initialize. Please download Adobe Support Advisor to detect the pr

  • 5520 CSC "CSC SSM gui services stopped"

                       I have a customer with a ASA5520 with a CSC module. Unable to log into the CSC gui directly or via the Link within the ASDM. We removed the card and installed it into his spare ASA and show the same issue. We put the spare card in