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 75136 - netbeans 5.5 runtime exception
Summary: netbeans 5.5 runtime exception
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-18 01:15 UTC by Rajkumar Selvaraj
Modified: 2006-06-21 15:07 UTC (History)
1 user (show)

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 Rajkumar Selvaraj 2006-04-18 01:15:23 UTC
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
	at
org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.processDocument(JEEVerificationAnnotationProvider.java:230)
	at
org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.access$100(JEEVerificationAnnotationProvider.java:63)
	at
org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider$MDRListener$1.run(JEEVerificationAnnotationProvider.java:319)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at
org.netbeans.modules.java.j2seproject.J2SEPersistenceFinder.getConfigFilesFolder(J2SEPersistenceFinder.java:67)
	at
org.netbeans.modules.java.j2seproject.J2SEPersistenceFinder.getOrm(J2SEPersistenceFinder.java:49)
	at
org.netbeans.modules.j2ee.metadata.PersistenceSupport.getOrm(PersistenceSupport.java:47)
	at
org.netbeans.modules.j2ee.persistence.dd.PersistenceUtils.getEntityMappings(PersistenceUtils.java:72)
	at
org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.processDocument(JEEVerificationAnnotationProvider.java:174)
	... 4 more
Comment 1 Tomasz Slota 2006-04-24 13:07:39 UTC
The exception is actually thrown from J2SEPersistenceFinder, it is only being
re-thrown by my code. 

Only the 2nd part of the stack trace is meaningful:

org.netbeans.modules.java.j2seproject.J2SEPersistenceFinder.getConfigFilesFolder(J2SEPersistenceFinder.java:67)
	at
org.netbeans.modules.java.j2seproject.J2SEPersistenceFinder.getOrm(J2SEPersistenceFinder.java:49)
	at
org.netbeans.modules.j2ee.metadata.PersistenceSupport.getOrm(PersistenceSupport.java:47)
	at
org.netbeans.modules.j2ee.persistence.dd.PersistenceUtils.getEntityMappings(PersistenceUtils.java:72)
	at
org.netbeans.modules.j2ee.verification.JEEVerificationAnnotationProvider.processDocument(JEEVerificationAnnotationProvider.java:174)

Martine, please have a look at it
Comment 2 Martin Krauskopf 2006-06-21 13:23:10 UTC
Umm, has nothing to do with earproject, right? I really do not know what's going
on and do not udnerstand those JavaModel APIs too much. I'm afraid I can't help
in any way here. BTW did not find J2SEPersistenceFinder class in whole
55-codebase....

Seems to me that there is missing what actually happened in the second
stacktrace - the reason (like AIOOBE in the first stacktrace). (INCOMPLETE?)

Better than using just e.printStackTrace() (JEEVerificationAnnotationProvider)
is e.g.:

  ErrorManager.getDefault().annotate(e,
      "Cannot do/acquire/process/whatever... this and that");
  ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);

Probably just reassign it to j2seproject for evaluation?
Comment 3 Tomasz Slota 2006-06-21 14:46:44 UTC
reassigning to Andrei after speaking to him
Comment 4 Andrei Badea 2006-06-21 15:07:44 UTC
Can't reproduce anymore and I made some fixes in this area recently. Please
reopen and attach stack trace if you can still reproduce.