NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NB7 Database Tutorial: problem with generic <_masterClass_> and <_detailclass>

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
xkkpafi



Joined: 11 Sep 2008
Posts: 17
Location: Thailand

PostPosted: Mon Jun 27, 2011 2:30 am    Post subject: NB7 Database Tutorial: problem with generic <_masterClass_> and <_detailclass> Reply with quote

I have followed the Java Desktop Application (using NB7) tutorial to build the Cars project and after a bit of difficulty along the way I have reached the step 1 of Running the Generated Application where one right clicks the projects node and clicks Run.

This is where the tutorial finally beats me.The result of Run is a message box One or more projects were compiled with errors. The problem seems to be syntax errors in the file CarsView.java where references to what appear to be generic types
Code:
<_masterClass_>
and
Code:
<_detailClass_>
are flagging errors.

The following list is declared in the code:

Code:
private java.util.List<_masterClass_> list;


and detail class is declared locally several times in various methods, for example:

Code:
Collection<_detailClass_> _detailEntityInitial_s = _masterEntityInitial_.get_joinCollectionCapital_();


The declaration
Code:
private java.util.List<_masterClass_> list;
is uneditable in the IDE, but even if it was I wouldn't know what to do.

In all there are 22 syntax errors returned in the compilation, all of the type:

Code:
C:\J2EE\CarsApp\src\carsapp\CarsView.java:225: cannot find symbol
symbol  : class _masterClass_


Can someone kindly help me over these difficulties as I am totally out of my depth here, and I definitely don't want to give up after getting this far. Thanks.
Back to top
areeda



Joined: 28 Aug 2008
Posts: 469
Location: Los Angeles

PostPosted: Mon Jun 27, 2011 4:36 am    Post subject: Reply with quote

Perhaps a link to the tutorial you're talking about would help us help you a little better.

From your description it sounds to me like the problem is the declaration of the _detailClass_ and _masterClass_ and not the collections that use them.

How are they declared?

Joe
Back to top
xkkpafi



Joined: 11 Sep 2008
Posts: 17
Location: Thailand

PostPosted: Mon Jun 27, 2011 9:46 am    Post subject: Reply with quote

Apologies, the tutorial is at http://platform.netbeans.org/tutorials/nbm-crud.html.

Unfortunately other users have pointed to bugs, and workarounds for other parts of the tutorial, so I guess its rife with errors which probably makes getting a working db demo application impossible.

I cannot see where the class declarations are made. There is a plethora of files generated when one creates the example DB and binds it to an application.

I think this stuff is probably a bit too difficult for me so I think I will throw in the towel and go back to JDBC and a MySql solution.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo