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 EE. This is high-priority because basic EE functionality is broken. Create an ejb and ejbmodule (or mount attached files) and use Export Jar action: java.lang.NullPointerException at org.openide.filesystems.FileUtil.toFile(FileUtil.java:247) at org.openide.filesystems.FileUtil.fromFile(FileUtil.java:281) at org.netbeans.modules.jarpackager.JarCreator.recognizeFile (JarCreator.java:679) at org.netbeans.modules.jarpackager.JarCreator.createJar (JarCreator.java:147) at org.netbeans.modules.jarpackager.JarCreator.createJar (JarCreator.java:106) at com.sun.forte4j.j2ee.packaging.PackagingUtil.writeJarFile (PackagingUtil.java:263) at com.sun.forte4j.j2ee.ejbmodule.EJBModuleDataObject.writeEJBJar (EJBModuleDataObject.java:2227) at com.sun.forte4j.j2ee.ejbmodule.actions.WriteEJBJarAction$1.computeClosure (WriteEJBJarAction.java:82) at org.netbeans.modules.classclosure.ClosureCompiler$Group.start (ClosureCompiler.java:93) at org.netbeans.core.compiler.CompilationEngineImpl$CompilerThread$GroupCompiler.ru n(CompilationEngineImpl.java:257) The cause is that in FileUtil.fromFile(), a recent code change caused "fo" to be referenced before it is tested for null: > if (fileName.indexOf(rootName) == 0) { > String res = fileName.substring(rootName.length()).replace (File.separatorChar, '/'); > FileObject fo = fs.findResource(res); > File file2Fo = toFile(fo); > if (fo != null && file2Fo != null && > file.equals(file2Fo.getCanonicalFile())) > list.add(fo); > }
Created attachment 3372 [details] Mount these files to get an ejbmodule
Fixed in trunk (FileUtil.java 1.54)
It seems like works fine now, verified, closed