BUG 5642176 in 10.1.3.2 ? "AWT-EventQueue-0" java.lang.NullPointerException

Hi,
JDeveloper version: JDev 10.1.3.2
Technology: ADF BC / ADF Faces
I have following exception when I press COMMIT on creation form:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
07/03/28 15:18:58      at oracle.jbo.uicli.binding.JUCtrlAttrsBinding$mySetEnabledThread.run(JUCtrlAttrsBinding.java:53)
07/03/28 15:18:58      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
Exception in thread "AWT-EventQueue-0" Exception in thread "AWT-EventQueue-0" 07/03/28 15:18:58      at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
07/03/28 15:18:58      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
07/03/28 15:18:58      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
07/03/28 15:18:58      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
07/03/28 15:18:58      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
07/03/28 15:18:58      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
New row is saving into database correct and application works. What is wrong ? Is it a bug in JDeveloper 10.1.3.2 version. Any patch is aviable? I have found that in 10.1.3.1 it was a bug 5642176 (AWT-EventQueue-0 - NullPointerException
Kuba

Hi,
interesting that this bug is a ADF Swing bug. However, as far as I understand the various updates in the bug DB there is a patch based on Patch Request 9019619 available for 10.1.3.2. For this you need to contact customer support on metalink.oracle.com.
10.1.3.3. is not too far away from now which is why i think going back to 10.1.3.0 doesn't make sense
Frank

Similar Messages

  • Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    Hello everyone ... sorry for my English but I am an Italian boy with a problem that is not answered.
    I had to create a web application-service (created in Java with NetBeans 6.7) which is connected to a database postgresql (8.3.5) and for connection to the server using tomcat (3.2.4) through SOAP messages (2_2).
    OPERATING SYSTEM: WINXP
    I have created classes ... I created the database ... completed the project in NetBeans without any errors ... implemented the necessary libraries in the project (also ).... 8.3.604.jar jdbc tomcat configured and soap ... .. and set the environment variables (soap, mail, send in xerces )...... run the application on the NetBeans appears the login screen of my web service .....
    enter username and password (exactly!) and the NetBeans gives me an Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at Intro.loginActionPerformed(Intro.java:522)
            at Intro.access$100(Intro.java:21)
            at Intro$2.actionPerformed(Intro.java:111)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 31 seconds)  The line 522 Intro class is as follows:
    private void loginActionPerformed(java.awt.event.ActionEvent evt) {                                     
            try {
                URL address= new URL("http://"+ip+":8080/soap/servlet/rpcrouter");
                //Costruzione della chiamata
                Call chiamata = new Call();
                chiamata.setTargetObjectURI("urn:server");
                chiamata.setMethodName("controllaAgenzia");
                chiamata.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
                //creazione parametri che dovro' passare al soap
                Vector<Parameter> params = new Vector<Parameter>();
                String u = user.getText();
                String p = String.valueOf(password.getPassword());
                params.addElement(new Parameter("user", String.class, u, null));
                params.addElement(new Parameter("password", String.class, p, null));
                chiamata.setParams(params);//parametri passati al soap
                try {
                    //Invocazione RPC
                    Response respons = chiamata.invoke(address, "");
                    //qui ho la risposta inviata dal server
                    *Parameter par = respons.getReturnValue();*
                    Object value = par.getValue();
                    String REP = String.valueOf(value);
                    System.out.println(REP);
                    if (REP.equals("ACK_agenzia")) {
                        new MainAgenzia(ip);
                        this.dispose();
                    } else if (REP.equals("NACK_agenzia")) {
                        JOptionPane.showMessageDialog(null, "I dati inseriti non sono corretti", "Errore", JOptionPane.ERROR_MESSAGE);
                        password.setText("");
                        user.setText("");
                    } The strange thing is that this web service was running just finished the project.
    After 4-5 days of its operation has stopped, creandomi this problem.
    I think the answer is, the server that is not the case.
    I thought all I thought was jdbc, but I can connect to the database, so I do not know what to do and how to proceed.
    thanks to all, and thanks to my translator. :P

    Parameter par = respons.getReturnValue();There is only one possible reason, "respons" is null.

  • Why Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException?

    Hello,
    In my netbeans generated swing code I get the following stacktrace:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at javax.swing.text.PlainView.updateMetrics(PlainView.java:188)
         at javax.swing.text.PlainView.lineToRect(PlainView.java:589)
         at javax.swing.text.PlainView.modelToView(PlainView.java:327)
         at javax.swing.text.FieldView.modelToView(FieldView.java:248)
         at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1498)
         at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1036)
         at javax.swing.text.DefaultCaret.repaintNewCaret(DefaultCaret.java:1291)
         at javax.swing.text.DefaultCaret$1.run(DefaultCaret.java:1270)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)The code is @ http://code.google.com/p/memorizeasy/source/browse/trunk/MemorizEasy/src/com/mysimpatico/memorizeasy/engine/executables/Input.java

    So the problem is given by these two lines, of the Swing-X library:
    AutoCompleteDecorator.decorate(expField, exps, false);
    AutoCompleteDecorator.decorate(defField, exps, false);
    However, the functionality intended from them is given. The problem now seems to do with expField.setText() and expField.selectAll(). I've inline initialized expField, and now it works.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * Input1.java
    * Created on Feb 21, 2010, 11:56:00 AM
    import java.util.ArrayList;
    import javax.swing.*;
    import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
    public class Input1 extends javax.swing.JFrame {
         private static final long serialVersionUID = 2819528413930929081L;
         private static final ArrayList<String> exps = new ArrayList<String>();//Database.getAllExps();
         private static final Input1 instance  = new Input1();
         /* private void defFieldFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_defFieldFocusGained
                 defField.selectAll();
         }//GEN-LAST:event_defFieldFocusGained
             private void expFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_expFieldActionPerformed
                final String exp = expField.getText();
               /* if (defField.isVisible() && exp != null && exps.contains(exp)){
                    status.setText("to change the spelling select Spelling from the Edit Menu.");
                else if (!defField.isVisible()){ //in spelling mode
                    Database.editExpression(exSpell, exp);
                    status.setText("spelling for " + exSpell + " changed to " + exp);
                    defField.setVisible(true);
                    spellingMenuItem.setEnabled(false);
             }//GEN-LAST:event_expFieldActionPerformed
         private void initComponents() {
              contentPanel = new javax.swing.JPanel();
              expField = new javax.swing.JTextField();
               expField.setText("expression");
                    /*  expField.addActionListener(new java.awt.event.ActionListener() {
                          public void actionPerformed(java.awt.event.ActionEvent evt) {
                              expFieldActionPerformed(evt);
                      expField.addFocusListener(new java.awt.event.FocusAdapter() {
                          public void focusGained(java.awt.event.FocusEvent evt) {
                              expFieldFocusGained(evt);
                      defField.setText("definition");
                      defField.addActionListener(new java.awt.event.ActionListener() {
                          public void actionPerformed(java.awt.event.ActionEvent evt) {
                              defFieldActionPerformed(evt);
                      defField.addFocusListener(new java.awt.event.FocusAdapter() {
                          public void focusGained(java.awt.event.FocusEvent evt) {
                              defFieldFocusGained(evt);
              setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
              contentPanel.add(expField);
              expField.setVisible(true);
              this.setContentPane(contentPanel);
              pack();
         }// </editor-fold>
         /** Creates new form Input1 */
         private Input1() {
              initComponents();
              AutoCompleteDecorator.decorate(expField, exps, false);
         private void expFieldFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_expFieldFocusGained
                 expField.selectAll();
          * @param args the command line arguments
         public static void main(String args[]) {
              java.awt.EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        instance.setVisible(true);
         // Variables declaration - do not modify
         private javax.swing.JPanel contentPanel;
         private javax.swing.JTextField expField;
         // End of variables declaration
    }Edited by: simpatico_gabriele on Mar 11, 2010 8:09 PM

  • Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException

    Hi gurus,
    I am using mouse event in oracle forms 10g.I am getting following error in java console when loading java applet.I am using java plugin 1.6.0_29-b02.Oracle forms version is 10.1.2.0.Kindly give me solution to overcome this.
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Loaded image: jar:http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/frmall.jar!/oracle/forms/icons/oracle_logo.gif
    Loaded image: http://trl1th6m8k34j.trafford.ford.com:8889/forms/yes
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 10.1.2.0
    Loaded image: jar:http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/frmall.jar!/oracle/forms/icons/frame.gif
    Trace level set to 5: all ... completed.
    network: Cache entry not found [url: http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.class, version: null]
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.class with proxy=DIRECT
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/ with proxy=DIRECT
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.class with cookie "AFRSOComplete2011=1; WSL-credential=TZGxuU2SPlkBAPIABHVzZXJpZD1tdmlub2QAaXBhZGRyPTE5LjE1MS4xNTQuODQAYWNpZ3JvdXA9Tk9OT1ZWTQBkZXB0PTUwMDFGODlENTQAb3JnY29kZT0/AGVtcGNvZGU9RgBtcnJvbGU9TgBvcmc9QVBBAGNvbXBhbnk9Rk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAGRpdmFiYnI9QVBBAHNpdGVjb2RlPTc1MjQAY2l0eT1DSEVOTkFJAHN0YXRlPT8AY291bnRyeT1JTkQAc3ViamVjdGlkPW12aW5vZEBmb3JkLmNvbQAAAENOPXdzbHY0LWludGVybmFsAKgKrgQwd9XHGJmWswb3374C3ITXa8zKKOrGTmAp81O3ud1qjAsiquyL112PSA7FPHknAfBpgpkpCWa5AA3+3Gy906j/qh6cna01esWGot27Tf6TXQEJvxKiY81H/Hhx8xGzApYE6iEFR1g6eUjvRP1QZJhgaJw6dPfFlrxJmF6q; Ford-WSL-MIG=TZGxuU2SPllwcm9mc3B3MkB3ZWJmYXJtLmRlYXJib3JuLmZvcmQuY29tAG12aW5vZAAxOS4xNTEuMTU0Ljg0AE5PTk9WVk0ANTAwMUY4OUQ1NAA/AEYATgBBUEEARk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAEFQQQA3NTI0AENIRU5OQUkAPwBJTkQATlVMTC5jZW50b2tzAACvVWxUpXzzdrT6KgM5tvDc1l3mGobUxj+eOvcIt2JL3LQOyr0rnYQV1oFVkPFd7GOBoUzqgqr0Zd4Ta7KXVLIj"
    network: Cache entry not found [url: http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.properties, version: null]
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.properties with proxy=DIRECT
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/java/oracle/ewt/alert/resource/AlertBundle_en_GB.properties with cookie "AFRSOComplete2011=1; WSL-credential=TZGxuU2SPlkBAPIABHVzZXJpZD1tdmlub2QAaXBhZGRyPTE5LjE1MS4xNTQuODQAYWNpZ3JvdXA9Tk9OT1ZWTQBkZXB0PTUwMDFGODlENTQAb3JnY29kZT0/AGVtcGNvZGU9RgBtcnJvbGU9TgBvcmc9QVBBAGNvbXBhbnk9Rk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAGRpdmFiYnI9QVBBAHNpdGVjb2RlPTc1MjQAY2l0eT1DSEVOTkFJAHN0YXRlPT8AY291bnRyeT1JTkQAc3ViamVjdGlkPW12aW5vZEBmb3JkLmNvbQAAAENOPXdzbHY0LWludGVybmFsAKgKrgQwd9XHGJmWswb3374C3ITXa8zKKOrGTmAp81O3ud1qjAsiquyL112PSA7FPHknAfBpgpkpCWa5AA3+3Gy906j/qh6cna01esWGot27Tf6TXQEJvxKiY81H/Hhx8xGzApYE6iEFR1g6eUjvRP1QZJhgaJw6dPfFlrxJmF6q; Ford-WSL-MIG=TZGxuU2SPllwcm9mc3B3MkB3ZWJmYXJtLmRlYXJib3JuLmZvcmQuY29tAG12aW5vZAAxOS4xNTEuMTU0Ljg0AE5PTk9WVk0ANTAwMUY4OUQ1NAA/AEYATgBBUEEARk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAEFQQQA3NTI0AENIRU5OQUkAPwBJTkQATlVMTC5jZW50b2tzAACvVWxUpXzzdrT6KgM5tvDc1l3mGobUxj+eOvcIt2JL3LQOyr0rnYQV1oFVkPFd7GOBoUzqgqr0Zd4Ta7KXVLIj"
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/lservlet;jsessionid=13979a5422b982f5c03763394a95824eb74a032e698e with proxy=DIRECT
    network: Connecting http://trl1th6m8k34j.trafford.ford.com:8889/forms/lservlet;jsessionid=13979a5422b982f5c03763394a95824eb74a032e698e with cookie "AFRSOComplete2011=1; WSL-credential=TZGxuU2SPlkBAPIABHVzZXJpZD1tdmlub2QAaXBhZGRyPTE5LjE1MS4xNTQuODQAYWNpZ3JvdXA9Tk9OT1ZWTQBkZXB0PTUwMDFGODlENTQAb3JnY29kZT0/AGVtcGNvZGU9RgBtcnJvbGU9TgBvcmc9QVBBAGNvbXBhbnk9Rk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAGRpdmFiYnI9QVBBAHNpdGVjb2RlPTc1MjQAY2l0eT1DSEVOTkFJAHN0YXRlPT8AY291bnRyeT1JTkQAc3ViamVjdGlkPW12aW5vZEBmb3JkLmNvbQAAAENOPXdzbHY0LWludGVybmFsAKgKrgQwd9XHGJmWswb3374C3ITXa8zKKOrGTmAp81O3ud1qjAsiquyL112PSA7FPHknAfBpgpkpCWa5AA3+3Gy906j/qh6cna01esWGot27Tf6TXQEJvxKiY81H/Hhx8xGzApYE6iEFR1g6eUjvRP1QZJhgaJw6dPfFlrxJmF6q; Ford-WSL-MIG=TZGxuU2SPllwcm9mc3B3MkB3ZWJmYXJtLmRlYXJib3JuLmZvcmQuY29tAG12aW5vZAAxOS4xNTEuMTU0Ljg0AE5PTk9WVk0ANTAwMUY4OUQ1NAA/AEYATgBBUEEARk9SRC5CVVNJTkVTUy5TRVJWSUNFUy4tLklORElBAEFQQQA3NTI0AENIRU5OQUkAPwBJTkQATlVMTC5jZW50b2tzAACvVWxUpXzzdrT6KgM5tvDc1l3mGobUxj+eOvcIt2JL3LQOyr0rnYQV1oFVkPFd7GOBoUzqgqr0Zd4Ta7KXVLIj"
    basic: Applet started
    basic: Told clients applet is started
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
         at oracle.forms.fd.HandleMouseEvent2.handleComponent(HandleMouseEvent2.java:312)
         at oracle.forms.fd.HandleMouseEvent2.access$6000171(HandleMouseEvent2.java:39)
         at oracle.forms.fd.HandleMouseEvent2$2.mouseEntered(HandleMouseEvent2.java:139)
         at java.awt.AWTEventMulticaster.mouseEntered(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseEntered(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider.processMouseGrabs(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._checkTarget(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._checkTarget(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mouseEntered(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
         at oracle.forms.fd.HandleMouseEvent2.handleComponent(HandleMouseEvent2.java:312)
         at oracle.forms.fd.HandleMouseEvent2.access$6000171(HandleMouseEvent2.java:39)
         at oracle.forms.fd.HandleMouseEvent2$2.mouseExited(HandleMouseEvent2.java:135)
         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseExited(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider.processMouseGrabs(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._redispatchEvent(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._checkTarget(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp._checkTarget(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Disp.mouseExited(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEventImpl(Unknown Source)
         at oracle.ewt.event.tracking.GlassMouseGrabProvider$Proxy.processEventImpl(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.redispatchEvent(Unknown Source)
         at oracle.ewt.lwAWT.LWComponent.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    You need to initialize your array:
    double [][] expLevels = new double[10][10]; // whatever size.For an array of 'double', all values will be initialized to 0.
    It appears that the size of your array can't be known until runtime. You could maybe use an ArrayList of ArrayList of Double objects. Or, if you do know the size (if array_string will have a fixed format), you could use that size.

  • "AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame

    I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
    Exception in thread "main" java.lang.NullPointerException
    at pkg1.GUI.createFrame(GUI.java:123)
    at pkg1.GUI.startFrame2(GUI.java:66)
    at pkg1.Top.cos(Top.java:25)
    at pkg1.Top.main(Top.java:20) My code:
    GUI class
    package pkg1;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Toolkit;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    import oracle.jdeveloper.layout.XYLayout;
    public class GUI
        public JDesktopPane desktop;
        private XYLayout xYLayout1 = new XYLayout();
        public int openFrameCount = 0;
        JFrame f = new JFrame();
        public void GUII()  // Prepare JFrame
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(500, 600);
            f.setVisible(true);
        public void startFrame()
            desktop = new JDesktopPane();
            createFrame(); //create first "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void startFrame2()
            createFrame(); //create second "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void createFrame()
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true); //necessary as of 1.3
            desktop.add(frame);
            frame.add(new GUI2());
        } Top class
    public class Top
        public static void main(String[] args)
            GUI g = new GUI();
            g.GUII(); //Create JFrame
            g.startFrame(); //Create JInternalFrame
            Top t = new Top();
            t.sth();
        public void sth()
            GUI gui = new GUI();
            gui.startFrame2();
    } MyIntternalFrame class
    import javax.swing.JInternalFrame;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import oracle.jdeveloper.layout.XYConstraints;
    import oracle.jdeveloper.layout.XYLayout;
    /* Used by InternalFrameDemo.java. */
    public class MyInternalFrame extends JInternalFrame {
        static int openFrameCount =  0;      
        static final int xOffset = 30, yOffset = 30;
        private XYLayout xYLayout1 = new XYLayout();
        private JButton jButton1 = new JButton();
        private JLabel jLabel1 = new JLabel();
        private JFrame c = new JFrame();
        private JPanel d = new JPanel();
        private XYLayout xYLayout2 = new XYLayout();
        public MyInternalFrame() {         
            super("Document #"  + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            int width = new GUI2().width + 10;
            int height = new GUI2().height + 40;
            setSize(width,height);
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
    } Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another class

    Some possibly helpful suggestions:
    1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
    2) Get rid of GUII. The GUI constructor will do all this and more.
    3) Get rid of startFrame and startFrame2.
    4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
    5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
    6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
    Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane).

  • Exception JComboox :Exception in thread "AWT-EventQueue-0" java.lang.NullPo

    Hi, I mapped a vector object to the JComboBox. I'm using the observer pattern to update the ComboBox box whenever there is an message receives.If an update is received I just add the data to the vector and to refresh the ComboBox bu calling the UpdateUI() method. When more updates received same time i'm getting the following exception.
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at javax.swing.plaf.basic.BasicComboBoxUI.paintCurrentValue(BasicComboBoxUI.java:1059)
         at javax.swing.plaf.basic.BasicComboBoxUI.paint(BasicComboBoxUI.java:850)
         at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
         at javax.swing.JComponent.paintComponent(JComponent.java:740)
         at javax.swing.JComponent.paint(JComponent.java:1003)
         at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4930)
         at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4883)
         at javax.swing.JComponent._paintImmediately(JComponent.java:4826)
         at javax.swing.JComponent.paintImmediately(JComponent.java:4633)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Please assist me in fixing this issue if anyone came across this issue.
    Thanks.

    I just add the data to the vector and to refresh the ComboBox bu calling the UpdateUI() methodYou should NOT be updating the vector.
    That is NOT what the updateUI() method is used for.
    The proper way to update a component is to udate the MODEL The model will then notify the VIEW so it can repaint itself. Also, make sure the code is executed on the EDT. Read the section from the Swing tutorial on Concurrency.

  • Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError:

    hi,
    i have to build similar sql query analizer. i am using jdbc and swing.
    my frame contains jtable and jtree. jtree contains schemas and tables.
    Jtables show mysql table data, when user choose table in Jtree.
    its run first click and second.... But after a few click its doesnt run and i get this Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at com.mysql.jdbc.Buffer.getBytes(Buffer.java:198)
    at com.mysql.jdbc.Buffer.readLenByteArray(Buffer.java:318)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1345)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2330)
    at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:427)
    at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2035)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1421)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1772)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2430)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2359)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1227)
    at Database.getQueryRs(Database.java:50)
    at Database.getColumnNames(Database.java:30)
    at NewJFrame.tableDegis(NewJFrame.java:221)
    at NewJFrame.jTree1ValueChanged(NewJFrame.java:196)
    at NewJFrame.access$000(NewJFrame.java:21)
    at NewJFrame$1.valueChanged(NewJFrame.java:93)
    at javax.swing.JTree.fireValueChanged(JTree.java:2825)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3196)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
    at javax.swing.JTree.setSelectionPath(JTree.java:1600)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2410)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3619)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3558)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.Component.processMouseEvent(Component.java:6035)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt) {                                   
            try{
                DefaultMutableTreeNode node = (DefaultMutableTreeNode)
                                jTree1.getLastSelectedPathComponent();
                if (node == null) return;
                if (node.isLeaf()) {
                    if(node.getLevel() > 1){
                        System.out.println(node.getParent());
                        tableDegis(node.getParent().toString(),node.toString());
                } else {
            }catch(Exception e){
    private void tableDegis(String schema,String table){
             DefaultTableModel tablemodel = new DefaultTableModel();
             tablemodel.setDataVector(db.getData(schema,table),db.getColumnNames(schema,table));
             jTable1.setModel(tablemodel);
             System.out.println(db.getColumnNames(schema,table));
             System.gc();
    public Vector getColumnNames(String schemaName,String tableName){
              Vector<String> columnNames = new Vector<String>();
              try{
                   ResultSet rs = getQueryRs(schemaName,tableName);
                 ResultSetMetaData md = rs.getMetaData();
                   int columns = md.getColumnCount();
                 for (int i = 1; i <= columns; i++)             {
                     columnNames.addElement( md.getColumnName(i) );
              }catch(Exception e){}
              System.gc();
              return columnNames;
    public ResultSet getQueryRs(String schemaName,String tableName){
              ResultSet rs = null;
              try{
                   String sql = "Select * from "+tableName;
                            connection.setCatalog(schemaName);
                            Statement stmt3 = connection.createStatement();
                            rs = stmt3.executeQuery( sql );
              }catch(Exception e){
              System.gc();
              return rs;
    public Vector getData(String schemaName,String tableName){
            Vector<Vector<Object>> data = new Vector<Vector<Object>>();
              try{   
                        ResultSet rs = getQueryRs(schemaName,tableName);
                        ResultSetMetaData md = rs.getMetaData();
                        int columns = md.getColumnCount();
                        while (rs.next()){
                      Vector<Object> row = new Vector<Object>(columns);
                            for (int i = 1; i <= columns; i++){
                                row.addElement( rs.getObject(i) );
                            data.addElement( row );
              }catch(Exception e){}
              System.gc();
              return data;
         }

    lokesh_Kumar_Singh
    Welcome to the forum. Please don't post in old threads that are long dead. When you have a question, please start a topic of your own. Feel free to provide a link to an old thread if relevant.
    I'm locking this thread now. It's more than 1½ years old.
    db

  • Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:

    Could anyone please explain me what is this error about
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Integer
    at timetablegen.MainFrame.jButton17ActionPerformed(MainFrame.java:1816)
    at timetablegen.MainFrame.access$2100(MainFrame.java:16)
    at timetablegen.MainFrame$23.actionPerformed(MainFrame.java:1136)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    I am taking an object from jComboBox as a String and then converting it to integer & adding to the database.
    It is not getting added in database to & throwing above exception.

    Hello,
    First parse the string taken from combo box using Integer.parseInt(str), not directly cast it to Integer.
    Regards

  • ASDM Error : Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: ...

    I am receiving an exception error when launching ASDM. I have see on the web (and have experienced an issue similar to this before) where a reload resolves the issue. However, I did issue a reload and the error continues. Strange thing is, when I look at the uptime in SH TECH-SUPPORT it shows over a year . Now this firewall is on an active/passive cluster, so my question is, did the reload work on just one and the other took over and so a reload actually did not occur?
    We have an issue going on right now where it would be extremely helpful to have this console working.
    Thanks In Advance.
    JT                 
    Using JRE version 1.4.2 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\User
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    q:   hide console
    s:   dump system properties
    ASDM Application Logging Started at Tue Apr 09 09:45:02 PDT 2013
    Local DM Launcher Version = 1.5.22
    Local DM Launcher Version Display = 1.5(22)
    OK button clicked
    Cache location = C:/Documents and Settings/User/.asdm/cache
    Checking the DM Launcher Version; url = https://10.1.1.1/admin/
    Server DM Version = 6.0(2)
    Server DM Launcher Version = 1.5.22, size = 318464 bytes
    DM Launcher version checking is successful.
    invoking SGZ Loader..
    java.lang.NumberFormatException: For input string: "1 year 16"
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at com.cisco.pdm.Check.h(DashoA10*..:1339)
    at com.cisco.pdm.Check.c(DashoA10*..:842)
    at com.cisco.pdm.Check.a(DashoA10*..:442)
    at com.cisco.pdm.Check.<init>(DashoA10*..:221)
    at com.cisco.pdm.PDMApplet.start(DashoA10*..:124)
    at com.cisco.nm.dice.loader.r.run(DashoA19*..:410)

    Hello Jason,
    It could actually be that you reloaded the primary ASA and you are now looking at the secondary(now active) ASA.
    do a "show version" and  "fail exec mate sho ver" to see the up time for both active and standby ASAs.
    You can also try switching to the primary (now standby ASA) using the command "no failover active" and try to access the ASDM again.
    Regards,
    Felipe

  • Java.lang.NullPointerException in apple.awt.CTextField

    Hi,
    an applet running for many years fine on a number of Java VMs, suffers a strange problem with the Apple VM. All single-line text fields appear disabled (greyed out). On the Java console, the following exception is recorded:
    Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
    at apple.awt.CTextField$1.run(CTextField.java:45)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:29 6)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:20 1)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    As you see, this stack trace is obviously related to the problem - I guess, some state-change calls to the TextField are translated into a asynchronous event, whose handler fails. Unfortunately, this trace gives no hint at all, how to work around this problem in the apple.awt.CTextField implementation!
    Can anybody give a hint what happens in line 45 of apples CTextField implementation? Can the applet be rewritten in a way to set attributes required by this event handler?
    Greetings,
    Andreas.

    {color:red}{size:20px}CROSS POSTED{size}{color}
    [http://forums.sun.com/thread.jspa?threadID=5333376]
    Cross posting is rude.
    db

  • Java.lang.NullPointerException : Where is the bug ?!

    Hi,
    where is the bug in this method ?
    I just do not see it !
    When I run it I get the following error message
    Exception in thread "main" java.lang.NullPointerException
    at edu.clip.rerank.main.packageRec(main.java:239)
    and line 239 is the one I have indicated with <================
    Any suggestion would be immensely appreciated.
    Many thanks.
    public static RerankInstance packageRec (ArrayList chunk)
    String spanish = new String();
    String gold = new String();
    String line = null;
    boolean readingCandidates = false;
    Double lm = null;
    Double tm = null;
    Double lm_tm = null;
    ArrayList candidates = new ArrayList();
    ArrayList LM_likelihoods = new ArrayList();
    ArrayList TM_likelihoods = new ArrayList();
    ArrayList LM_TM_likelihoods = new ArrayList();
    RerankInstance foo = null;
    for (int i = 0; i < chunk.size(); i++) {
    if (!chunk.get(0).toString().startsWith("<REC>")) {
    System.out.println("PROBLEM DETECTED " + chunk.get(0));
    line = chunk.get(i).toString();
    if (line.startsWith("Spanish=")) {
    spanish = line.substring("Spanish=".length());
    System.out.println("SPANISH== " + spanish);
    else if (line.startsWith("Gold="))
    gold = line.substring("Gold=".length());
    else if (line.startsWith("<CANDIDATES>"))
    readingCandidates = true;
    else if (line.startsWith("</CANDIDATES>"))
    readingCandidates = false;
    if (spanish != null && candidates.size() > 0) {
    System.out.println("Spanish=" + spanish);
    String [] cands = (String[]) candidates.toArray(new String[0]);
    foo = new RerankInstance (spanish, cands);
    ArrayList LM_temp = new ArrayList();
    ArrayList TM_temp = new ArrayList();
    ArrayList LM_TM_temp = new ArrayList();
    if (LM_likelihoods.size() > 0 )
    Double [] LM_likes = (Double[])LM_likelihoods.toArray(new Double[0]);
    foo.setLikelihoods_single(LM_likes);
    if (TM_likelihoods.size() > 0 ){
    Double [] TM_likes = (Double[])TM_likelihoods.toArray(new Double[0]);
    foo.setLikelihoods_single(TM_likes);
    if (LM_TM_likelihoods.size() > 0 ) {
    Double [] LM_TM_likes = (Double[])LM_TM_likelihoods.toArray(new Double[0]);
    foo.setLikelihoods_single(LM_TM_likes);
    }//if
    else if (readingCandidates) {
    System.out.println("Candidate[" + line + "]");
    int ndx = line.indexOf('\t');
    candidates.add(line.substring(0,ndx));
    int ndx_a = line.indexOf('\t', ndx+1);
    int ndx_b = line.indexOf('\t', ndx_a+1);
    if (ndx_a > ndx+1) {
    lm = (line.substring(ndx+1,ndx_a)).startsWith("-Infinity") ? new Double(0) : new Double (line.substring(ndx+1,ndx_a));
    if (ndx_b > ndx_a+1) {
    tm = (line.substring(ndx_a+1,ndx_b)).startsWith("-Infinity") ? new Double(0) : new Double(line.substring(ndx_a+1,ndx_b));
    if ( ndx_b > -1) {
    lm_tm = (line.substring(ndx_b+1)).startsWith("-Infinity") ? new Double (0) : new Double(line.substring(ndx_b+1));
    try
    if (lm != null)
    LM_likelihoods.add(lm);
    if (tm != null)
    TM_likelihoods.add(tm);
    if (lm_tm != null)
    LM_TM_likelihoods.add(lm_tm);
    } catch (Exception e){ };
    }//else
    }//for
    String test = foo.getSourcePhrase().getPhrase(); <==============
    System.out.println("WHERE IS THE SOURCE " + test);
    return foo;
    } //end of method

    Foo is definatelly null because...
    Near the begining of the method foo is initialised to null.
    A load of conditional statements follow in only one of which foo is instantiated.
    If this condition is not satisfied foo will remain null.
    If that happens then you will get the error that you're getting on line 239.
    Essentially all the conditions before the above mentioned condition would have to evaluate to false for foo not to remain null by the time line 239 is executed.
    Line 239 is executed regardles of any of the conditional statements in your method, i.e. regardless of whether null is instantiated or not, in which case it remains null - hence the NullPointerException.

  • [svn] 1502: Bug: BLZ-148 - Repeat invocation of invalidate() on HttpFlexSession throws java.lang.IllegalStateException: invalidate: Session already invalidated

    Revision: 1502
    Author: [email protected]
    Date: 2008-04-30 16:36:53 -0700 (Wed, 30 Apr 2008)
    Log Message:
    Bug: BLZ-148 - Repeat invocation of invalidate() on HttpFlexSession throws java.lang.IllegalStateException: invalidate: Session already invalidated
    QA: Yes
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-148
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/HttpFlexSession.java

  • AWT-EventQueue-0 - NullPointerException

    Hello,
    did you encounter similar exception in JDeveloper 10.1.3.1?
    When I run and use our application in embedded oc4j and then return to jdeveloper I can see few nullpointer exceptions in console window.
    We are using ADF BC + ADF Faces but I think the error is related to Jdeveloper IDE.
    06/12/30 00:24:44 Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    06/12/30 00:24:44      at oracle.jbo.uicli.binding.JUCtrlAttrsBinding$mySetEnabledThread.run(JUCtrlAttrsBinding.java:53)
    06/12/30 00:24:44      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    06/12/30 00:24:44      at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    06/12/30 00:24:44      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    06/12/30 00:24:44      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    06/12/30 00:24:44      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    06/12/30 00:24:44      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    06/12/30 00:24:44      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    ok, here's the text, paste it into an empty file called jdevpatch.bat in the same directory as the unzipped files. I've just re-downloaded the patch from Oracle and the file is definately in the zip file so I'm not sure what the problem is (do you have a setting in explorer to hide files with the extension .bat?)
    remember, this text is for the 10.1.3.1 patch only!
    good luck
    @echo off
    rem Auth: BTELI 10th Jan 2007
    rem Patch application script for Jdeveloper 10.1.3.1
    if not exist .\JUCtrlAttrsBinding.class goto srchome
    if "%JDEV_HOME%" == "" goto jdevhome
    if not exist %JDEV_HOME%\BC4J\lib\adfm.jar goto jdevhome
    echo Target location of the jdev install being impacted / patched is "%JDEV_HOME%"
    echo This patch will write an install txt file in %JDEV_HOME% as a log
    echo to track patch installed on this system
    setlocal
    set BUGNUM=5718091
    set BASEBUGNUM=5642176
    @echo off
    if "%1" == "delete" goto delete
    if "%1" == "install" goto install
    echo One-off Patch generated on 1st June for PSE %BUGNUM% ( Base Bug - %BASEBUGNUM% )
    echo Usage:
    echo jdevpatch (install^|delete)
    echo install - install the Jdeveloper 10.1.3.1 patch
    echo delete - uninstall the Jdeveloper 10.1.3.1 patch
    goto end
    :install
    if exist "%JDEV_HOME%"\bug%BASEBUGNUM%.txt (
    echo ERROR: This patch for PSE Bugs %BUGNUM% for Base Bugs %BASEBUGNUM% already installed
    echo - are you trying to reinstall - if so please uninstall first and then reinstall
    goto End
    echo This script will install Jdeveloper 10.1.3.1 patch on your system!
    echo Please read the readme file before you run this script!
    pause
    :updatelib
    echo Installing Jdeveloper / BC4J patch ...
    mkdir %BASEBUGNUM%
    cd %BASEBUGNUM%
    mkdir BC4J
    cd BC4J
    mkdir lib
    cd lib
    mkdir adfm
    cd adfm
    copy %JDEV_HOME%\BC4J\lib\adfm.jar .
    mkdir oracle\jbo\uicli\binding
    echo populating the expanded adfm.jar with patched class and repackaging with patched class
    copy /Y ..\..\..\..\JUCtrlAttrsBinding.class               oracle\jbo\uicli\binding
    copy /Y ..\..\..\..\JUCtrlAttrsBinding$mySetEnabledThread.class     oracle\jbo\uicli\binding
    %JDEV_HOME%\jdk\bin\jar -uf adfm.jar oracle\*
    @echo on
    copy %JDEV_HOME%\BC4J\lib\adfm.jar %JDEV_HOME%\BC4J\lib\adfm.jar.%BASEBUGNUM%.orig
    copy adfm.jar %JDEV_HOME%\BC4J\lib\adfm.jar
    cd..
    mkdir adfui
    cd adfui
    copy %JDEV_HOME%\BC4J\jlib\adfui.jar .
    mkdir oracle\jbo\uicli\binding
    echo populating the expanded adfui.jar with patched class and repackaging with patched class
    copy /Y ..\..\..\..\JUCtrlAttrsBinding.class               oracle\jbo\uicli\binding
    copy /Y ..\..\..\..\JUCtrlAttrsBinding$mySetEnabledThread.class     oracle\jbo\uicli\binding
    %JDEV_HOME%\jdk\bin\jar -uf adfui.jar oracle\*
    copy %JDEV_HOME%\BC4J\jlib\adfui.jar %JDEV_HOME%\BC4J\jlib\adfui.jar.%BASEBUGNUM%.orig
    copy adfui.jar %JDEV_HOME%\BC4J\jlib\adfui.jar
    cd ..\..\..\..
    rd /s/q %BASEBUGNUM%
    echo %DATE% %TIME% JDev patch installed for PSE Bugs %BUGNUM% for Basebug %BASEBUGNUM% >> "%JDEV_HOME%"\bug%BASEBUGNUM%.txt
    echo Jar updated by this patch adfm.jar >> "%JDEV_HOME%"\bug%BASEBUGNUM%.txt
    echo Jar updated by this patch adfui.jar >> "%JDEV_HOME%"\bug%BASEBUGNUM%.txt
    echo Classes replaced by this patch - DCGenericDataControl.class >> "%JDEV_HOME%"\bug%BASEBUGNUM%.txt
    echo.
    echo Installed Jdeveloper 10.1.3.1 patch for PSE bugs %BUGNUM% Basebugs %BASEBUGNUM%
    goto end
    REM For removing the patch
    :delete
    if not exist "%JDEV_HOME%"\bug%BASEBUGNUM%.txt (
    echo ERROR: The patch that you are trying to un-install is not already installed or does not exist at that location
    goto end
    echo This delete option will remove the Jdeveloper 10.1.3.1 patch and restore the original Jdeveloper Libraries!
    pause
    echo Removing patched libraries and restoring pre-patch versions...
    move /Y "%JDEV_HOME%"\BC4J\lib\adfm.jar.%BASEBUGNUM%.orig "%JDEV_HOME%"\BC4J\lib\adfm.jar
    move /Y "%JDEV_HOME%"\BC4J\jlib\adfui.jar.%BASEBUGNUM%.orig "%JDEV_HOME%"\BC4J\jlib\adfui.jar
    del "%JDEV_HOME%"\bug%BASEBUGNUM%.txt
    echo Uninstalled Jdeveloper 10.1.3.1 patch for PSE bug %BUGNUM% Basebug %BASEBUGNUM%
    goto end
    rem setup Home env variables.
    :jdevhome
    echo Unable to determine the value of JDEV_HOME.
    echo set JDEV_HOME before using the patch
    echo JDEV_HOME is the root directory of the JDev install which is to be patched
    echo For example: set JDEV_HOME=d:\jdev10.1.3.1
    goto end
    :srchome
    echo Please run this from the directory to which you have etxracted the patch zip!
    goto End
    :end

  • Had to un-install JRE, again. "AWT-EventQueue-13" exception.

    Hello every body readers,
    and a Happy Christmas from me in Sweden.
    I installed latest JRE "jre1.5.0_01".
    Had to uninstall and use Microsoft java instead, AGAIN.
    Those who said to me in past: "Use IE Java. Works better" was probably right.
    As now Sun Java only occupies a considerable amont of space in my PC.
    You will probably ask me to re-write my HTMLs to fit JRE.
    Suppose IExplorer6 wasn't backwards compitable with HTML-pages.
    Most .html pages in world would have to be re-written!!!!!!!!!
    JRE makes error when trying to update MyClass.class.
    "at DJClock.update(E:\Msdev\projects\DJClock\DJClock.java:552)"
    A leftover from development stage of this software.
    Well!
    And this you offer millions of poor users around the world to download?????
    Maybe you will not recognize this fault,
    and try some political jargong 'we never do anything bad" non-excuse.
    I would simple say: "we are very sorry!" to all potential users reading this thread.
    We humans are NOT perfect. When try to appear perfect, we deny the truth.
    And we would not be credible in fellow men's eyes.
    Isn't it pathetic hear someone say:
    "I did not have seex with that woman"
    when it is obviously a big lie. :D :D
    I hope you're human at this developers site.
    I have a slight hope some few around here
    are not only "living effective programming robot machines".
    Regards and thanks for your FREE, although not working software
    /halojoy - Sweden 2004-12-29
    FACTS follows:
    In my htdocs:
    APP1-folder
         MyClass.class
         index.html(<applet codebase="." code="MyClass.class"</applet>)
    APP2-folder
         MyClass.class
         index.html(<applet codebase="." code="MyClass.class"</applet>)
    Uses same class, but I have copy at 2 places.
    First applet will run correctly.
    Second applet will generate following message:
    Exception in thread "AWT-EventQueue-13" java.lang.NullPointerException
         at sun.font.FontDesignMetrics.stringWidth(Unknown Source)
         at DJClock.update(E:\Msdev\projects\DJClock\DJClock.java:552)
         at sun.awt.RepaintArea.updateComponent(Unknown Source)
         at sun.awt.RepaintArea.paint(Unknown Source)
         at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)

    Thanks, alvareze.
    But I think you haven't read my post correctly.
    I think I provided enough information for eanyone to repeat my situation in their own computer.
    Anf find out there is a bug.
    I wish I was wrong, on behalf of users suffering from this,
    but I am sure I am right!
    So here is what you do.
    1) Take an applet, xxxxxx.class, intended for showing in a html-page.
    2) Create 2 folders at your server. Lets call them: APPL1 and APPL2
    3) Write 2 different index.html containing applet xxxxxx.class
    4) You make a copy of this Class: xxxxxx.class in EACH of two folders APPL1, APPL2
    5) Each index.html in separate folders Calls their own copy of xxxxxx.class
    in respective folder.
    6) The structure you have now is, what I ALREADY told you. (am I talking to children. No!):
    In my htdocs:
    APP1-folder
         MyClass.class
         index.html(<applet codebase="." code="MyClass.class"</applet>)
    APP2-folder
         MyClass.class
         index.html(<applet codebase="." code="MyClass.class"</applet>)
    6) Now you can visit your both websites:
    - http://root/APPL1/index.html
    running applet.
    Then visit
    - http://root/APPL2/index.html
    running same applet.
    And I am sure you will end up with same error message.
    AWT-EventQueue-13" exception.
    (see Above. And below. LISTEN CAREFULLY, I will only say this TWICE):
    Uses same class, but I have copy at 2 places.
    ##) My EXPLANATION:
    possibly causing this error, and making JRE useless for me:
    When JRE runs into a Class with same name again,
    it will update that class in its library.
    But when it does it searches, STILL, in the developers Drive E:\
    A leftover code, from developing stage.
    Instead JRE should look for MyClass.class in drive where,
    I put JRE files. In this case Drive C:\
    ##) In other words:
    - at MyClass.update(E:\Msdev\projects\MyClass\MyClass.java:552)
    should be, to avoid error
    - at MyClass.update(C:\my path to JRE\MyClass\MyClass.java:552)
    ##) First applet will run correctly.
    ##)Second applet will generate following message:
    Exception in thread "AWT-EventQueue-13" java.lang.NullPointerException
         at sun.font.FontDesignMetrics.stringWidth(Unknown Source)
         at MyClass.update(E:\Msdev\projects\MyClass\MyClass.java:552)
         at sun.awt.RepaintArea.updateComponent(Unknown Source)
         at sun.awt.RepaintArea.paint(Unknown Source)
         at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I wont bother with this again,
    as I do not like to explain myself over and over
    to people that are not REALLY interested in getting my information.
    And it will not effect me in any way, as I no longer use this free JRE from great Sun Java Laboratories.
    I stick to Microsoft Java, until you find your bugs, yourselves, fixes this software version.
    Then you tell me to download it again, please!
    Thanks again for you wish to provide us users with a super software.
    nothing wrong with your aim or goal, but ...
    maybe can strike back, when releasing not properly debugged sotware
    to millions and millions of potential users.
    Better no reputation, than bad reputation= badwill.
    So sometimes better late release than too early.
    Have seen this happen with other software version around www.
    By the time bugs are corected, customers are happily using another similiar software.
    No hard feelings.
    Happy Ne Year everybody!
    computer and internet freaks, like me
    /halojoy - in snowy northern part of Sweden (had a white christmas, as always)
    Sorry, will not be here again, talking to deaf? people :)
    in same subject
    GoodBye

  • How to handle the exception in AWT-EventQueue-0?

    This is my code:
    import javax.swing.JFrame;
    public class MainFrame extends JFrame {
         public MainFrame(){
              init();
         public void init(){
              setSize(100,100);
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    public class SubFrame extends MainFrame implements ActionListener{
         private JButton button1 = null;
         public SubFrame(){
              super();
         public void init(){
              super.init();
              button1 = new JButton("button1");
              add(button1);
              button1.addActionListener(this);
         public void actionPerformed(ActionEvent e) {
              // TODO Auto-generated method stub
              button1.setEnabled(false);
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              (new SubFrame()).setVisible(true);
    }When I click the button, this exception will be thrown:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at swing.SubFrame.actionPerformed(SubFrame.java:23)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    Darryl.Burke wrote:
    Hmm. Interesting sequence of execution.
    +-- new SubFrame () calls the sub class constructor
    +----  which calls the super class constructor explicitly
    +------  which calls init () of the sub class
    +--------  which calls init () of the super class
    and only after all these calls return, the declaration-&#99;um-assignment of button1 is executed, which makes button1 null.
    (Discovered by putting a breakpoint on that line and debugging in NetBeans)
    With one change, button1 will not be null and the breakpont is not reached.private JButton button1;// = null;What's not clear is why the declaration-&#99;um-initialization takes place after the constructor code executes, shouldn't it run before the constructor?
    It does run before the SubFrame constructor, but it runs after the super class constructor, which is exactly how the language specification says it should be.
    There was a similar thread a while back:
    http://forum.java.sun.com/thread.jspa?threadID=5190252&messageID=9745092
    Note that there is another "bad" habit involved (other than explicitly initializing member variables to null): that an overridden method is called from the super class constructor. That means that the overridden method will be executed before the object it belongs to has been fully initialized, and that will often lead to confusing behavior like this.

Maybe you are looking for

  • Photoshop CS4 Brushes not Anti Aliasing properly

    I've just set up CS4 and my brushes are not anti aliasing properly. There are no soft edges on any of them. I'm able to get a pressure sensitive opacity change on the stroke but the edges are all pixelated. Here is an image (this is a soft brush. not

  • One to Many Message Mapping

    Hi, I am doing a message mapping. Source: ======= >Structure(A,B,C,D) Target: ======= >StructX1(A,B,C,D) >StructX2(A,B,C,D) I want to map source to both targets based on a certain criteria. For example the records with A=100,200 or 300 should go to S

  • Convert SAP reports to Excel

    I ran a Balance Sheet report in SAP and "printed" it to PDF. Can I convert it into Excel with your tool ?

  • About pre loaders

    i have a scene in my flash movie that contains photos and sounds... i want to design a preloader (a progress bar) in another scene or in the same scene(using another frame) that shows the download progress of the scene. I know how to design a progres

  • Silent Install of Acrobat Pro 7.0 fails with Error 1404

    Hi, I'm trying to silently install Acrobat Pro 7.0. I have created the MST using the Installshield Tuner 7.0, and use the following command line to install: msiexec /i acropro.msi TRANSFORMS=mytransform.mst /qb I am getting the following error messag