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.
Summary: | facade generation gives code that not compile due to keywords | ||
---|---|---|---|
Product: | javaee | Reporter: | kretes <kretes> |
Component: | Persistence | Assignee: | Dongmei Cao <dongmeic> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | dump file requested in the error message |
Description
kretes
2007-04-19 20:47:02 UTC
We can add some more validation on the package name in the wizard the same is for other keywords & reserved words when this is the name of entity ( and it is probable that you hava a Package or Class entity.. ). For Class - there are even harder errors, because the code generation gives: Annotation: An error occurred during parsing of 'E:\dokumenty\NetBeansProjects\EnterpriseApplication1\EnterpriseApplication1-ejb\src\java\org\bartczak\facade\ClassFacade.java'. Please report a bug against java/source and attach dump file 'C:\Documents and Settings\Tomek\.netbeans\dev\var\log\ClassFacade_3.dump'. Annotation: An error occurred during parsing of 'E:\dokumenty\NetBeansProjects\EnterpriseApplication1\EnterpriseApplication1-ejb\src\java\org\bartczak\facade\ClassFacade.java'. Please report a bug against java/source and attach dump file 'C:\Documents and Settings\Tomek\.netbeans\dev\var\log\ClassFacade_3.dump'. An error occurred during parsing of 'E:\dokumenty\NetBeansProjects\EnterpriseApplication1\EnterpriseApplication1-ejb\src\java\org\bartczak\facade\ClassFacade.java'. Please report a bug against java/source and attach dump file 'C:\Documents and Settings\Tomek\.netbeans\dev\var\log\ClassFacade_3.dump'. An error occurred during parsing of 'E:\dokumenty\NetBeansProjects\EnterpriseApplication1\EnterpriseApplication1-ejb\src\java\org\bartczak\facade\ClassFacade.java'. Please report a bug against java/source and attach dump file 'C:\Documents and Settings\Tomek\.netbeans\dev\var\log\ClassFacade_3.dump'. Caused: java.lang.NullPointerException at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:574) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:499) at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:485) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:632) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:499) at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:485) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:632) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:1300) at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1131) at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1094) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:445) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:425) at org.netbeans.api.java.source.JavaSource.moveToPhase(JavaSource.java:1367) at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1710) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) [catch] at java.lang.Thread.run(Thread.java:595) when generating and when opening the facade class, and rest of generation is stopped. the generated facade class looks like this: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.bartczak.facade; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.bartczak.model.Class; /** * * @author Tomek */ @Stateless public class ClassFacade { @PersistenceContext private EntityManager em; public void create(Class class) { em.persist((ERROR)); class <error> { } } public void edit(Class class) { em.merge((ERROR)); class <error> { } } } This may be treated as another issue, because the editor id throwing NPE for *some* code - and it shouldn't never I assume. Created attachment 71447 [details]
dump file requested in the error message
low priority NetBeans.org Migration: changing resolution from LATER to WONTFIX |