This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200590 - Cannot run Java Desktop Application - Database Application
Summary: Cannot run Java Desktop Application - Database Application
Status: RESOLVED DUPLICATE of bug 134745
Alias: None
Product: guibuilder
Classification: Unclassified
Component: App Framework (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 09:17 UTC by asenk
Modified: 2011-08-04 12:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-08-02 09:17:58 UTC
Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-10-generic running on i386; UTF-8; en_US (nb)
Userdir: /home/tester/.netbeans/7.0

It is impossible to run Java Desktop Application - Database Application. This error output is shown:

Aug 02, 2011 11:07:09 AM org.jdesktop.application.Application$1 run
SEVERE: Application class desktopapplication18.DesktopApplication18 failed to launch
Local Exception Stack: 
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLNonTransientConnectionException: java.net.SocketException : Error connecting to server localhost on port 1527 with message Unknown proxy type : null.
Error Code: 40000
	at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
	at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
	at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
...

Steps to reproduce:
   1. Invoke New Project wizard
   2. Choose 'Java' Category - 'Java Desktop Application' Project and press 'Next >'
   3. Type e.g. "MyApplication" for Project Name and choose 'Database Application' shell and press 'Next >'
   4. Choose 'jdbc:derby...[[[appOnAPP | [app on APP]]' in Database Connection and change Database Table to 'PRODUCT'
   5.  Move all items at once from 'Colums to Include' to 'Available Columns' by pressing the ' << ' button
   6. Move 'PRODUCT_ID', 'MARKUP' and 'DESCRIPTION' back to 'Colums to Include' using the ' > ' button
   7. Press 'Next >'
   8. Don't change any settings on the last screen and press 'Finish' 
   9. Build and Run this project.
Comment 1 Jesse Glick 2011-08-02 11:08:02 UTC
Wrong component and version. (This template is also gone from trunk.)
Comment 2 Jan Stola 2011-08-03 09:04:40 UTC
I am sorry, I am not able to reproduce this issue. The described test case works fine on my machine. So, the problem doesn't seems as general as it is described.

The error message: "Error connecting to server localhost on port 1527 with message Unknown proxy type : null." shows that either your machine has a problem with handling of localhost (I don't expect it to be the case) or there is some proxy-related problem (<- more probable).

It would be great to fing exact conditions necessary to reproduce this problem. On the other hand, I can imagine how hard that can be. So, could you at least try whether MasterDetailForm created in the same way works?

1. Create new Java Application project (not Java _Desktop_ Application).
2. Create new Master/Detail Sample form (set up according to your steps).
3. Rebuild the project.
4. Execute the form.

If this test case works then you probably encountered a well known problem in Swing Application Framework (related to proxy handling). You can verify that by following hints in http://netbeans.org/bugzilla/show_bug.cgi?id=134745#c15
Comment 3 asenk 2011-08-04 10:42:40 UTC
So I tried to create MasterDetailForm as you described and this use case works without problems.
I also tried this use case:
        1.Create new JFrame Form in the 'myapplication' package
        2.Insert JTable from the JTable to the form
        3.Switch from Projects to Services window
        4.Select the Sample Database Connection node under 'Databases' (jdbc:derby...[[[appOnAPP | [app on APP]])
        5:If its is not connected, open its popup menu and select 'Connect'
        6.Expand 'Tables' and select 'CUSTOMER'
        7.Drag the 'CUSTOMER' table by mouse and drop it into the JTable in designer (small chain link should appear during the dragging) 
        8.Drag another table (e.g. 'PRODUCT') with holding the Ctrl key and drop it into the form 

and it also works fine.

The workarounds described in http://netbeans.org/bugzilla/show_bug.cgi?id=134745#c15 works too. So I agree, it seems to be problem in Swing Application Framework.
Comment 4 Jan Stola 2011-08-04 12:44:15 UTC
Thank you for the additional information. I am closing this issue as a duplicate of issue 134745.

*** This bug has been marked as a duplicate of bug 134745 ***