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 64857

Summary: [Fix Imports] does not work with certain annotations.
Product: java Reporter: mvkessel <mvkessel>
Component: UnsupportedAssignee: Daniel Prusa <dprusa>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: mvkessel
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description mvkessel 2005-09-21 20:25:06 UTC
When the following piece of EJB3 annotations is anywhere in the script
then the "Fix Import" function does not work anymore, i.e. does not seem to 
startp-up (Class EValueQuantity is not recognized). Commenting the annotations 
out 'fixes' the problem.

@Embedded @AttributeOverrides( {
        @AttributeOverride(name="quantity", column = 
@Column(name="economicQuantity") ),
                @AttributeOverride(name="unit", column = 
@Column(name="economicUnit"))
    }) 
private EValueQuantity economicQuantity;    

BTW I also have to press ALT-SHIFT-F twice, in most scripts. First to get all 
imports exept 'Serializable' and then again for 'import Serializable'. It seems 
to work like a toggle. Pressing the combination again will remove the 'import 
Serializable'. 
I suspect it also has to do with the annotations:

@Entity(access = AccessType.FIELD)
public class EUnit implements Serializable{

    @Id @Column(length=3) private String id;
   
    @ManyToOne @OrderBy("sortOrder") private EUnitType unitType;
    
    @Column(length=15) private String description;
   

Thanks for your help should you have time to get round to it.
Comment 1 Daniel Prusa 2005-10-05 10:12:07 UTC
Can you obtain and attach messages.log file after the problem occurs, please?
(this file is located in your netbeans user directory - subdirectory var\log)
Also, if is it possible, attaching your EJB project would be helpful.
Comment 2 Daniel Prusa 2005-10-14 13:52:25 UTC
RuntimeException with the message "Unexpected type of ASTree: 86" is thrown when
Fix Imports action is invoked. It is duplicate of issue 65285.

*** This issue has been marked as a duplicate of 65285 ***