1 2 Previous Next 18 Replies Latest reply: Jan 3, 2008 11:09 AM by Cdelahun-Oracle Go to original post RSS
      • 15. Re: Hung Threads (Toplink 10.1.3)
        506594
        Could anyone tell me how can i download the patch number 5442078.It's urgent.
        • 16. Re: Hung Threads (Toplink 10.1.3)
          Cdelahun-Oracle
          Hello,

          5442078 is a one off patch for 10.1.3.0 which I believe you need a support contract to access through Metalink. The fix is also in the latest TopLink patchset (10.1.3.3) which can also be downloaded from http://www.oracle.com/technology/software/products/ias/htdocs/1013topsoft.html

          Best Regards,
          Chris
          • 17. Re: Hung Threads (Toplink 10.1.3)
            506594
            Thanks for your prompt response.
            I want to clarify my problem in more details.
            The problem raise when a uow throw an SQL exception (ORA-01722) the you request the uow another time the system will hang when it reaches uow.executeQuery(r).
            below is the code snapshopt:


            ScrollableCursor cursor =null;
            //UnitOfWork uow = session.acquireUnitOfWork();
            UnitOfWork uow =null;
            UnitOfWork uow2 =null;
            try {
            ReadAllQuery query = searchResult.getDatabaseQuery();

            uow =
            getMainSession().acquireUnitOfWork();

            query.useScrollableCursor();
            cursor = (ScrollableCursor)uow.executeQuery(query);
            int i = 0;
            int offset = searchResult.getOffset();
            int length = searchResult.getStepSize();
            if (offset > 0) {
            cursor.first();
            cursor.relative(offset - 1);
            }
            List returnedData = new ArrayList();
            if (cursor !=null) {



            while ( cursor.hasNext() && i < length) {
            // System.out.println("Get Next *****");
            returnedData.add(cursor.next());
            i++;
            }
            //cursor.last();
            }


            int totalSize =
            10000; //cursor.getPosition();//cursor.getSelectionCriteriaClone();
            //cursor.getSelectionCriteriaClone().count();
            if( query.getSelectionCriteria()!=null){

            if (cursor!=null) {
            cursor.close();
            }
            relesae(uow);
            ReportQuery r = new ReportQuery();
            r.setReferenceClass(query.getReferenceClass());

            if(searchResult.getCountedcolumn()!=null){
            r.addCount("COUNT",searchResult.getCountedcolumn());
            }else{
            r.addCount();
            }
            // r.addCount();
            r.setSelectionCriteria(query.getSelectionCriteria());
            //r.getp

            uow2 =
            getMainSession().acquireUnitOfWork();
            Vector obj = (Vector)uow2.executeQuery(r);
            relesae(uow2);
            // System.out.println(obj.get(0).getClass());
            ReportQueryResult rs=null;
            if (obj!=null) {
            rs = (ReportQueryResult)obj.get(0);



            // ReportQueryResult rs = (ReportQueryResult)obj.get(0);

            totalSize =
            (rs.get("COUNT")==null)?0:Integer.parseInt(rs.get("COUNT").toString()); //;obj.get(0);//cursor.size();
            }
            //System.out.println("Orioginal Toal Size: "+totalSize);
            totalSize = totalSize < 0 ? 0 : totalSize>10000?10000:totalSize;

            }else{
            cursor.last();
            totalSize=cursor.getPosition();
            cursor.close();
            relesae(uow);
            }



            searchResult.setTotalSize(totalSize);


            searchResult.setListOfReturnedData(returnedData);
            } catch (Exception ex) {
            ex.printStackTrace();
            try {
            if ( cursor!=null && !cursor.isClosed() ) {
            cursor.close();

            }

            } catch (Exception ex2) {
            ex2.printStackTrace();
            } finally {
            }

            try {

            relesae(uow);
            relesae(uow2);
            } catch (Exception exe) {

            } finally {
            }


            } finally {
            }
            • 18. Re: Hung Threads (Toplink 10.1.3)
              Cdelahun-Oracle
              Hello,

              Not sure about all the code posted - where does the ORA-01722 exception get thrown from? And what do things get stuck on in the thread dump? Also, what settings are you using that might affect the problem (connection pools etc).

              I don't think this issue is related to the rest of the thread, so if using the latest TopLink version does not help, I'd advise opening a support case and/or a new thread for it.

              Best Regards,
              Chris
              1 2 Previous Next