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 82005 - Inconsistent access type error message while working with ZooApp persistence tutorial
Summary: Inconsistent access type error message while working with ZooApp persistence ...
Status: RESOLVED DUPLICATE of bug 77872
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-05 20:37 UTC by gederer
Modified: 2006-08-16 11:12 UTC (History)
0 users

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 gederer 2006-08-05 20:37:36 UTC
While working through the ZooApp persistence tutorial, after adding
@Column(name="animalName") above method getName(), IDE shows error for method
getName() with message, "Inconsistent access type in entity class because a
field in this class or its super class chain is already annotated as @Id or
@EmbeddedId."

Also, got the following stacktrace, which may or may not be related to this problem:

java.lang.RuntimeException: java.lang.IllegalArgumentException: Child tree not
found (type: 361 firstToken: 330 lastToken: 330 resource: entity/Animal.java)
	at
org.netbeans.modules.java.hints.JavaHintsProvider.getHints(JavaHintsProvider.java:159)
	at
org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.run(HintsOperator.java:260)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Caused by: java.lang.IllegalArgumentException: Child tree not found (type: 361
firstToken: 330 lastToken: 330 resource: entity/Animal.java)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:265)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:261)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.TransientElement.getASTree(TransientElement.java:77)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getPosition(MetadataElement.java:527)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ElementFinder.getElementByOffset(ElementFinder.java:43)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.getElementByOffset(ResourceImpl.java:1667)
	at
org.netbeans.modules.java.hints.JavaHintsProvider.getHints(JavaHintsProvider.java:131)
	... 3 more
Comment 1 Jiri Prox 2006-08-07 09:11:09 UTC
Can you attach the problematic class?
Comment 2 Daniel Prusa 2006-08-16 10:19:53 UTC
"IAE: Child tree not found" is a duplicate of issue 77872. 
Comment 3 Daniel Prusa 2006-08-16 11:12:01 UTC
According to the tutorial, annotation @Column(name="animalName") should be added
above field 'name', not method getName().

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