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.
On "NetBeans IDE 5.0 Quick Start Guide for J2EE Applications" page of Getting Started guide it says: "The IDE creates the CMP bean for the CUSTOMER table and for any tables that are referenced from CUSTOMER (DISCOUNT_CODE)." Well, the IDE did NOT create the CMP bean for DISCOUNT_CODE. How should the IDE know that the DISCOUNT_CODE table is referenced from CUSTOMER table? Maybe if I knew the answer for this question I could resolve this problem. Or is it an issue in the documentation?
The IDE decides based on the foreign keys. When you browse the database in the Runtime tab, you should be able to see them. Does not look like a documentation issue, should work. Could you please try this in the latest NetBeans 5.5 daily build? Thanks.
Created attachment 31670 [details] Tables view
As you can see in the attachment, the foreign key is there. What you cannot see, the discount_code table is also there. Still, the same problem persists. I'm sorry, but I don't have the time to test v5.5.
The attached image doesn't prove the foreign keys are retrieved correctly. The greenish column icon means the column is an indexed one, not that it is a foreign key. You can check that the foreign keys are retrieving by expanding the Foreign Keys node under the table node. However, given that you are running MySQL and that MySQL only supports foreign keys with the InnoDB engine, which is not the default one, I think there just aren't any foreign keys to retrieve in this case. Look at issue 79736 for more information about primary keys on MySQL. Closing as invalid, please reopen with further details (such as that the foreign keys are visible under the Foreign Keys node) if I made a wrong assumption.
No, you were absolutely right, it works fine with InnoDB tables. Thanks a lot! One last question, if I may. It may be a little bit OFF topic. I have this well- known "javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK " error message. I can see what to do if I had Derby but I have MySQL? Everything seems OK with JDBC resources, and I can browse the database on Runtime pane anyway, so why the error message? What must be done in general?
Sorry, I have never heard about this exception, so I have no idea. Try asking on the nbj2ee@netbeans.org mailing list.
This exception has been mentioned in "Troubleshooting" section of the "NetBeans IDE 5.0 Quick Start Guide for J2EE Applications" (http://www.netbeans.org/kb/50/quickstart-j2ee.html#Troubleshooting) but I will do as you told me and ask this elsewhere. Thanks for your help anyway!
Final words I've found the solution on page http://www.netbeans.org/kb/faqs/database- connectivity.html#FaqDatabaseConnectivityError2. To put it short, the jar file containing the jdbc driver had to be copied under the application server (in my case it was mysql-connector-java-3.0.11-stable-bin.jar to be copied to c:\Sun\AppServer\lib directory).