Accessing Object using mutliple threads

I created a class that creates 2 threads and both thread calls a method ( not synch..). In the method i create a new object.
Here is the code for it.
class ggh{
    public void m1(){
        ss s1= new ss();      // Simple class having 2 fields(int and string) and their getter setters
        System.out.println("S1 for thread #" + Thread.currentThread().getName() + "  ==> " + s1.toString()  );
        if(Thread.currentThread().getName().equals("Thread-0"))  // thread #1
            try {
                Thread.sleep(1000);      // -------------> 1
            s1.setA(2);                           // --------------> 2
            System.out.println("Settin s1 = null " + Thread.currentThread().getName());
                s1 = null;                         //  ---------------> 3
            } catch (InterruptedException ex) {
                ex.printStackTrace();
        System.out.println("s1 a==>" + s1.getA() + "::" + Thread.currentThread().getName() + " :: " + s1.toString());         //----------------> 4
    public static void main(String[] args) {
        final ggh g1 = new ggh();
        Thread t1 = new Thread(){
            public void run(){
                g1.m1();
        Thread t2 = new Thread(){
           public void run(){
                    g1.m1();
        t1.start();
        t2.start();
}when i execute this code, my output is totally unpredictable. Here are some of the outputs i got.
************** 1 The code creates the same object for both threads
S1 for thread #Thread-0 ==> vom.cdd.ss@defa1a
S1 for thread #Thread-1 ==> vom.cdd.ss@defa1a
s1 a==>1::Thread-1 :: vom.cdd.ss@defa1a
Settin s1 = null Thread-0
java.lang.NullPointerException
     at vom.cdd.ggh.m1(ggh.java:39)
     at vom.cdd.ggh$1.run(ggh.java:46)
************** 2 objects are different now.
S1 for thread #Thread-0 ==> vom.cdd.ss@f5da06
S1 for thread #Thread-1 ==> vom.cdd.ss@defa1a
s1 a==>1::Thread-1 :: vom.cdd.ss@defa1a
Settin s1 = null Thread-0
java.lang.NullPointerException
     at vom.cdd.ggh.m1(ggh.java:39)
     at vom.cdd.ggh$1.run(ggh.java:46)
************* 3 [Here nullpointer exception occurs before the null message is printed[/b]
S1 for thread #Thread-0 ==> vom.cdd.ss@defa1a
S1 for thread #Thread-1 ==> vom.cdd.ss@defa1a
s1 a==>1::Thread-1 :: vom.cdd.ss@defa1a
java.lang.NullPointerException
     at vom.cdd.ggh.m1(ggh.java:39)
     at vom.cdd.ggh$1.run(ggh.java:46)
Settin s1 = null Thread-0
So my question here is :
when such kind of unsynch. access occurs for some method. then does there exists a different object [b]( a new memory is allocated ) for each thread
or does there exist only one object and each thread has a different reference to it, and the thread can manipulate its properties.
Or does there exist a different explanation for this kind of behaviour??
One more thing, i dont wnat the method/a block of code to be synchronized.
I also have another doubt but willl post it after this one get's cleared.
Thanks in advance.
Regards
Akshat Jain

2 objects are different nowThey are not different at all. Address can differ at
each invocation.What do u mean that they are not different at all.
if they have different object's then obviously their address are different and henc the objects too.
am i getting this wrong??

Similar Messages

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

  • Problem in accessing object using Expression Language

    Hello All,
    Im using Tomcat 5.5 and I am learning Expression language.Im using one servlet page as login.java i.e,
    package common;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import Database.DatabaseObject;
    import valueobjects.login1;
    public class login extends HttpServlet {
         public static final long serialVersionUID = 8707690322213556804l;
         public void doPost(HttpServletRequest req, HttpServletResponse res) {
              String name = req.getParameter("username");
              String password = req.getParameter("password");
              RequestDispatcher dispatch = null;
              ResultSet rs=null;
              Statement st=null;
              login1 log=null;
              Connection con = null;
              String sql=null;
              try
              con=new DatabaseObject().getConnection();
              st = con.createStatement();
              sql="select * from login";
              System.out.println(sql);
              rs=st.executeQuery(sql);
              while(rs.next())
                   log=new login1(rs.getString("User_Name"),rs.getString("user_Password"));
              req.setAttribute("login",log);
              req.setAttribute("username",name);
              req.setAttribute("password",password);
              dispatch = req.getRequestDispatcher("/jsps/el.jsp");
              dispatch.forward(req, res);
              catch(Exception e)
                   e.printStackTrace();
    That login1 customized object is set as ,
    package valueobjects;
    public class login1{
         String Name;
         String Password;
         public login1(String name, String password) {
              super();
              // TODO Auto-generated constructor stub
              Name = name;
              Password = password;
         public String getName() {
              return Name;
         public void setName(String name) {
              this.Name = name;
         public String getPassword() {
              return Password;
         public void setPassword(String password) {
              this.Password = password;
    then im using one jsp as el.jsp that is,
    <%@ page isELIgnored="false"%>
    <%@ page import = "java.util.*,valueobject.*"%>
    <html>
    <jsp:useBean id="login" class="valueobjects.login1">
    <jsp:setProperty name="login" property="name" value="username"/>
    <jsp:setProperty name="login" property="password" value="password"/>
    </jsp:useBean>
    <body>
         <center>
         username=${login.Name}<br><br>
         </center>
    </body>
    </html>
    but when i execute this code it is giving error as
    /jsps/el.jsp(4,0) The value for the useBean class attribute valueobjects.login1 is invalid.
    But that login1.java is in correct package that is valueobjects.but im not getting why it is giving such error.Plz help me.

    hi
    to use java bean u MUST follow the two conviosions:
    1. the class u want to make a bean from it must have no-argument constructor
    2. u must provide setter and getter for every instance variable , the name of instance varible must begin with small letter and its setter and getter must be like setXxx() and getXxx()
    the correct bean is :
    package valueobjects;
         public class login1{
         String name;
         String password;
         public String getName()
                   return name;
         public void setName(String name)
                   this.name = name;
         public String getPassword()
                    return password;
         public void setPassword(String password)
                    this.password = password;
         }where is my duke's $ ???

  • The Accessibility Object for AS2 is returning a false positive for AS2 with IE10 on Windows 8 Pro.

    There is an issue with the our legacy content player, which is written in Flash Actionscript 1 & 2.  This
    player behaves fine in most browsers on most platforms, but in IE10 on Windows 8 it doesn't work
    properly.
    Internet Explorer 110
    Version:  10.0.9200.16688
    Update Version:  10.0.9 (KB2870699)
    Windows 8 Pro
    This seems to because of the Flash engine's Accessibility object using the Microsoft Active
    Accessibility (MSAA) API to detect the presence of Screen Readers.  This detection is creating a false
    positive on Windows 8 machines and that may be due to the touch screen support on that platform.  This
    doesn't appear to be occuring with Chrome or Firefox on the same platform; however.  So I suspect that
    IE or IE's Flash compenent is doing something different than these other browsers.

    This is legacy code and is too close to its end-of-life to justify porting to AS3.  As far as a work-around I am already looking into it. I was hoping that someone had already encountered this issue and created a work-around.  This would have saved time.
    Any other takers?

  • How do I access objects from the original Thread?

    I have this simple JApplet that just makes a circle bounce around the screen. Here it is:
    import java.awt.Color;
    import javax.swing.JApplet;
    import java.awt.Graphics;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    public class TestApplet3 extends JApplet implements MouseListener {
        private int lastX;          // x coordinate of circle
        private int lastY;          // y coordinate of circle
        private int d = 15;          // diameter of circle
        public void paint(Graphics g) {
        public void init() {
            addMouseListener(this);
        public void mouseClicked(MouseEvent event) {
            Graphics gx = this.getGraphics();
            for (int x = 0, y = 0, count = 0, horiz = 2, vert = 2, k = 2; count < 1000; x = x + horiz, y = y + vert, count++) {
                if ((x + d) >= 350) {
                    horiz = -horiz;
                if ((x <= 0) && (horiz < 0)) {
                    horiz = -horiz;
                if ((y + d) >= 200) {
                    vert = -vert;
                if ((y <= 0) && (vert < 0)) {
                    vert = -vert;
                gx.setColor(Color.WHITE);
                gx.fillOval(lastX, lastY, d, d);
                gx.setColor(Color.RED);
                lastX = x;
                lastY = y;
                gx.fillOval(lastX, lastY, d, d);
                try {
                    Thread.sleep(20);
                } catch (Exception ex) {
                    System.out.println(ex.getMessage());
        public void mouseEntered(MouseEvent event) {
        public void mouseExited(MouseEvent event) {
        public void mousePressed(MouseEvent event) {
        public void mouseReleased(MouseEvent event) {
    }But now I'd like to change it so that when the mouse is clicked a new Thread is spawned to run the code within the mouseClicked method..... this will allow multiple circles to bounce around and will also keep the applet responsive to new mouse clicks... so I've tried changing it below:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package runninggraph;
    * @author epuknol
    import java.awt.Color;
    import javax.swing.JApplet;
    import java.awt.Graphics;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    public class TestApplet3 extends JApplet implements MouseListener, Runnable {
        private int lastX;          // x coordinate of circle
        private int lastY;          // y coordinate of circle
        private int d = 15;          // diameter of circle
        public void paint(Graphics g) {
        public void init() {
            addMouseListener(this);
        public void run() {
            Graphics gx = this.getGraphics();
            for (int x = 0, y = 0, count = 0, horiz = 2, vert = 2, k = 2; count < 1000; x = x + horiz, y = y + vert, count++) {
                if ((x + d) >= 350) {
                    horiz = -horiz;
                if ((x <= 0) && (horiz < 0)) {
                    horiz = -horiz;
                if ((y + d) >= 200) {
                    vert = -vert;
                if ((y <= 0) && (vert < 0)) {
                    vert = -vert;
                gx.setColor(Color.WHITE);
                gx.fillOval(lastX, lastY, d, d);
                gx.setColor(Color.RED);
                lastX = x;
                lastY = y;
                gx.fillOval(lastX, lastY, d, d);
                try {
                    Thread.sleep(20);
                } catch (Exception ex) {
                    System.out.println(ex.getMessage());
        public void mouseClicked(MouseEvent event) {
            (new Thread(new TestApplet())).start();       
        public void mouseEntered(MouseEvent event) {
        public void mouseExited(MouseEvent event) {
        public void mousePressed(MouseEvent event) {
        public void mouseReleased(MouseEvent event) {
    }but this doesn't work - I think because the this.getGraphics() doesn't refer back to the same object ..... I've tried some other things too - like defining the Graphics gx as a class variable and initializing it before spawning the new Thread ... but I can't access gx using that technique either.
    Can somebody please help me get where I'm trying to go?
    Thanks.

    Aw heck, got bored. For instance, this draws a bunch of balls without a direct call to Thread anything:
    BouncingCircles.java
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Point;
    import java.awt.RenderingHints;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    * creates a JPanel that draws bouncing circles within it. 
    * @author Pete
    public class BouncingCircles {
      private static final int DELAY = 15;
      private static final int DIAMETER = 15;
      private static final int DELTA = 5;
      List<Ball> ballList = new ArrayList<Ball>(); // list of all balls
      private JPanel mainPanel = new JPanel() {
        @Override
        protected void paintComponent(Graphics g) {
          super.paintComponent(g);
          myPaint(g);
      // Swing Timer that tells the balls to move and tells the JPanel to then draw them
      private Timer sTimer = new Timer(DELAY, new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          timerAction(e);
      public BouncingCircles() {
        mainPanel.setPreferredSize(new Dimension(400, 400));
        mainPanel.addMouseListener(new MouseAdapter() {
          @Override
          // add new ball with each mouse press
          public void mousePressed(MouseEvent e) {
            ballList.add(new Ball(e.getPoint(), new Point(DELTA, DELTA)));
        sTimer.start();
      public JPanel getPanel() {
        return mainPanel;
      private void timerAction(ActionEvent e) {
        Dimension d = mainPanel.getSize();
        for (Ball ball : ballList) {
          if (ball.getPoint().x < 0) {
            ball.setXDirectionRight(true);
          } else if (ball.getPoint().x + DIAMETER > d.width) {
            ball.setXDirectionRight(false);
          if (ball.getPoint().y < 0) {
            ball.setYDirectionDown(true);
          } else if (ball.getPoint().y + DIAMETER > d.height) {
            ball.setYDirectionDown(false);
          ball.increment();
        mainPanel.repaint();
       * paintComponent method draws all balls in List
       * @param g
      private void myPaint(Graphics g) {
        g.setColor(Color.red);
        Graphics2D g2d = (Graphics2D) g;
        RenderingHints rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
        g2d.setRenderingHints(rh);
        for (Ball ball : ballList) {
          g.fillOval(ball.getPoint().x, ball.getPoint().y, DIAMETER, DIAMETER);
      private class Ball {
        private Point point = new Point();
        private Point velocity = new Point();
        public Ball(Point point, Point velocity) {
          this.point = point;
          this.velocity = velocity;
        public Point getPoint() {
          return point;
        public Point getVelocity() {
          return velocity;
        public void increment() {
          point = new Point(point.x + velocity.x, point.y + velocity.y);
        public void setXDirectionRight(boolean right) {
          int newVelocityX = Math.abs(velocity.x);
          if (!right) {
            newVelocityX = -newVelocityX;
          velocity = new Point(newVelocityX, velocity.y);
        public void setYDirectionDown(boolean down) {
          int newVelocityY = Math.abs(velocity.y);
          if (!down) {
            newVelocityY = -newVelocityY;
          velocity = new Point(velocity.x, newVelocityY);
    }And this displays the JPanel produced above in a standard JApplet.
    BouncingCircApplet.java
    import java.lang.reflect.InvocationTargetException;
    import javax.swing.JApplet;
    import javax.swing.SwingUtilities;
    public class BouncingCircApplet extends JApplet {
      @Override
      public void init() {
        try {
          SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
              getContentPane().add(new BouncingCircles().getPanel());
        } catch (InterruptedException e) {
          e.printStackTrace();
        } catch (InvocationTargetException e) {
          e.printStackTrace();
    }

  • Accessing object of the main class from the thread

    Hi, I'm having problem accessing object of the main class from the thread. I have only one Thread and I'm calling log.append() from the Thread. Object log is defined and inicialized in the main class like this:
    public Text log;  // Text is SWT component
    log = new Text(...);Here is a Thread code:
    ...while((line = br.readLine())!=null) {
         try {
              log.append(line + "\r\n");
         } catch (SWTException swte) {
              ErrorMsg("SWT error: "+swte.getMessage());
    }Error is: org.eclipse.swt.SWTException: Invalid thread access
    When I replace log.append(...) with System.out.println(..) it works just fine, so my question is do the log.append(..) the right way.

    This is NOT a Java problem but a SWT specific issue.
    It is listed on the SWT FAQ page http://www.eclipse.org/swt/faq.php#uithread
    For more help with this you need to ask your question on a SWT specific forum, there is not a thing in these forums. This advice isn't just about SWT by the way but for all specific API exceptions/problems. You should take those questions to the forum or mailing list for that API. This forum is for general problems and exceptions arising from using the "core" Java libraries.

  • Multiple threads access Object

    Hi. I have no experience with thread. I just decided to learn it with writing some application. I have not started to do programing yet. I just trying to identify some main problems which I think I will encounter when I start programming.
    And this is my problem. I have 1 parent thread, 4 child threads and one Static Object. For threads constantly a access Static object just for reading. I think I can make it not syncronized because child threads only read the object. The perant thread does a different job. I needs to access this object and change the string which the child object will read. Now I see a problem here. If I make it not syncronized the child threads will get bad data. I just can't get how I can make object locked only when parent thread is using it. If parent does not use it the child can freely read data from it. Any ideas.

    Thanks for your advice. Now I have read the java thread tutorial and I have some understanding how threads are workin. However I am still facing one problem.
    imagine this. I have one Thread Produce and 5 Threads Consumers.
    The produce and Consumer access GlobalString object.
    The produce puts the string into object and consumer reads it.
    The problem is that in order for wait() and notify() to work both methods of GlobalString(getString.,setString) must be syncronized. What I want to achieve is that only setString in syncronized and then when it is done
    all 5 Consumer Threads can run getString at same time. If I make this method Syncronizable it will work much slower. I just want to make sure that reading of that string is fast. Can this be done or not?
    this is my code
    public class GlobalString {
    static String stream = "this is the steam";
    public GlobalString() {
    public synchronized String get() {
    try {
    System.out.println("waiting");
    wait();
    System.out.println("Stop waitng");
    catch (InterruptedException ex) {
    System.out.println(ex.toString());
    return stream;
    public synchronized void set(String set) {
    stream = set;
    notifyAll();
    public class Consumer extends Thread{
    private GlobalString gs = null;
    public Consumer(GlobalString gsa) {
    gs = gsa;
    public void run() {
    try {
    System.out.println("thread 2");
    gs.get();
    System.out.println("thread 2 end");
    catch (Exception ex) {
    System.out.println(ex.toString());
    public class GlobalString {
    static String stream = "this is the steam";
    public GlobalString() {
    public synchronized String get() {
    try {
    System.out.println("waiting");
    wait();
    System.out.println("Stop waitng");
    catch (InterruptedException ex) {
    System.out.println(ex.toString());
    return stream;
    public synchronized void set(String set) {
    stream = set;
    notifyAll();
    public class Producer extends Thread{
    private GlobalString gs = null;
    public Producer(GlobalString gsa) {
    gs = gsa;
    public void run() {
    try {
    Thread.sleep(3000);
    gs.set("test");
    System.out.println("output");
    } catch(Exception e) {
    System.out.println(e.toString());
    }

  • Object use count is negative when two users access ViewObject at same time

    I need help!
    In my application, if two users execute the same view object at the same time, the users will see a combination of the two record sets: One user will receive their requested result set plus part of the other user's set and the other will receieve only a partial result set.
    Here is what I get in the BC4J log:
    [1397] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [1398] Connected to Oracle JBO Server - Version: 9.0.5.16.0
    [1399] mPCollUsePMgr is false
    [1400] ViewObjectImpl.mDefaultMaxRowsPerNode is 70
    [1401] ViewObjectImpl.mDefaultMaxActiveNodes is 30
    [1402] Default locking mode changed to: optimistic
    [1403] Created root application module: 'net.tetra.w2ms.Manager.model.w2ms_mgr_AppModule'
    [1404] Locale is: 'en_US'
    [1405] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [1406] Creating a new pool resource
    [1407] Trying connection/2: url='jdbc:oracle:thin:@tetusdb01.tetra.net:1521:TETDW' info='{user=tetw2ms, password=wireless2}' ...
    [1408] Successfully logged in
    [1409] JDBCDriverVersion: 9.0.1.5.0
    [1410] DatabaseProductName: Oracle
    [1411] DatabaseProductVersion: Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.3.0 - Production
    [1412] Column count: 39
    [1413] ViewObject: ImBininventoryView close prepared statements...
    [1414] ViewObject: ImBininventoryView Created new QUERY statement
    [1415] SELECT ImBininventory.ITEMNUMBER, ImBininventory.STATUS, ImBininventory.LOCATION, ImBininventory.PALLETNUMBER, ImBininventory.LOTNUMBER, ImBininventory.STATUS1, ImBininventory.ITEM1, ImBininventory.LOCATION1, ImBininventory.PALLET1, ImBininventory.LOT1, ImBininventory.LOCATION2, ImBininventory.ITEM2, ImBininventory.STATUS2, ImBininventory.PALLET2, ImBininventory.LOT2, ImBininventory.PALLET3, ImBininventory.LOT4, ImBininventory.LOCATION5, ImBininventory.STATUS5, ImBininventory.PALLET5, ImBininventory.LOT5, ImBininventory.ITEM5, ImBininventory.ITEM6, ImBininventory.STATUS6, ImBininventory.EXPIRATIONDATE6, ImBininventory.RECEIVEDATE6, ImBininventory.LOCATION6, ImBininventory.PALLET6, ImBininventory.LOT6, ImBininventory.QTYONHANDNEG7, ImBininventory.QTYONHAND, ImBininventory.QTYALLOCATED, ImBininventory.QTYBACKORDERED, ImBininventory.QTYONORDER, ImBininventory.PONUMBER, ImBininventory.FREEZEQTYONHAND, ImBininventory.STOPSHIPDATE, ImBininventory.DATELASTCOUNTED, ImBininventory.FILLER FROM IM_BININVENTORY ImBininventory WHERE (location2 = '#RCV' and qtyonhand > 0)
    [1416] Bind params for ViewObject: ImBininventoryView
    [1417] Column count: 8
    [1418] ViewObject: VReplenishmentView close prepared statements...
    [1419] ViewObject: VReplenishmentView Created new QUERY statement
    [1420] SELECT VReplenishment.ITEMNUMBER, VReplenishment.BIN, VReplenishment.QTYONHAND, VReplenishment.DEMAND, VReplenishment.QTY_TO_PICK, VReplenishment.ENABLED, VReplenishment.UNITSPERPALLET, VReplenishment.PALLETCAPACITY FROM V_REPLENISHMENT VReplenishment WHERE (1=1)
    [1421] Bind params for ViewObject: VReplenishmentView
    [1422] Column count: 8
    [1423] ViewObject: VReplenishmentView Reusing defined prepared Statement
    [1424] Bind params for ViewObject: VReplenishmentView
    [1425] $$added root$$ id=-2
    [1426] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getItemnumber(VReplenishmentViewRowImpl.java:41)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1427] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getBin(VReplenishmentViewRowImpl.java:57)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1428] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getQtyonhand(VReplenishmentViewRowImpl.java:73)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1429] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getBin(VReplenishmentViewRowImpl.java:57)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.validate(ViewRowImpl.java:615)
         at oracle.jbo.server.ViewRowSetIteratorImpl.validateCurrentRow(ViewRowSetIteratorImpl.java:3090)
         at oracle.jbo.server.ViewRowSetIteratorImpl.next(ViewRowSetIteratorImpl.java:1545)
         at oracle.jbo.server.ViewRowSetImpl.next(ViewRowSetImpl.java:2606)
         at oracle.jbo.server.ViewObjectImpl.next(ViewObjectImpl.java:5006)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2140)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1431] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getQtyonhand(VReplenishmentViewRowImpl.java:73)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1432] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getItemnumber(VReplenishmentViewRowImpl.java:41)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1432] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.validate(ViewRowImpl.java:615)
         at oracle.jbo.server.ViewRowSetIteratorImpl.validateCurrentRow(ViewRowSetIteratorImpl.java:3090)
         at oracle.jbo.server.ViewRowSetIteratorImpl.next(ViewRowSetIteratorImpl.java:1545)
         at oracle.jbo.server.ViewRowSetImpl.next(ViewRowSetImpl.java:2606)
         at oracle.jbo.server.ViewObjectImpl.next(ViewObjectImpl.java:5006)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2140)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1434] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getBin(VReplenishmentViewRowImpl.java:57)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1435] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getQtyonhand(VReplenishmentViewRowImpl.java:73)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1436] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getItemnumber(VReplenishmentViewRowImpl.java:41)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1437] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getBin(VReplenishmentViewRowImpl.java:57)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1438] oracle.jbo.common.JboAssert: (Assertion Failed) Object use count is negative on VR of VO VReplenishmentView
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:303)
         at oracle.jbo.common.Diagnostic.ASSERT(Diagnostic.java:326)
         at oracle.jbo.server.ViewRowStorage.releaseUse(ViewRowStorage.java:134)
         at oracle.jbo.server.ViewRowImpl.releaseInner(ViewRowImpl.java:238)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:647)
         at net.tetra.w2ms.Manager.model.VReplenishmentViewRowImpl.getQtyonhand(VReplenishmentViewRowImpl.java:73)
         at net.tetra.w2ms.Wavelink.BCBroker.getReplenishments(BCBroker.java:2169)
         at net.tetra.w2ms.Wavelink.events.tasks_OnLoad.process(tasks_OnLoad.java:39)
         at com.wavelink.edge.events.PostData.ZzW(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.vw(Unknown Source)
         at com.wavelink.edge.events.ApplicationContext.handleEvent(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.yZW(Unknown Source)
         at com.wavelink.studio.server.SessionServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    [1439] Column count: 8
    [1440] ViewObject: VReplenishmentView Reusing defined prepared Statement
    [1441] Bind params for ViewObject: VReplenishmentView
    [1442] $$added root$$ id=-2
    Does anyone have any ideas? This is a very frustrating problem!

    A little more detail...
    Deployment is to iAS 10g (9.0.4)
    App written with jdev 9.0.5.2
    Code where problem occurs:
    public String[] getReplenishments() throws Exception {
    String[] replenishmentLists = new String[2];
    boolean firstTime = true;
    try {
    if (w2msAM == null) {
    w2msAM = Configuration.createRootApplicationModule(amDef, config);
    ViewObject vo = w2msAM.findViewObject("VReplenishmentView");
    vo.setWhereClause("1=1");
    vo.executeQuery();
    logger.debug("VReplenishmentView returned " + vo.getRowCount() +
    " rows");
    StringBuffer rlDisplay = new StringBuffer();
    StringBuffer rlFile = new StringBuffer();
    while (vo.hasNext()) {
    if (!firstTime) {
    rlFile.append("\n");
    rlDisplay.append(",");
    firstTime = false;
    VReplenishmentViewRowImpl row = (VReplenishmentViewRowImpl) vo.next();
    rlFile.append(row.getItemnumber());
    rlDisplay.append(" " +
    (StringHelper.padRight(row.getItemnumber(), 14) +
    StringHelper.padRight(row.getBin(), 11) +
    StringHelper.padLeft(String.valueOf(
    row.getQtyonhand().longValue()).toString(), 4)));
    if (rlFile != null) {
    replenishmentLists[0] = rlFile.toString();
    rlFile = null;
    replenishmentLists[1] = rlDisplay.toString();
    rlDisplay = null;
    } else {
    replenishmentLists[0] = "";
    replenishmentLists[1] = "";
    vo.closeRowSet();
    vo.setWhereClause("1=1");
    return replenishmentLists;
    } catch (Exception e) {
    logger.error("getReplenishments:" + e.toString());
    e.printStackTrace();
    throw e;
    Thanks for any help...
    Dirk.

  • What is the use of an access object in a BOL hierarchy ????

    Hi All,
         I want to know what is the use of an access object in BOL hierarchy .... if we can use a search object to search for entities ... then in what scenario will an access object be used ?
    Regards,
    Ashish

    Hi Dominik,
            Thanks for the repy !!!!
    Now, as you said we can access a (deep) node of the whole model using an access object.
    Let us consider the component set ONEORDER. As seen we can use the following path to reach BTDocFlowAll using search object :-
    BTQuery1O -> BTOrder  -> BTOrderHeader  -> BTHeaderDocFlowSet -> BTDocFlowSet -> BTDocFlowAll ....
    Also, to reach BTDocFlowAll we can even use the access object as follows :-
    BTAdminI -> BTItemDocFlowSet  -> BTDocFlowAll....
    Now my question is :-
    Normally we use the class cl_crm_bol_query_service to fire a search based on a search object. Can we use the same class to fire a search based on access object ?
    (actually I currently dont have a CRM system so I could not try it out myself).
    If not, then how do we fire a query using an access object ?
    Regards,
    Ashish

  • Using one object in multiple threads

    Are there any drawbacks in using one instance of an object in several threads simultaneously, if this object has no instance variables?
    I need to implement DAO in my project and I just wonder why DAOFactory every time creates a new DAO object, when DAO object doesn't have any instance variables?

    Are there any drawbacks in using one instance of an
    object in several threads simultaneously, if this
    object has no instance variables?
    I need to implement DAO in my project and I just
    wonder why DAOFactory every time creates a new DAO
    object, when DAO object doesn't have any instance
    variables?I don't think there are any problems with this. Since you have no instance variables there isn't really any overlap between the two threads.

  • Using multi threading to access 2 RS232 ports

    Hi,
    I'm a beginner in multi threading, so this question may be a very basic one....
    I'm Using TS3.5 + CVI 8.01 to communicate withs 2 RS232 ports.  I thought to use mult threading so I can process 2 steps in parallel rather than in series. 
    This is what I do:
    1) I defined 2 subsequences, each of them call the same CVI function.  I use the sub sequence parameters to transfer the com number.
    2) My CVI application includes one dll for this specific project and another one, a general dll to handle RS232 functions.  The RS232 dll uses one global buffer than collects all the traffic on the com. 
    QUESTIONS:
    1) What happens when 2 seperate threads run the same function in the RS232 dll?  (in terms of memory etc...).  Does each one use a different buffer (in terms of memory allocation), or, both of them writes to the same buffer?   Obviously, if they writes to the same buffer, then, my function will not operate properly.
    2) What happens in TestStand after the 2 steps in new threads have finished their execution?  does the next step run back in the same threads the sequence run before?
    Thanks
    Rafi

    Rafi,
    Glad to hear you were able to make some ground on your application. As for all of your questions, I'll try to answer as many as I can.
    First, when you are talking about your global buffer, is it created in TestStand or in the DLL itself? When you use DLLs, global variables or global structures are shared between all threads that call your DLL. On the other hand, if your buffer is declared inside of the DLL it is global for the DLL but not shared and would be a separate buffer for each call.
    With your run-time error in TS, it would definitely be helpful to have more information about the error. From what you explained (executing fine on the first call, but failing on future executions), it sounds like the resource is not being released after the first execution.
    As far as a specific example for TestStand Multithreading, you'll want to look at the TestStand Development Library and, specifically, Multithreading in TestStand. If you look and browse through the Application Notes and Tutorials section, as well as the Technical Presentations section, you will learn a great deal about multithreading and what options you have in TestStand. For a specific example, you may want to look at This Example. You could also look in the <TestStand>\Examples (where <TestStand> is the directory where TS is installed) at the MultiUUT example for an example of multithreading in TS. These examples may not be exactly what you need, but they should give you a jump start.
    As far as making your DLL multithread safe, it is definitely not necessary; however, there are some significant advantages described in this article: Designing Thread-Safe DLLs. It is an MSDN article that focuses on Visual Basic, but it has some helpful information that can apply to C as well.
    Hopefully this can help you move further. I have attached a list of links at the end of this post with other helpful links for you as well. Keep us posted with your progress.
    Matt Mueller
    NI
    Links:
    General Information on Multithreading for C Programmers
    Building Multithreading Applications with LabWindows/CVI
    Multithreading in LabWindows/CVI
    Easy Multithreading Programming in LabWindows/CVI
    Multithreading for Rookies

  • Best Practice Using Data Access Object Pattern

    I was wondering what would be the best approach with regards to implementing the Data Access Object pattern:
    Given the following database tables:
    teacher {teacher_id, teacher_name, ...}
    subject {subject_id, subject_name, ...}
    teacher_subject {teacher_id, subject_id}where teacher and subject hold details on teachers and subjects respectively and teacher_subject links teachers with the subjects that they currently teach, would I be better off:
    1) implementing three distinct DAO classes i.e. TeacherDAO, SubjectDAO, TeacherSubjectDAO, that correspond to each database table;
    2) implementing a single DAO class that controls access to all three tables, given that business operations often rely on access to all three tables e.g. getSubjectTeachers(Subject s), assignSubjectToTeacher(Subject s, Teacher t), getSubjectsTaughtBy(Teacher t)...
    Thanks
    Ian

    ...would I be better off:Depends on the system.
    If you are always going to have a teacher with subjects then all you need is one class.
    If on the other hand sometimes you are going to have subjects with teachers (given that you have a link table a many to many relationship exists) then two DAOs would exist.
    It would be unlikely for you to have a DAO for the link table unless perhaps you are anticipating a teacher having tens of thousands of subjects or one subject having tens of thousands of teachers.

  • Interpretation of the use of threads with Sessions in the JMS Specification

    Hello,
    I’ve been interacting with two JMS Providers which do a different interpretation of the JMS Specification with the use of different threads for accessing to a session and session’s related objects.
    The question is:
    When a client is consuming messages asynchronously, is it possible to access session’s related objects from a thread different to the one dedicated to the asynchronous consumption, on (thread of control)?
    -     Never?
    -     Yes, but the client should provide explicit synchronization.?
    Our execution scenario is:
    1.- Messages are consumed asynchronously from a dedicated thread.
    2.- From other thread, messages consumed are acknowledged.
    In the JMS specification there is, at least, two parts where this issue is treated:
    1.- The first one (4.4.1 - page 60):
    +“There are no restrictions on the number of threads that can use a Session object or those it creates. The restriction is that the resources of a Session should not be used concurrently by multiple threads. It is up to the user to insure that this concurrency restriction is met. The simplest way to do this is to use one thread. In the case of asynchronous delivery, use one thread for setup in stopped mode and then start asynchronous delivery. In more complex cases the user must provide explicit synchronization.”+
    This extract, makes me think that it is possible the access from different threads, but If I do that, I should provide explicit synchronization.
    2.- The second one (4.4.6 – page 62,63)
    +"Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it. It is erroneous for client code to use this session or any of its constituent objects from another thread of control. The only exception to this is the use of the session or connection close method"?+
    This extract, could be interpreted as that the concurrent access is never allowed in the described situation.

    I think the key words are in 4.4.6 (and also the javadoc for Session): "Once a connection has been started, any session with a registered message listener(s) is dedicated to the thread of control that delivers messages to it".
    My interpretation of this is that you when you register a message listener and call connection.start(), the thread which delivers messages to the listener should be thought of as "using the resources of the session" (as mentioned in 4.4.1) continuously until the connection is stopped (or until the session or connection is closed). it doesn't matter whether the session is executing onMessage() or not.
    Given this, both 4.4.1 and 4.4.6 say the same thing: that once you have registered and started a message listener, the only thing you can do to the session from another thread is to close it.
    I agree the spec could be clearer. In particular the words "In more complex cases the user must provide explicit synchronization" in 4.4.6 should be clarified to state what this actually means rather than give a hint.
    Please note that work has just started on updating the JMS specification, so now is a great time to report areas of the JMS spec which would benefit from clarification. If you'd like this to be considered for clarification, please report it in the official JSR 343 issue tracker at http://jms-spec.java.net
    Nigel

  • Task_group using in threads

    Due to task_group it thread-safe. But this code fails:
    concurrency::task_group tg;
    create_async([this, &tg]()
    tg.run_and_wait([this]()
    for (auto i = 1; i < 1000; i++)
    auto a = 1000000000 / i;
    How can i make safe access to task_group object?

    You need to synchronize access to a variable, e.g. using a mutex
    task_group is thread-safe means that you can add tasks to a task_group object from multiple threads and wait on or cancel a task_group object from multiple threads: https://msdn.microsoft.com/en-us/library/dd492427.aspx
    Best Regards,
    Please remember to mark the replies as answers if they help

  • Problem while accessing object in remote database

    Hi All,
    We have a procedure "UPDATE_CONV_DETAILS" created in the remote databse in the "apps" schema. The synonym for the procedure is created in the billing schema(present in the remote database). A dblink is created the local database through which we are tring to access the remote object "UPDATE_CONV_DETAILS".
    Dblink script:
    create public database link PRE_TO_CEL
    connect to BILLING
    identified by BILLING
    using 'MAP1';
    When trying to access the object from the local machine using the schema name.object_name it works fine:
    SQL> DESC APPS.UPDATE_CONV_DETAILS@PRE_TO_CEL
    PROCEDURE APPS.UPDATE_CONV_DETAILS@PRE_TO_CEL
    Argument Name Type In/Out Default?
    IN_MOBILE VARCHAR2 IN
    IN_SERVICE_CODE VARCHAR2 IN
    IN_STATUS VARCHAR2 IN
    OUT_ERROR_CODE NUMBER OUT
    But when trying the access the same object using the synonym_name it gives the error:
    SQL> DESC UPDATE_CONV_DETAILS@PRE_TO_CEL
    ERROR:
    ORA-04043: object APPS.UPDATE_CONV_DETAILS does not exist
    Regards,
    Kirti

    You have two schema.
    apps
    billing
    both reside in remote database.
    there on procedure and on procedure u create one synonym and u want to access it.
    ur remote database name is "map1"
    on ur local database ur create one dblink to access remote database.
    ORA-04043: object string does not exist
    Cause: An object name was specified that was not recognized by the system. There are several possible causes:
    - An invalid name for a table, view, sequence, procedure, function, package, or package body was entered. Since the system could not recognize the invalid name, it responded with the message that the named object does not exist.
    - An attempt was made to rename an index or a cluster, or some other object that cannot be renamed.
    Action: Check the spelling of the named object and rerun the code. (Valid names of tables, views, functions, etc. can be listed by querying the data dictionary.)

Maybe you are looking for