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.
Build: NetBeans IDE Dev (Build 201012150001) VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05 OS: Windows Vista User Comments: Chiana: Was creating code for a criteriaQuery; public int count0() { CriteriaQuery<T> query = getCriteriaBuilder().createQuery(getEntityClass()); Root<T> root=query.from(getEntityClass()); query.select(root.); Query Q = getEntityManager().createQuery("select count(*) from " + getEntityName()); return ((Long) Q.getSingleResult()).intValue(); } - - - Was editing the query.select statement and had just type the "." swpalmer: invoked autocomplete (ctrl-space) while typing a method argument Chiana: Same as #455516. backed over the "." and typed it again. Stacktrace: java.lang.StackOverflowError at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3620) at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:133) at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:121) at com.sun.tools.javac.code.Type$CapturedType.accept(Type.java:1018) at com.sun.tools.javac.code.Types$MapVisitor.visit(Types.java:3620) at com.sun.tools.javac.code.Types$1.visitCapturedType(Types.java:133)
Created attachment 104255 [details] stacktrace
Created attachment 104256 [details] stacktrace Same as #455517, but positioned after the "." and pressed ctl-space.
Created attachment 104525 [details] stacktrace
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=174027
Are you able to reproduce the problem? If so, could you please create a reproducible test case and attach it to the issue? Thanks.
Seems so, but the last two reports seems to have failed reporting... Created this code; - - - package test; import javax.persistence.EntityManager; import javax.persistence.Query; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; /** * * @author Kent */ public class test<T> { private String getEntityName() { return "entity"; } private CriteriaBuilder getCriteriaBuilder() { return null; } private Class<T> getEntityClass() { return null; } private EntityManager getEntityManager() { return null; } public long testa() { CriteriaQuery<T> query = getCriteriaBuilder().createQuery(getEntityClass()); Root<T> root=query.from(getEntityClass()); query.select(root.); Query Q = getEntityManager().createQuery("select count(*) from " + getEntityName()); return ((Long) Q.getSingleResult()).intValue(); } } - - - As you see the line "query.select(root.);" is invalid, this is intentional, now, if you back over the "." and then type it again the error will trigger.
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=174027
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/9bb29c69bad1
Integrated into 'main-golden', will be available in build *201103080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9bb29c69bad1 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #193589: StackOverflowError at com.sun.tools.javac.code.Types$MapVisitor.visit - fixed.