Too many Threads exception

Hello everyone, hope you can help me in this question since I'm having a time really bad when using threads on my request. Basically, I am during the extraction of data from the internet using Basic authentication Http. for this, I created a style waiting screen that will show while downloading data from the Internet... all right, but when you make a reminder for updating an ObjectListField with the results of the operation (public void didReceivedResponse (byte [] data) on the example)... my code starts fadlng son as it is inside a loop for... I really have no idea what's going on... even on eclipse in debugging it continues execution of the run method of the HttpHelper class. These are the classes that I am referring:

package login.example;

import java.util.Vector;

import login.example.model.Noticias;
import login.example.networking.HttpHelper;
import login.gui.WaitScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.ObjectListField;
import net.rim.device.api.ui.component.SeparatorField;
import net.rim.device.api.ui.container.MainScreen;

import com.kruger.exceptions.ParserException;
import com.kruger.networking.interfaces.HttpDelegate;
import com.kruger.parsing.NoticiasJsonParser;

/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
public final class LoginExampleScreen extends MainScreen implements
        FieldChangeListener, HttpDelegate {
    /**
     * Creates a new MyScreen object
     */

    ObjectListField objectField;
    WaitScreen waitScreen;
    ButtonField loginButton;
    Vector listaNoticias;

    public LoginExampleScreen() {
        // Set the displayed title of the screen
        setTitle("MyTitle");

        loginButton = new ButtonField("Start");
        loginButton.setChangeListener(this);
        add(loginButton);
        add(new SeparatorField());
        add(new LabelField("Noticias"));
        objectField = new ObjectListField(){

            protected boolean navigationClick(int status, int time) {
                if(objectField.getSize()==0) return true;
                Noticias noticiaSeleccionada = (Noticias) objectField.get(objectField, objectField.getSelectedIndex());
                UiApplication.getUiApplication().pushScreen(new DetailScreen(noticiaSeleccionada));
                return true;

            }

        };
        objectField.setEmptyString("No se han encontrado resultados",
                LabelField.VCENTER);
        objectField.setChangeListener(this);
        add(objectField);

    }

    public void didReceivedResponse(byte[] data) {
        if (data != null) {
            waitScreen.hideScreen();
            NoticiasJsonParser noticiasParser = new NoticiasJsonParser();
                try {
                    noticiasParser.initialize(data);
                    Vector noticias = noticiasParser.readObjects();
                    listaNoticias=noticias;
                    UiApplication.getUiApplication().invokeLater(new Runnable() {

                        public void run() {
                            updateNoticiasList();

                        }
                    });

                } catch (ParserException e) {

                    e.printStackTrace();
                }

        }

    }

    private void updateNoticiasList(){

        Object[] noticiasList = new Object[listaNoticias.size()];
        listaNoticias.copyInto(noticiasList);
        objectField.set(noticiasList);
    }

    public void didReceiveUnauthorizedResponse() {
        waitScreen.hideScreen();
        UiApplication.getUiApplication().invokeLater(new Runnable() {
            public void run() {
                UiApplication.getUiApplication().pushScreen(new LoginScreen());
            }
        });

    }

    public void fieldChanged(Field field, int context) {
            waitScreen = new WaitScreen();
            HttpHelper helper = new HttpHelper(
                    "http://localhost:8088/simple-login/rest/noticias", null,
                    this);
            helper.setOperation(HttpHelper.GET);
            helper.start();

    }
}
package login.example.networking;

import java.io.DataInputStream;
import java.io.IOException;

import javax.microedition.io.HttpConnection;

import login.example.ApplicationPreferences;
import net.rim.device.api.io.Base64OutputStream;
import net.rim.device.api.io.transport.ConnectionDescriptor;
import net.rim.device.api.io.transport.ConnectionFactory;
import net.rim.device.api.system.DeviceInfo;
import net.rim.device.api.util.ByteVector;

import com.kruger.networking.interfaces.HttpDelegate;

public class HttpHelper extends Thread {

    private byte[] postData;
    private String url;
    private String operation;
    private HttpDelegate delegate;
    private HttpConnection connection;

    public static final String GET = "GET";
    public static final String POST = "POST";
    private ConnectionFactory connectionFactory = new ConnectionFactory();

    public HttpHelper(String url, byte[] postData, HttpDelegate delegate) {
        this.url = url;
        this.postData = postData;
        this.delegate = delegate;
    }

    public HttpHelper(String url, byte[] postData, HttpDelegate delegate,
            String operation) {
        this.url = url;
        this.postData = postData;
        this.delegate = delegate;
        this.operation = operation;
    }

