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 183613 - Entity From DB / EJBs from Entity generators are broken
Summary: Entity From DB / EJBs from Entity generators are broken
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-07 02:54 UTC by David Konecny
Modified: 2010-04-09 04:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (416.48 KB, text/plain)
2010-04-07 02:54 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2010-04-07 02:54:13 UTC
While testing bug 180583 I got completely different errors. I created new Web Project and used Entity from DB wizard to generate entities for all DBs from sample DB. The operation was very slow - several minutes and I noticed that IDE output contained dozens to exceptions:

INFO [com.sun.tools.javac.processing.JavacProcessingEnvironment]: 
 Annotation processing error:
java.lang.IllegalArgumentException: sibling == null
org.netbeans.modules.java.source.parsing.OutputFileManager.getFileForOutput(OutputFileManager.java:183)
[...]

I followed with EJBs from Entity wizard and similarly the process was even slower. The same exceptions were thrown and after a while OutOfMemory exception was thrown. IDE log with exceptions attached.

  Product Version         = NetBeans IDE Dev (Build 100407-2b6de6b17c30) (#2b6de6b17c30)
  Operating System        = Linux version 2.6.24-24-generic running on i386
  Java; VM; Vendor        = 1.6.0_17; Java HotSpot(TM) Client VM 14.3-b01; Sun Microsystems Inc.
Comment 1 David Konecny 2010-04-07 02:54:58 UTC
Created attachment 96827 [details]
IDE log
Comment 2 Sergey Petrov 2010-04-07 05:33:51 UTC
I saw these exceptions before but without OutOfMemory.
Comment 3 Tomas Zezula 2010-04-07 07:27:25 UTC
I will look at this.
Comment 4 Sergey Petrov 2010-04-07 08:04:38 UTC
If it will be hard to do something on ap side, may be disabling ap processing during entity generation can help.
Comment 5 Tomas Zezula 2010-04-07 18:44:18 UTC
I've fixed the exceptions. The OOM is PermGen, right?
Probably eclipselink does lots of intern, I've downloaded sources to take a look.
Comment 6 Tomas Zezula 2010-04-07 18:56:12 UTC
One question, does the wizard all modification using runModifiacationtask or does it also some changes without the lock?
Comment 7 Sergey Petrov 2010-04-07 20:25:32 UTC
main code for entity from db generation is located in org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator::runImpl()
and looks like main generation is with runModificationTask usage. But can't say if something is done without a lock, need to verify.
Comment 8 David Konecny 2010-04-07 21:47:02 UTC
Disabling EclipseLink annotation processor (via project's UI) make the problem go away.
Comment 9 Tomas Zezula 2010-04-08 10:00:08 UTC
fixed in jet-main: d200ddfcf9aa
Comment 10 Tomas Zezula 2010-04-08 10:05:24 UTC
fixed in jet-main: d200ddfcf9aa
Comment 11 Quality Engineering 2010-04-09 04:52:23 UTC
Integrated into 'main-golden', will be available in build *201004090201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d200ddfcf9aa
User: Tomas Zezula <tzezula@netbeans.org>
Log: #183613:Entity From DB / EJBs from Entity generators are broken