jeff182 | 1 Feb 02:00
Picon

application fails to launch when database is not present

Hello All! 

I have an issue I've tried for a long time to figure out. I've used netbeans to bind a mysql database to a
jtable. This works fine as long as the db is installed, active and the db tables correspond to the bindings .
The problem is that there may be instances when the db is not present or not setup properly. (client
installation issues, etc.). 

How can I check for this condition BEFORE the application fails so as to give the user feedback as to what's
happening. Currently the application just fails at startup.

I can easily do my own try - catch on the db and all that, I just can't  seem to figure out where to do it in this instance.

Thanks in advance for any help on this.

Vladislav Kislyi | 1 Feb 12:26
Picon

Programmatically minimize topcomponent in Netbeans application

Hello everyone!
I use a TopComponent in leftSlidingSide position.

I used this code for minimize TopComponent
        this.close();
//        this.setVisible(false);
        RequestProcessor.getDefault().post(new java.lang.Runnable() {

            @Override
            public void run() {
                java.awt.EventQueue.invokeLater(new java.lang.Runnable() {

                    @Override
                    public void run() {

com.test.list.ListTopComponent.this.openAtTabPosition(0);
                    }
                });
            }
        }, 100);

It's work, but I'm confused a little bit.
Is it a right way to do this or maybe better way exists?

Geertjan Wielenga | 1 Feb 12:31
Picon
Favicon

Re: Programmatically minimize topcomponent in Netbeans application

On 02/01/2012 12:26 PM, Vladislav Kislyi wrote:
> Hello everyone!
> I use a TopComponent in leftSlidingSide position.
>
> I used this code for minimize TopComponent
>          this.close();
> //        this.setVisible(false);
>          RequestProcessor.getDefault().post(new java.lang.Runnable() {
>
>              @Override
>              public void run() {
>                  java.awt.EventQueue.invokeLater(new java.lang.Runnable() {
>
>                      @Override
>                      public void run() {
>
> com.test.list.ListTopComponent.this.openAtTabPosition(0);
>                      }
>                  });
>              }
>          }, 100);
>
> It's work, but I'm confused a little bit.
> Is it a right way to do this or maybe better way exists?
Can't you just do:

WindowManager.getDefault().findMode("leftSlidingSide").dockInto(myTopComponent)

Gj

(Continue reading)

Vladislav Kislyi | 1 Feb 14:35
Picon

Re: Programmatically minimize topcomponent in Netbeans application

On 1 February 2012 13:31, Geertjan Wielenga
<geertjan.wielenga <at> oracle.com> wrote:
> On 02/01/2012 12:26 PM, Vladislav Kislyi wrote:
>>
>> Hello everyone!
>> I use a TopComponent in leftSlidingSide position.
>>
>> I used this code for minimize TopComponent
>>         this.close();
>> //        this.setVisible(false);
>>         RequestProcessor.getDefault().post(new java.lang.Runnable() {
>>
>>             @Override
>>             public void run() {
>>                 java.awt.EventQueue.invokeLater(new java.lang.Runnable() {
>>
>>                     @Override
>>                     public void run() {
>>
>> com.test.list.ListTopComponent.this.openAtTabPosition(0);
>>                     }
>>                 });
>>             }
>>         }, 100);
>>
>> It's work, but I'm confused a little bit.
>> Is it a right way to do this or maybe better way exists?
>
> Can't you just do:
>
(Continue reading)

Geertjan Wielenga | 1 Feb 14:40
Picon
Favicon

Re: Programmatically minimize topcomponent in Netbeans application

On 02/01/2012 02:35 PM, Vladislav Kislyi wrote:
> On 1 February 2012 13:31, Geertjan Wielenga
> <geertjan.wielenga <at> oracle.com>  wrote:
>> On 02/01/2012 12:26 PM, Vladislav Kislyi wrote:
>>> Hello everyone!
>>> I use a TopComponent in leftSlidingSide position.
>>>
>>> I used this code for minimize TopComponent
>>>          this.close();
>>> //        this.setVisible(false);
>>>          RequestProcessor.getDefault().post(new java.lang.Runnable() {
>>>
>>>              @Override
>>>              public void run() {
>>>                  java.awt.EventQueue.invokeLater(new java.lang.Runnable() {
>>>
>>>                      @Override
>>>                      public void run() {
>>>
>>> com.test.list.ListTopComponent.this.openAtTabPosition(0);
>>>                      }
>>>                  });
>>>              }
>>>          }, 100);
>>>
>>> It's work, but I'm confused a little bit.
>>> Is it a right way to do this or maybe better way exists?
>> Can't you just do:
>>
>> WindowManager.getDefault().findMode("leftSlidingSide").dockInto(myTopComponent)
(Continue reading)

Javier Ortiz | 1 Feb 14:45

Re: application fails to launch when database is not present

My only suggestion would be to do a basic query for verification. You can do this in the module's installer.

Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: javier.ortiz <at> arthrocare.com

-----Original Message-----
From: jeff182 [mailto:jefff182 <at> gmail.com] 
Sent: Tuesday, January 31, 2012 7:01 PM
To: nbusers <at> netbeans.org
Subject: [nbusers] application fails to launch when database is not present

