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.
reproducible with 100615, ubuntu 10.04 32bit java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing) 1.5 Gb system memory start 6.9 ide start dev ide from 6.9 (may be with less system memory can be reproduced without .9) create j2se project create all entities from derby db I have(schema will be attached) progress is slowed and finally oom is logged in output
Created attachment 100129 [details] schema
Created attachment 100130 [details] exception log
We analyzed the heap dumps with Tomas Hurka and found that there are unreferenced objects from eclipse link which are not freed and the classes are not unloaded. There was only single reference to them from j.l.ref.Finalizer.unfinalized which is very strange (there were not in the reference queue). We sent the dump to JVM team to help us.
I've integrated an URLClassLoader cache which improves the speed of generation of entity classes and also decreases a load of the PermGen. jet-main 46c9541b5ae8
Integrated into 'main-golden', will be available in build *201006170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/46c9541b5ae8 User: Tomas Zezula <tzezula@netbeans.org> Log: #187653:OOM when entities from db are generated - cache
it looks like the fix make it better/faster, but I see next output WARNING [org.netbeans.modules.java.source.indexing.JavaIndex]: Not enough memory to compile folder: /tmp/WebApplication1/src/java if try to regenerate entities in web project(have ap in editor enabled by default)
Finally I was able to create a standalone test case showing the problem. Honza L. has sent it to JVM team. When evaluated I will add more info.
Hi, any update on this issue? Dafe just completed the fix for bug 181861 (JPA metamodel generation in Maven), and this bug is the last problem preventing the integration of both 178108 and 181861 into 6.9.1. I am thinking what is the workaround. It sounds like the workaround should be to disable annotation processors in the editor for this project, and turn off compile (deploy) on save, is that correct? Or is this problem still there after these steps?
Sorry, no response yet.
Tomas, can some api be added to disable/enable ap processing? It may be useful to workaround the issue and also help with any case with a lot of classes generation to avoid processing after each class addition and after classes modifications (like first create base entity, then add content, it's likely current realization process first one and then second).
There is already a possibility how to turn off APs. The AnnotationProcessingQuery.Result has a method annotationProcessingEnabled() which returns a Set{ON_SCAN,IN_EDITOR}. When empty no APs will be run. The result of the method is controlled by the project properties (for j2seproject annotation.processing.enabled, annotation.processing.enabled.in.editor). But if you disable ON_SCAN the Compile On Save will not work :-(
From project properties I can set corresponding properties to false(temporary for generation "transaction"). But It will require additional persistence PersistenceAnnotationSupportProvider (or similar) to be added and called from persistence code. In my sugession I'm asking about something like AnnotationProcessingQuery::enable() and AnnotationProcessingQuery::disable() if possible as I know I can access AnnotationProcessingQuery from base ide from project lookup.
Adding AnnotationProcessingQuery::enable() and AnnotationProcessingQuery::disable() may be dangerous as anyone may turn off the AP and destroy the CoS.
*** Bug 188311 has been marked as a duplicate of this bug. ***
Depends on the patch in eclipse link.
a bit better in 2.2 now, also it's easy to remove eclipselink ap registration now without switch off ap processing completely.
FYI, the bug on the EL side is https://bugs.eclipse.org/bugs/show_bug.cgi?id=322921
Integrated into 'main-golden', will be available in build *201010190000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fb7c8d6827bc User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #187653 - part to fix in web project (workaround on eclipselink+nb side), works with newer eclipselink library only
Changes for supported ant projects are submitted, need to update el library when will be available. Right now have no ideas what to do with maven support as it's likely do not use same properties for ap.
http://hg.netbeans.org/main-silver?cmd=changeset;node=7aba89a5a4ca part for all supported ant projects. Jesse, can you give a hint how to add ap parameters used by scanning/parsing to maven projects?
(In reply to comment #20) > how to add ap parameters used by scanning/parsing to maven projects? You should start by defining the appropriate parameters to maven-compiler-plugin in the POM. Then file an RFE in projects/maven blocking bug #184952 for MavenAnnotationProcessingQueryImpl to interpret them.
> need to update el library when will be available. Sergey just did this yesterday: http://hg.netbeans.org/main-silver/rev/6a4ade1abcb9 So only now the bug is fully fixed for Ant.
Hi Sergey, could you please update the EclipseLink library also in the beta branch? Thanks.
http://wiki.netbeans.org/HgHowTos if I got it right still operates with clones, do we have similar FAQ for releases as branches?
Transplanted to the beta branch: http://hg.netbeans.org/releases/rev/969713370db4
Integrated into 'main-golden', will be available in build *201011110000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6a4ade1abcb9 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: fix #187653 eclipselink 2.2.0 m4
let's have separate issue for maven projects as it's another internally and require separate fix. Petr, shoould it be P2?