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 75738 - IAE on refactoring packages with entity classes from database
Summary: IAE on refactoring packages with entity classes from database
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords:
: 76320 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-01 10:44 UTC by Dan Kolar
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (16.09 KB, text/plain)
2006-05-01 10:48 UTC, Dan Kolar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kolar 2006-05-01 10:44:55 UTC
build 200604281015   jdk1.5.06fcs

1) Create EJB Module on Glassfish(JavaEE 5)
2) New -> Entity Classes from Database
3) Add All -> Next
3) Create persistence on Glassfish sample database
4) Fill some package, for example 'just.one.pack' (has to contain at least one 
'.') -> Finish
5) Richt-click on package with classes -> Refactor -> Rename

In a sec you get IAE:Annotation tree not found; resource: just/one/pack/
Customer.java
Refactor on sample package name, like 'packo' works (sometimes)
Comment 1 Dan Kolar 2006-05-01 10:48:06 UTC
Created attachment 30145 [details]
messages.log
Comment 2 Erno Mononen 2006-05-02 09:31:27 UTC
Reassigning to refactoring for evaluation, doesn't seem to be related to j2ee/
refactoring.   
Comment 3 Jan Becicka 2006-05-26 12:33:12 UTC
Problem seems to be in this array initialization:
{@NamedQuery(name = "ProductCode.findByProdCode", query = "SELECT p FROM
ProductCode p WHERE p.prodCode = :prodCode"), @NamedQuery(name =
"ProductCode.findByDiscountCode", query = "SELECT p FROM ProductCode p WHERE
p.discountCode = :discountCode"), @NamedQuery(name =
"ProductCode.findByDescription", query = "SELECT p FROM ProductCode p WHERE
p.description = :description")}

annInfo.getASTree().get() returns null
It is reproducible.
Comment 4 Jan Becicka 2006-05-26 12:48:18 UTC
*** Issue 76320 has been marked as a duplicate of this issue. ***
Comment 5 Jan Becicka 2006-06-13 16:41:01 UTC
Fixed in trunk and release55

Checking in ArrayInitializationImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ArrayInitializationImpl.java,v
 <--  ArrayInitializationImpl.java
new revision: 1.8; previous revision: 1.7
done

Checking in ArrayInitializationImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ArrayInitializationImpl.java,v
 <--  ArrayInitializationImpl.java
new revision: 1.5.26.1.2.2; previous revision: 1.5.26.1.2.1
done
Comment 6 Dan Kolar 2006-06-26 09:57:18 UTC
v. build 200606220200
Comment 7 Quality Engineering 2007-09-20 12:29:46 UTC
Reorganization of java component