Hello All! 

I have an issue I've tried for a long time to figure out. I've used netbeans to bind a mysql database to a
jtable. This works fine as long as the db is installed, active and the db tables correspond to the bindings .
The problem is that there may be instances when the db is not present or not setup properly. (client
installation issues, etc.). 

How can I check for this condition BEFORE the application fails so as to give the user feedback as to what's
happening. Currently the application just fails at startup.

I can easily do my own try - catch on the db and all that, I just can't  seem to figure out where to do it in this instance.

Thanks in advance for any help on this.

**********
(Continue reading)

Thomas Wolf | 1 Feb 15:02

Debugger in 7.1 is flakey?


I think I saw a thread about this before, but I can't locate it to compare notes….And as a side note, until
7.1, I always had "Compile On Save" (CoS) turned off, so I don't know whether the following is just a
well-known limitation while using CoS.

Yesterday, for the first time since moving to 7.1 a few weeks ago, I had to use the debugger.  While, in
general, everything seems to work as before, I noticed that the "Apply code changes" button wasn't active
when I added a couple print statements to a method (when I previously used the debugger, this toolbar
button was always active).  When I saved via ctrl-s, after a few moments, it did become active.  But when I
selected it, the application froze permanently and I had to stop the debugging session.  I looked at the
messages.log but didn't see any exceptions - just some warning messages that seemed to do with the fact
that my breakpoints were no longer at executable positions.

Has anyone come across this?

Thnx,
Tom

p.s. a snippet from the messages.log:

WARNING: Unable to submit line breakpoint to
com.netforensics.common.ui.framework.widgets.ip.NFIPComboBox at line 174, reason: No executable
location available at line 174 in class com.netforensics.common.ui.framework.widgets.ip.NFIPComboBox.
Adding a fold that is identical with another previously added fold from the same FoldManager is not allowed.
Existing fold: [code-block] E1 <1900,3675>, desc='{...}', hash=0x245e55d, [1901, 3674] {1901, 3674};
FoldManager: org.netbeans.modules.java.editor.fold.JavaElementFoldManager <at> bd1301f     New fold:
[code-block] E1 <1900,3675>, desc='{...}', hash=0x52ae4948, [1901, 3674] {1901, 3674};
FoldManager: org.netbeans.modules.java.editor.fold.JavaElementFoldManager <at> bd1301fINFO
[org.netbeans.modules.parsing.impl.TaskProcessor]: Task: class
org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper ignored cancel for
(Continue reading)

Jiří Kovalský | 1 Feb 21:42
Picon
Favicon

Re: Debugger in 7.1 is flakey?

Hello Thomas,

    we are aware of some problems [1] but generally "Apply Code Changes" 
action should work normally in 7.1. It should neither freeze your 
application nor the debugging session itself. Yes, there is another 
similar bug [2] but it typically occured when a breakpoint suspended all 
threads.

[1] http://netbeans.org/bugzilla/show_bug.cgi?id=199643
[2] http://netbeans.org/bugzilla/show_bug.cgi?id=205133

    Do you say you can always reproduce this strange behavior? If yes, 
does it work fine when you turn off "Compile on Save" feature?

Thanks for your feedback!

-Jirka

Dne 1.2.2012 15:02, Thomas Wolf napsal(a):

> I think I saw a thread about this before, but I can't locate it to compare notes….And as a side note, until
7.1, I always had "Compile On Save" (CoS) turned off, so I don't know whether the following is just a
well-known limitation while using CoS.
>
> Yesterday, for the first time since moving to 7.1 a few weeks ago, I had to use the debugger.  While, in
general, everything seems to work as before, I noticed that the "Apply code changes" button wasn't active
when I added a couple print statements to a method (when I previously used the debugger, this toolbar
button was always active).  When I saved via ctrl-s, after a few moments, it did become active.  But when I
selected it, the application froze permanently and I had to stop the debugging session.  I looked at the
messages.log but didn't see any exceptions - just some warning messages that seemed to do with the fact
(Continue reading)

Gary Greenberg | 1 Feb 22:00

Changing the project directory name

I have created a Maven project some time ago. It was originally to test
some concepts, so I created a project with the name testitout.
Fortunately it succeeded and will be included as a module in the company
product. I changed the project name to something meaningful in the
Project properties. However, it still resides in the directory
testitout. Before submitting it to SVN I need to change the directory
name accordingly. 
I am afraid that just renaming the directory can brake my NB environment
as this name is presented .netbeans/7.0/config/Projects/extra

Can someone please tell me the right way to do this renaming.
Thanks

Mitch Claborn | 1 Feb 22:12

NB 7.1 dependent projects not compiling?

Just upgraded to NetBeans 7.1.  I have project A which uses some classes 
from project B.  In 7.0, when I changed a class in B and clicked Run for 
A, the changes would be compiled and picked up.  In 7.1 I am having to 
clean and build A before the changes show up.

Is this a new feature or a bug or is there a setting I need to tweak?

mitch


Gmane