Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8186060

Object reference mismatch for STRUCT objects

XMLWordPrintable

    • x86
    • linux_oracle_6.0

      FULL PRODUCT VERSION :
      java version "1.7.0_60"
      Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
      Java HotSpot(TM) Server VM (build 24.60-b09, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      SunOS NNKPT1 5.11 11.2 i86pc i386 i86pc

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Garbage collection details are /usr/jdk/instances/jdk1.7.0/bin/java -Xmx128M -Dcom.sun.management.jmxremote -D

      A DESCRIPTION OF THE PROBLEM :
      I am working on an enterprise web application, which is used by many users. In this , I connect to oracle db to get a STRUCT object consists of two fields. In execution, one user or more users are getting other user STRUCT object details.
      Example If user A, B, C are accessing DB. Acutally A should get "a" STRUCT object. B should get "b" object. And C should get "c" object. But all A, B and C are getting "a" STRUCT object only.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Configure your JVM to have 128 MB heap space.
      2) Create a simple web application, which should get a STRUCT object from Oracle Database.
      3) Access that application with 100 number of users at a time to get STRUCT object.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      As mentioned in the description example, while accessing DB, A should bet "a" STRUCT object, B should get "b" object and C should get "c" object, where application is accessed by 100+ users.
      ACTUAL -
      As mentioned in the description example, while accessing DB, A , B, C are getting same object "a", which is not correct object for B and C, where application is accessed by 100+ users.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      There are no error logs for this.

      REPRODUCIBILITY :
      This bug can be reproduced occasionally.

      ---------- BEGIN SOURCE ----------
      call_GETSERVICE_Statement = connection.prepareCall(
                          "{call " + GETSERVICE_PROCEDURE_FOR_USER + "(?,?,?)}");
                  call_GETSERVICE_Statement.setString(1, so_ServiceId);
                  call_GETSERVICE_Statement.registerOutParameter(2,
                                                                 OracleTypes.STRUCT,
                                                                 DB_OBJECT_SERVICE);
                  call_GETSERVICE_Statement.registerOutParameter(3,
                                                                 OracleTypes.STRUCT,
                                                                 DB_OBJECT_CALLSTATUS);

                  call_GETSERVICE_Statement.execute();

                  STRUCT callstatusSTRUCT = (STRUCT) call_GETSERVICE_Statement.getObject(
                          GETSERVICE_OBJ_CALLSTATUS);
                  Object[] callstatusAttribs = callstatusSTRUCT.getAttributes();



      //callstatusAttribs are different for different users.But getting same STRUCT object for all users.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I am manually updating user details in application, which is too hectic.

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: