db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Derby confuse with SWing Application Framework
Date Thu, 27 May 2010 07:29:54 GMT
On 27.05.10 02:50, Hawkx wrote:
>
> Bryan Pendleton-3 wrote:
>    
>> I'm not sure why the block occurred, but when you specified the IP
>> address for your server to listen on, all connection requests must be
>> made to that IP address.
>>
>>      
> Sorry, I'm busy in working these days.
> I make a test at office, It blocking always. I waited for it at least six
> minutes.I press CTRL+C, then it closed without any message.
>
> Thanks for your help.
>
> Enviroment:
> Netbeans Version: NetBeans IDE 6.8 (Build 200912041610)
> Java: 1.6.0_19; Java HotSpot(TM) Client VM 16.2-b04
> System: Windows XP Version 5.1; x86 ; GB18030; zh_CN (nb)
>
> Library:
> appframework-1.0.3
> swing-worker-1.1
> derby-10.6.1
>
> Code:
>    @Action
>    public void testDerbyBlocking() {
>      try {
>        InetAddress ia = InetAddress.getByName("0.0.0.0");
>        NetworkServerControl nsc = new NetworkServerControl(ia, 1527);
>        nsc.start(null);
>        System.out.println(nsc.getSysinfo());
>        nsc.shutdown();
>      } catch (Exception ex) {
>        ex.printStackTrace();
>      }
>    }
>    

Running this test (on OpenSolaris) I see one out of two results:
  a) It succeeds and I see the sysinfo output.
  b) The server hasn't come up when nsc.getSysinfo() is run and I get a 
"Connect refused" error. Adding a short sleep after the start command 
fixes this issue.

Maybe there is a problem on you machine, or maybe it is a bug in Derby.
It would be helpful if you could do what Bryan suggested - obtain the 
stack trace from the Java process when it is hanging.
Besides from what Bryan mentioned, you can also use jstack (or visualvm) 
to do this.


Regards,
-- 
Kristian

Mime
View raw message