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 200809300201) VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26 OS: Linux, 2.6.24-19-generic, i386 User Comments: marfous: 1, I create a new web app with hybernate 2, use reverse eng. from the database 3, type into package "java" 4, there is no error message 5, then invoke HQL Query and type and run some query -> exception appears Stacktrace: java.lang.SecurityException: Prohibited package name: java at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
Created attachment 70871 [details] stacktrace
Will be taken up in 7.0.
This issue belongs to j2ee.core.utilities module, since Hibernate module is using the API provided by that module. The API has this bug. According to Java Language specification, http://java.sun.com/docs/books/jls/third_edition/html/names.html#73307 'java' is a reserved package names for JDK itself and hence cannot be used for other applications.
Created attachment 74509 [details] Proposed patch.
Moving to j2ee>code (I guess this is the issuezilla component/subcomponent for j2ee.core.utilities mercurial module) Please could somebody review the attached patch for this issue ?
Comments from Erno : Hi Vadiraj, You might want to check for exact string 'java'.. and for 'java.something'.. Please update the unit tests. -Erno.
Created attachment 74680 [details] Incorporated Erno's comments.
Erno says : LGTM..
Fixed : http://hg.netbeans.org/main/rev/02721f75580d