    public void run() {
        if (operation == null)
            delegate.didReceivedResponse(null);
        if (operation == GET) {
            ConnectionDescriptor connectionDescriptor = connectionFactory
                    .getConnection(url);
            DataInputStream din = null;
            final ByteVector responseBytes = new ByteVector();
            int responseCode;
            connection = (HttpConnection) connectionDescriptor.getConnection();
            String loginInfo = ApplicationPreferences.getInstance().getUsername()+":"+ApplicationPreferences.getInstance().getPassword();
            String encodedLogin;
            try {
                encodedLogin = new String(Base64OutputStream.encode(
                        loginInfo.getBytes(), 0, loginInfo.length(), false,
                        false), "UTF-8");
                connection.setRequestProperty("Authorization", "Basic "
                        + encodedLogin);
                //Send the Device PIN number
                connection.setRequestProperty("DeviceId", String.valueOf(DeviceInfo.getDeviceId()));
                responseCode = connection.getResponseCode();
                switch (responseCode) {
                    case HttpConnection.HTTP_UNAUTHORIZED:
                    case HttpConnection.HTTP_FORBIDDEN: {
                        Thread delegateThread=new Thread(){
                            public void run(){
                                delegate.didReceiveUnauthorizedResponse();
                            }
                        };
                        delegateThread.start();
                        connection.close();
                        return;
                    }
                }
                din = connection.openDataInputStream();
                int i = din.read();
                while (-1 != i) {
                    responseBytes.addElement((byte) i);
                    i = din.read();
                }
            } catch (IOException e) {
                System.out.println(e.getMessage());
                e.printStackTrace();
                return;
            } finally {
                try {
                    connection.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (responseBytes != null && responseCode != 0) {
                Thread delegateThread=new Thread(){
                    public void run(){
                        delegate.didReceivedResponse(responseBytes.toArray());
                    }
                };
                delegateThread.start();
                return;

            }
        } else if (operation == POST) {
            return;
        }
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

}
package login.gui;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.system.Display;
import net.rim.device.api.system.GIFEncodedImage;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.FullScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;

public class WaitScreen extends FullScreen {

    private GIFEncodedImage _image;
    private int _currentFrame;
    private int _width, _height, _xPos, _yPos;
    private AnimatorThread _animatorThread;
    private Bitmap backgroundBitmap;

    public WaitScreen() {
        super(new VerticalFieldManager(), Field.NON_FOCUSABLE);
        //TODO: Correctly handle icons
        GIFEncodedImage img = (GIFEncodedImage) GIFEncodedImage.getEncodedImageResource("loading6.agif");

        // Store the image and it's dimensions.
        _image = img;
        _width = img.getWidth();
        _height = img.getHeight();
        _xPos = ((Display.getWidth() - _width) >> 1);
        _yPos = ((Display.getHeight() - _height) >> 1)+50;
        // Start the animation thread.
        _animatorThread = new AnimatorThread(this);
        _animatorThread.start();
        UiApplication.getUiApplication().pushScreen(WaitScreen.this);
        //TODO: handle correctly background
        backgroundBitmap=Bitmap.getBitmapResource("Wallpaper1.png");
      }

    protected void paintBackground(Graphics graphics) {
        super.paintBackground(graphics);
        graphics.drawBitmap(0, 0, backgroundBitmap.getWidth(), backgroundBitmap.getHeight(), backgroundBitmap, 0, 0);
    }

    protected void paint(Graphics graphics) {
        super.paint(graphics);
                // Draw the animation frame.
                graphics
                  .drawImage(_xPos, _yPos, _image
                    .getFrameWidth(_currentFrame), _image
                      .getFrameHeight(_currentFrame), _image,
                    _currentFrame, 0, 0);
    }

    protected void onUndisplay() {
        _animatorThread.stop();
    }

    private class AnimatorThread extends Thread {
        private WaitScreen _theField;
        private boolean _keepGoing = true;
        private int _totalFrames, _loopCount, _totalLoops;
        public AnimatorThread(WaitScreen _theScreen) {
                _theField = _theScreen;
                _totalFrames = _image.getFrameCount();
                _totalLoops = _image.getIterations();

        }

        public synchronized void stop() {
                _keepGoing = false;
        }

        public void run() {
                while (_keepGoing) {
                        // Invalidate the field so that it is redrawn.
                        UiApplication.getUiApplication().invokeAndWait(
                          new Runnable() {
                                public void run() {
                                        _theField.invalidate();
                                }
                        });
                        try {
                          // Sleep for the current frame delay before
                          // the next frame is drawn.
                          sleep(_image.getFrameDelay(_currentFrame) * 10);
                        } catch (InterruptedException iex) {
                        } // Couldn't sleep.
                        // Increment the frame.
                        ++_currentFrame;
                        if (_currentFrame == _totalFrames) {
                          // Reset back to frame 0
                          // if we have reached the end.
                          _currentFrame = 0;
                          ++_loopCount;
                          // Check if the animation should continue.

                        }
                }
        }

    }

    public void hideScreen(){
        _animatorThread.stop();
        UiApplication.getUiApplication().invokeAndWait(new Runnable() {

            public void run() {
                UiApplication.getUiApplication().popScreen(WaitScreen.this);

            }
        });
    }
}

Please any help would be great... or at least an explanation of what I'm doing wrong... I'm new to using Threads. Thank you very much.

Note that the fieldchanged event is triggered not only by the user, but also by changes programmatically, for example when you add an item to a listfield.
You can check the context to be! = http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/FieldChangeListener.html#PR... to filter them.

Tags: BlackBerry Developers

Similar Questions

  • Is consolidation of threads is the solution to "too many Threads Exception"?

    Hi all

    In my application, I use threads, but increases the number of threads for each application.

    Now the Group of threads can solve this problem.

    And in my application, there is no need to live the thread for a long time, but even if I thread the thread count does not decrease.

    Thanks in advance.

    The code shown:

    "synchronized (UiApplication.getEventLock ()) {}".

    UiApplication.getUiApplication () .pushScreen (screen);

    Tools.Print ("Thread Count:" + Thread.activeCount ());

    }"

    Does not use a modal help, so I think it is unlikely that this uses a Thread, but there could be something in the onDisplay screen that uses a Thread of courset.

    I would put more

    Tools.Print ("Thread Count:" + Thread.activeCount ());

    and try to track down what is causing the problem.

  • Thread length of queue count in negative and too many Thread waiting

    We use Weblogic server 9.2.2 with 1 admin server and managed server 4. Currently, in one of the servers, I saw that there is about 77 waiting threads.


    Home > summary of the servers > server1 > surveillance > discussions > autoréglant Thread Pool

    I could see that the "length of the queue' is negative (-138) and auto tuning sleep thread count is 77. Large number of threads WAITING thread persists during the busy time of the times while other servers is fully used.


    Is it normal to have the length of the queue that is negative and so many threads on HOLD? With regard to the JMS queue negative oracle had already recognized this is a bug. Thank you.

    Published by: 855849 on May 1st, 2011 07:19

    Published by: SilverHawk may 12, 2011 08:12

    Is it normal to have the length of the queue that is negative

    No, it is not normal. Looks like probably a bug

  • too many threads

    How can I unsubscribe from a thread

    on the side right of the screen (under actions), click on "Stop email notifications".

    You can do it for each thread, or if you return to the previous screen, you can set that in the world (under notifications, no actions).

  • Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [4 primary key].

    Mr President

    I am able to add records with the following method but when I navigate through folders and then I get the above error.

    When you use this code in my doDML()

    package model;
    
    
    import java.sql.PreparedStatement;
    
    
    import oracle.jbo.Key;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.EntityDefImpl;
    import oracle.jbo.server.EntityImpl;
    import oracle.jbo.server.SequenceImpl;
    import oracle.jbo.server.TransactionEvent;
    // ---------------------------------------------------------------------
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Tue Nov 10 11:03:43 PKT 2015
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    // ---------------------------------------------------------------------
    public class TableNameImpl extends EntityImpl {
        /**
         * AttributesEnum: generated enum for identifying attributes and accessors. DO NOT MODIFY.
         */
        public enum AttributesEnum {
            Column1,
            Column2,
            Column3,
            JoinColumn,
            HiddenColumn;
            private static AttributesEnum[] vals = null;
            private static final int firstIndex = 0;
    
    
            public int index() {
                return AttributesEnum.firstIndex() + ordinal();
            }
    
    
            public static final int firstIndex() {
                return firstIndex;
            }
    
    
            public static int count() {
                return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
            }
    
    
            public static final AttributesEnum[] staticValues() {
                if (vals == null) {
                    vals = AttributesEnum.values();
                }
                return vals;
            }
        }
        public static final int COLUMN1 = AttributesEnum.Column1.index();
        public static final int COLUMN2 = AttributesEnum.Column2.index();
        public static final int COLUMN3 = AttributesEnum.Column3.index();
        public static final int JOINCOLUMN = AttributesEnum.JoinColumn.index();
        public static final int HIDDENCOLUMN = AttributesEnum.HiddenColumn.index();
    
    
        /**
         * This is the default constructor (do not remove).
         */
        public TableNameImpl() {
        }
    
    
        /**
         * Gets the attribute value for Column1, using the alias name Column1.
         * @return the value of Column1
         */
        public Number getColumn1() {
            return (Number) getAttributeInternal(COLUMN1);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column1.
         * @param value value to set the Column1
         */
        public void setColumn1(Number value) {
            setAttributeInternal(COLUMN1, value);
        }
    
    
        /**
         * Gets the attribute value for Column2, using the alias name Column2.
         * @return the value of Column2
         */
        public Number getColumn2() {
            return (Number) getAttributeInternal(COLUMN2);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column2.
         * @param value value to set the Column2
         */
        public void setColumn2(Number value) {
            setAttributeInternal(COLUMN2, value);
        }
    
    
        /**
         * Gets the attribute value for Column3, using the alias name Column3.
         * @return the value of Column3
         */
        public Number getColumn3() {
            return (Number) getAttributeInternal(COLUMN3);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column3.
         * @param value value to set the Column3
         */
        public void setColumn3(Number value) {
            setAttributeInternal(COLUMN3, value);
        }
    
    
        /**
         * Gets the attribute value for JoinColumn, using the alias name JoinColumn.
         * @return the value of JoinColumn
         */
        public Number getJoinColumn() {
            return (Number) getAttributeInternal(JOINCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for JoinColumn.
         * @param value value to set the JoinColumn
         */
        public void setJoinColumn(Number value) {
            setAttributeInternal(JOINCOLUMN, value);
        }
    
    
        /**
         * Gets the attribute value for HiddenColumn, using the alias name HiddenColumn.
         * @return the value of HiddenColumn
         */
        public Number getHiddenColumn() {
            return (Number) getAttributeInternal(HIDDENCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for HiddenColumn.
         * @param value value to set the HiddenColumn
         */
        public void setHiddenColumn(Number value) {
            setAttributeInternal(HIDDENCOLUMN, value);
        }
    
    
        /**
         * @param column1 key constituent
    
    
         * @return a Key object based on given key constituents.
         */
        public static Key createPrimaryKey(Number column1) {
            return new Key(new Object[] { column1 });
        }
    
    
        /**
         * @return the definition object for this instance class.
         */
        public static synchronized EntityDefImpl getDefinitionObject() {
            return EntityDefImpl.findDefObject("model.TableName");
        }
    
    
        /**
         * Add locking logic here.
         */
        public void lock() {
            super.lock();
        }
    
    
        /**
         * Custom DML update/insert/delete logic here.
         * @param operation the operation type
         * @param e the transaction event
         */
        protected void doDML(int operation, TransactionEvent e) {
                if(operation == DML_INSERT)
                    {
                      SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
                      oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
                      setJoinColumn(seqValue);
                      insertSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                   
                    if(operation == DML_UPDATE)
                    {
                      updateSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                super.doDML(operation, e);
            }
          
            private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
                  System.out.println("sql= " + sql);  
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
            
              private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
                  System.out.println("sql= " + sql);    
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
        }
    
    
    

    To me the error.

    Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[4 ].
      at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:862)
      at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:555)
      at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:9089)
      at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:7664)
      at oracle.jbo.server.EntityImpl.merge(EntityImpl.java:8008)
      at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1189)
      at oracle.jbo.server.EntityCache.add(EntityCache.java:579)
      at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3454)
      at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:4062)
      at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:6351)
      at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:4145)
      at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:4000)
      at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2491)
      at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5540)
      at oracle.jbo.server.ViewRowSetIteratorImpl.getRowInternal(ViewRowSetIteratorImpl.java:3590)
      at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:2007)
      at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:3859)
      at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:11845)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:473)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:300)
      at oracle.jbo.uicli.controls.JUNavigationBar._isEnabled(JUNavigationBar.java:1345)
      at oracle.jbo.uicli.controls.JUNavigationBar._updateButtonStates(JUNavigationBar.java:1334)
      at oracle.jbo.jbotester.app.NavigationBar._updateButtonStates(NavigationBar.java:123)
      at oracle.jbo.uicli.controls.JUNavigationBar$3.run(JUNavigationBar.java:1249)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    
    

    Concerning

    You can't repeat the value of pharmacokinetics in several lines. try to follow this:

    1. in your database to create new sequence "PK_SEQ".

    2. in doDML write this

        if (operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          setPKey(getPkSeqNextNumber())
          insertSecondRowInDatabase(getPkSeqNextNumber(), getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
        }
    

    the getPkSeqNextNumber will be

    private Number getPkSeqNextNumber()
    {
      SequenceImpl pkSeq = new SequenceImpl("PK_SEQ", getDBTransaction());
      return pkSeq.getSequenceNumber();
    }
    

    or

    You can do a trigger in the database, this trigger Gets the value of the sequence and sets the pkey to insert before

  • How to manage too many objects correspond with the exception of the primary key

    Greetings,

    IM using JDeveloper 11.1.2.4.0 and im trying to manage the "too many objects match the primary key' exception.

    I try to add a try catch in bean when I run the validation operation, but he didn't catch it.

    then I add a plug on the setter, but he ignores the value and try to insert a null on my primary key.

    I want just to handle this exception and display an appropriate message that it is a duplicate primary key

    (and of course do not try to continue the validation operation if there are duplicate key)

    Thanks in advance.

    You can find samples for error messages personalized here:

    http://www.adftutorials.com/ADF-custom-error-handler-to-display-custom-message-to-user.html

    http://smconsultants.in/2013/07/ADF-BC-error-messages-customization.html

  • Exception of Houston - too many objects

    Team,

    IAM using JDev 11.1.1.6.0
    BPM & ADF (ADf workflows running on BPM workspace)

    I have a table with "attribute name" as the primary key. I tried to add a new record to the table with the same name that fate already so he says that Houston-25013: too many objects correspond to the oracle.jbo.Key [null primary key 123 null].

    The problem is:
    once after getting this error iam not able to perform any operation like rest, add etc, wherever I like it, said the same Houston-25013, several times the behavior of HRT's overall enforcement not only my module.

    Now to avoid this we simply close the BPM for example it self and fresh departure.

    Concerning
    Vidya

    There are several ways to do good la. You can place a button on the page link to the restore operation. Or you catch the Houston exception and display it in a dialog box. When the user closed the dialog box call you rollback.

    Timo

  • Too many touch points reported: Bug?

    Dear community of JavaFX

    Following situation. I have a contact manager that recognizes special movements and fire of javafx. GestureEvent derivatives on positive detection. gesture event has a list of points of contact cloned to lay their hands on the beginning and the end of the gesture.

    Now if a listener for this GestureEvents fails for some reason any with an untrapped exception, JavaFX contact point manipulation goes wrong by launching constantly RuntimeExceptions: "too many touch points reported. Therefore, the touch application is no longer usable and must be restarted.

    If the listener completes without error, the application continues to run as expected.

    The GestureEvent in a Platform.runLater of fire seemed to help, but I have experienced the problem at least once. The problem is not reproducible reliable however.

    I think it's a bug in JavaFX.

    Any thoughts/advice/comments on this?

    See the below stacktraces. The first trace of NPE is my deliberately caused exception. The trace of the second arises on each event unique later touch

    Exception in thread "Thread of Application JavaFX" java.lang.NullPointerException

    at view.services.ui.navigation.internal.NavigationService.home(NavigationService.java:319)

    at view.ui.gestures.addons.grab.internal.DefaultGrabEventHandler.handle(DefaultGrabEventHandler.java:298)

    at view.ui.gestures.addons.grab.internal.DefaultGrabEventHandler.handle(DefaultGrabEventHandler.java:1)

    to com.sun.javafx.event.CompositeEventHandler$ NormalEventHandlerRecord.handleBubblingEvent (CompositeEventHandler.java:218)

    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)

    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)

    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)

    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)

    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)

    at javafx.event.Event.fireEvent(Event.java:203)

    at keba.view.javafx.gestures.grab.GrabDetector.fireEvent(GrabDetector.java:579)

    at keba.view.javafx.gestures.grab.GrabDetector.fireGrabMoveOrEnd(GrabDetector.java:452)

    at keba.view.javafx.gestures.grab.GrabDetector.handleTouchReleased(GrabDetector.java:415)

    at keba.view.javafx.gestures.grab.GrabDetector.handle(GrabDetector.java:336)

    at keba.view.javafx.gestures.grab.GrabDetector.handle(GrabDetector.java:1)

    to com.sun.javafx.event.CompositeEventHandler$ NormalEventFilterRecord.handleCapturingEvent (CompositeEventHandler.java:282)

    at com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)

    at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:223)

    at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)

    at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)

    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)

    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)

    at javafx.event.Event.fireEvent(Event.java:203)

    at javafx.scene.Scene.processTouchEvent(Scene.java:1773)

    to javafx.scene.Scene.access$ 5800 (Scene.java:193)

    to javafx.scene.Scene$ ScenePeerListener.touchEventEnd (Scene.java:2712)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 11.run(GlassViewEventHandler.java:989)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 11.run(GlassViewEventHandler.java:985)

    at java.security.AccessController.doPrivileged (Native Method)

    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleEndTouchEvent(GlassViewEventHandler.java:985)

    at com.sun.glass.ui.View.handleEndTouchEvent(View.java:553)

    at com.sun.glass.ui.View.notifyEndTouchEvent(View.java:1007)

    at com.sun.glass.ui.TouchInputSupport.notifyEndTouchEvent(TouchInputSupport.java:85)

    at com.sun.glass.ui.win.WinGestureSupport.notifyEndTouchEvent(WinGestureSupport.java:62)

    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)

    to com.sun.glass.ui.win.WinApplication.access$ 300 (WinApplication.java:39)

    to com.sun.glass.ui.win.WinApplication$ $4 1.run(WinApplication.java:112)

    at java.lang.Thread.run(Thread.java:744)

    Exception in thread "Thread of Application JavaFX" java.lang.RuntimeException: too many touch points reported

    to javafx.scene.Scene$ ScenePeerListener.touchEventNext (Scene.java:2668)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 10.run(GlassViewEventHandler.java:965)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 10.run(GlassViewEventHandler.java:944)

    at java.security.AccessController.doPrivileged (Native Method)

    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleNextTouchEvent(GlassViewEventHandler.java:944)

    at com.sun.glass.ui.View.handleNextTouchEvent(View.java:547)

    at com.sun.glass.ui.View.notifyNextTouchEvent(View.java:1002)

    at com.sun.glass.ui.TouchInputSupport.notifyNextTouchEvent(TouchInputSupport.java:117)

    at com.sun.glass.ui.win.WinGestureSupport.notifyNextTouchEvent(WinGestureSupport.java:58)

    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)

    to com.sun.glass.ui.win.WinApplication.access$ 300 (WinApplication.java:39)

    to com.sun.glass.ui.win.WinApplication$ $4 1.run(WinApplication.java:112)

    at java.lang.Thread.run(Thread.java:744)

    Exception in thread "Thread of Application JavaFX" java.lang.NullPointerException

    at javafx.scene.Scene.processTouchEvent(Scene.java:1766)

    to javafx.scene.Scene.access$ 5800 (Scene.java:193)

    to javafx.scene.Scene$ ScenePeerListener.touchEventEnd (Scene.java:2712)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 11.run(GlassViewEventHandler.java:989)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ 11.run(GlassViewEventHandler.java:985)

    at java.security.AccessController.doPrivileged (Native Method)

    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleEndTouchEvent(GlassViewEventHandler.java:985)

    at com.sun.glass.ui.View.handleEndTouchEvent(View.java:553)

    at com.sun.glass.ui.View.notifyEndTouchEvent(View.java:1007)

    at com.sun.glass.ui.TouchInputSupport.notifyEndTouchEvent(TouchInputSupport.java:85)

    at com.sun.glass.ui.win.WinGestureSupport.notifyEndTouchEvent(WinGestureSupport.java:62)

    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)

    to com.sun.glass.ui.win.WinApplication.access$ 300 (WinApplication.java:39)

    to com.sun.glass.ui.win.WinApplication$ $4 1.run(WinApplication.java:112)

    at java.lang.Thread.run(Thread.java:744)

    Yes, it is a bug in FX. I filed it RT-34602. As a solution, it would be probably better catch the exception.

  • Why firefox causes 429 block too many applications on the Vimeo site?

    When I try to visit vimeo.com with Firefox (version 37.0) I get a message block server called 429 too many requests. However, I can then use another browser (Konqueror - provided with my Fedora KDE plasma system [fc21]) to access the site without problem.
    I tried to clear the cookies and the cache of Firefox and running in safe mode with all add-ons disabled, but he always brings the 429 error message.
    I'm puzzled. Any advice?

    You can delete all data stored in Firefox with a specific area through "Forget this Site" in the context menu of a history entry ("" history > view history "or" view > sidebar > History "") or via the subject: permissions page.

    Using "Forget this Site" will delete all data stored in Firefox in this area as bookmarks, cookies, words of past, cache, history, and exceptions, so be careful and if you have a password or other data from that domain you don't want to lose then check that back up these data or make a comment.

    You can't recover from this "forget" unless you have a backup of the files involved.

    It has no lasting effect, so if come back you on such a 'forgotten' site, then the data of this Web site will be saved once more.

    Create a new profile as a test to see if your profile is the source of the problem.

    See "create a profile":

    If the new profile works then you can transfer files from a profile already used in the new profile, but be careful not to copy files corrupted to avoid transporting more problems.

  • Why have too many tabs suddenly removed?

    Firefox Add ons have worked very well.
    Following an accident, I am now informed that too many tabs 1.3.6 is not compatible with Firefox 3.6.18.
    I don't want to spend because, generally, many Add ons fail to work with the upgrades and upgrade tends to be a step backward, as regards Add ons.
    Firefox usually emits new versions prematurely and tends to put the cart before the horse in this case add ons.
    They can wait patiently add ons are ready and compatible.

    I don't see why there would be a problem. Have you tried to uninstall and reinstall too many tabs? If you have persistent problems, you should contact the developer.

    Wait for the module developers would take forever and a day. The worst culprits are the toolbars of the large commercial operations which have several months announcing changes of the version. And often the required changes are really minor. I manage very well with no third-party toolbars.

    My extensions do not have necessary update for weeks. If you have an extension that is trolling there is often the best alternative, certainly better maintained. Too many toolbars seems not to be a culprit.

    Sorry for reading. I have no connection with Firefox except as a happy user.

  • HP laptop: enter the model number and get a "game too many results.

    My HP laptop dies after 6 weeks. When I contact support, he asks the model number. I enter: say "15-ay041wm" is what the box and laptop. I get a reply that says.

    "Sorry, too many results match your search for 15-1y041wm.

    "So I try HP Notebook, I get the same mesaage above, except with the HP laptop ' instead of '15-ay041wm.

    Because no matter where I'm going, he wants the model number and I give, I can't help. No cat, no nothing.

    So someone can tell me how to get support?

    If HP is unable to handle the number of model of it's own computers, so I'm not very confident.

    Here are the free support number to call in the USA/Canada... 1 800-474-6836.

    Now here's another question, you can report to HP on if you want...

    You must stay online and listen to the automated assistant trying to talk to you to talk to a representative... visit the HP website... go to this support forum (which has no official presence in HP), etc.

    After a minute or two, the Assistant to say, if you can't get online, will stay on the line to speak to a customer services representative.

    This is when you will have the opportunity to speak with a support person and report the problem to open a pension case.

  • App problem creates too many handles, PC crashes, how do I know why and stop it?

    We have a problem application that creates too many handles (about 3000 every 2 seconds), but it does so only with certain PC which have a conexant onboard sound, how can I find more information about why the handles are consumed at such a pace? (winxpsp3, dell optiplex 390)
    Application uses a wrapper.exe and seems to use a lot of Flash/Shockwave/Java. (Range of software active Teach of Pearson).
    The handles of process SYSTEM seem to be created as the registry constantly queried for (relative to the sound card) non-existent registry keys.
    His conexant card drivers were installed as a local administrator, and update the BIOS & PC drivers not yet had effect.

    Once the number of handles starts to get in the Millions, the PC grinds to a stop/crashes(usually takes less than 30 mins!) coup!

    Any help, suggestions accepted with gratitude.
    Thank you very much
    Dave.

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows Networking forum.

    http://social.technet.Microsoft.com/forums/en/w7itpronetworking/threads

  • Outlook express seems tied up. I may have too many emails stored?

    Outlook Express seemed tied up. When I try to open it, spikes of memory, I may have too many stored emails.

    This site is for the comments of Microsoft answers. Your message should have been asked in this forum and will be probably moved here.

    XP - Networking, Mail, and getting online Forum
    http://social.answers.Microsoft.com/forums/en-us/xpnetwork/threads

    A better description of your problem would be useful.

    1. OE start?
    2. It is completely freeze or hang?
    3. Can you get in tools | Options to make changes?

    Start here.

    When OE crashes or won't start
    http://www.insideoe.com/problems/errors.htm#crash

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • How can I check to see if my system and components are compatible with VISTA, given that the counsel is no longer available and my office will take too many changes to make it compatible with WIN 7?

    I am running WINDOWS XP on my desktop and would like it ungrade to WINDOWS VISTA, but I don't know if all my devices are compatible with WINDOWS VISTA! I would like to upgrade my desktop computer for WIN 7, but it would take too many changes, so I'm going to update my laptop for WIN 7 and I have another laptop running WIN XP! So basically I want to have at least one of the three operating systems (XP, VISTA and WIN 7) on my different computers! WIN XP on my laptop older, WINDOWS VISTA on my desktop (currently in XP) and WINDOWS 7 on my laptop latest (running VISTA)! I just want to know how to find out if there is a way to see if all my components on my desktop are compatible with WINDOWS VISTA, but the Advisor WINDOWS VISTA is no longer available? I used the WIN 7 Advisor to check what is required for me to upgrade my desktop PC to WIN 7 but there are too many changes that need to be done! I also used the WIN 7 Advisor on my new laptop and it has only a few changes that need to be done and that is why I want to upgrade my laptop to WINDOWS 7 and my desktop for WINDOWS Vista!

    Hello

    I already gave you advice available to upgrade to Vista in your other thread earlier in this forum

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_install/how-can-i-check-to-see-if-my-system-and-components/7e626228-5572-E011-8dfc-68b599b31bf5

    You should check with the manufacturers of hardware and program

    and use the Vista Compatibility Center

    http://www.Microsoft.com/Windows/compatibility/Windows-Vista/

    and read the vista system requirements

    http://Windows.Microsoft.com/en-us/Windows-Vista/products/system-requirements

  • Help: too many newspapers using EzVPN

    Hello

    I've implemented EzVPN on ASA Version 9.2 (4) 5. My goal is just the address pool (10.11.10.x) VPN access everywhere instead of using the actual IP address of my laptop. NAT is not necessary on the SAA outside interface. I even only to not configure the inside interface.

    Everything works as expected, with the exception of too many even syslog messages from ' % ASA-4-402117: IPSEC: received a package not IPSec (Protocol = UDP) 10.11.10.1 to 10.11.10.255 "are generated.

    Configuration is shown below. Please help how I can get rid of these logs. Thank you very much.

    Robert

    local pool EZVPN_POOL 10.11.10.1 - 10.11.10.254 255.255.255.0 IP mask
    !
    interface Vlan1
    nameif outside
    security-level 0
    IP address dhcp setroute
    !
    permit same-security-traffic intra-interface
    !
    Crypto ipsec transform-set ikev1 VPN_TRAN aes - esp esp-sha-hmac
    Crypto ipsec pmtu aging infinite - the security association
    Dynamic crypto map VPN_DYMAP 10 set transform-set VPN_TRAN ikev1
    card crypto VPN_MAP 10-isakmp dynamic ipsec VPN_DYMAP
    VPN_MAP interface card crypto outside
    !
    Crypto ikev1 allow outside
    IKEv1 crypto policy 10
    preshared authentication
    aes encryption
    md5 hash
    Group 2
    life 86400!
    internal PROXY_VPN_POLICY group policy
    PROXY_VPN_POLICY group policy attributes
    value of 8.8.8.8 DNS Server 4.2.2.2
    Ikev1 VPN-tunnel-Protocol
    allow password-storage
    Split-tunnel-policy tunnelall
    !
    username privilege of John password XXXXXX 0
    username John attributes
    VPN-group-policy PROXY_VPN_POLICY
    !
    type tunnel-group PROXY_VPN_GROUP remote access
    attributes global-tunnel-group PROXY_VPN_GROUP
    address EZVPN_POOL pool
    Group Policy - by default-PROXY_VPN_POLICY
    IPSec-attributes tunnel-group PROXY_VPN_GROUP
    IKEv1 pre-shared key XXXXXX
    !

    Hi robert.huang,

    The error "% ASA-4-402117: IPSEC: received a package not IPSec (Protocol = UDP) 10.11.10.1 to 10.11.10.255" says that on the remote side sends traffic from 10.11.10.1 to 10.11.10.255 which is not sent through the IPSec tunnel. You can confirm with them.

    In addition, you can adjust the level of severity of this log message and define what level of logs must be sent to your syslog server so that it does not understand this, but I wouldn't recommend it.

    Kind regards
    Dinesh Moudgil

    PS Please rate helpful messages.

Maybe you are looking for

  • Mac crashes when you click docking station

    Yosemite 10.10.5 running. Intermittently, when I click on an icon in the dock, my iMac is suspended for anywhere from 10 seconds to a minute or more. Repairing permissions, zapping the PRAM and reset SMC do not help. Any ideas?

  • Compaq Presario CQ56: Forgotten password

    My Compaq Presario CQ56 throws me an administration password and when I try to enter it, it gives me a code system with disabilities... 82527050... I know not what to do, please help, everybody. ...

  • in WRT54GC 5dBi antenna - how to tie

    Hi all I recently bought a 5dBi antenna for my WRT54GC router. However, I don't check if the router's original antenna is detachable and unfortunately is not. Does anyone know if there is another way to attach the new antenna or if I'm missing someth

  • Each hotmail email that I send to a malicious attachment (.eml file).

    Every email that I send with hotmail now seems to have an .eml attachment. My pc has sent an email broadcast to eveyone on my email with the attached .eml list. ThenI has sent an email to several people of my laptop and bounced a bit of incorrect add

  • BlackBerry 9530 Simulator and Chinese language

    Dear Forum, BlackBerry 9530 Simulator is installed on my computer with JDE 4.7.0.41.This JDE version shoud Chinese language support. However, if I add the Chinese line in the 9530.xml file, the Simulator does not Chinese in the choice of language. ad