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.
It is not possible to compile single JSP if it is in directory with symbolic link. It is high priority issue because it blocks commit validation tests on unix build machines. To reproduce: cd /mywork mkdir linked ln -s linked symlink - start IDE and create web application in /mywork/symlink - call Compile File action on index.jsp node and you get FileNotFoundException: /mywork/linked/WebApplication1/build/web/mywork/symlink/WebApplication1/build/web/index.jsp (No such file or directory) I can reproduce it only in NB 6.0 dev builds. In NB55 it works well.
Created attachment 30361 [details] Output from compile-single-jsp target with stack trace
I don't want to fix it. The code in trunk (NB 6.0) is obsolete and fixing this is wasting time for me. We will remove it and replace with code from NB 5.5 branch. Unfortunately I don't know when it will be done the replacement. I think the latest date is after NB 5.5 FCS. So what we will do with this issue?
What changed in trunk that caused this? In 5.0 we did not have this issue, right?
This bug shows when running the C/B on RAM disk (it uses symlink to reffer the / tmp) to get better performance. In this case the xtests are failing and this prevent me to put the new fast C/B into the production. BTW one round of C/B takes only about 16minutes so it would be a great improvemt also for you.
Changing the target milestone to dev. In release55 it works.
The last comment is now one year old. Needs to be reevaluated -> changing milestone to TBD.
This should be already fixed with the new version of the jsp parser.
It is still not fixed but no more blocker for commit validation.
Created attachment 48474 [details] Output log from solaris sparc, JDK1.6.0_02.
I cannot reproduce it, it works for me. Please reopen if the problem is still there. Thanks. Ant log: compile-single-jsp: init: deps-module-jar: deps-ear-jar: deps-jar: Created dir: /home/gapon/NetBeansProjects/symlink/WebApplication7/build/web/WEB-INF/classes Created dir: /home/gapon/NetBeansProjects/symlink/WebApplication7/build/web/META-INF Copying 1 file to /home/gapon/NetBeansProjects/symlink/WebApplication7/build/web/META-INF Copying 3 files to /home/gapon/NetBeansProjects/symlink/WebApplication7/build/web library-inclusion-in-archive: library-inclusion-in-manifest: compile: Created dir: /home/gapon/NetBeansProjects/symlink/WebApplication7/build/generated/src Created dir: /home/gapon/NetBeansProjects/symlink/WebApplication7/build/generated/classes BUILD SUCCESSFUL (total time: 0 seconds) Product Version: NetBeans IDE Dev (Build 071023) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Linux version 2.6.23-gentoo running on i386; UTF-8; cs_CZ (nb) Server: Tomcat 6
I am still able to reproduce it with GlassFish v2ur1-b06. Product Version: NetBeans IDE Dev (Build 200710241200) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 System: SunOS version 5.10 running on sparc; ISO646-US; en (nb) Server: GlassFish v2ur1-b06
Created attachment 51759 [details] Recent output log.
moving opened issues from TM <= 6.1 to TM=Dev
It is open for 2 years without fix. I'm raising priority to p2.
I don't think it's P2 - why? The reporter is "not real user" (sorry Jirko :) and there's no duplicate of this issue.
Tomasi, I don't understand why it is that hard to fix it rather than talk about the priority. It is open for 2+ years without any progress. I didn't look at code but it seems that this is caused by inappropriate use of File.getAbsolutePath() and/or File.getCanonicalPath().
> Tomasi, I don't understand why it is that hard to fix it rather than talk about the priority. > It is open for 2+ years without any progress. Because we just run Ant task from GF, the code itself is not in NB. I would file an issue against GF, but I'm still not able to reproduce, it works for me (I have project in path like '/home/tomas/NetbeansProjects/<symlink>/WebProject1')... Michale, does it work for you on Mac? Thanks.
jayashri, can you try it on Mac?
Here is the result of jayashri's attempt: compile-single-jsp: init: deps-module-jar: deps-ear-jar: deps-jar: Created dir: /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/web/WEB-INF/classes Created dir: /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/web/META-INF Copying 1 file to /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/web/META-INF Copying 3 files to /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/web library-inclusion-in-archive: library-inclusion-in-manifest: compile: Created dir: /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/generated/src org.apache.jasper.JasperException: PWC6117: File "/Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/build/web/index.jsp" not found /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/nbproject/build-impl.xml:462: The following error occurred while executing this line: /Users/jayashri/test_issue76255/mywork/symlink/TestJSPIssue/nbproject/build-impl.xml:440: Java returned: 1 BUILD FAILED (total time: 1 second)
Examining jayashri's log, I think mzlamal may be correct that this could be "caused by inappropriate use of File.getAbsolutePath() and/or File.getCanonicalPath()." But the bug would be in org.apache.jasper.JspC, since org.netbeans.modules.web.project.ant.JspC simply catches and prints the JasperException thrown by org.apache.jasper.JspC. So we could file an issue against Jasper.
Issue filed, https://glassfish.dev.java.net/issues/show_bug.cgi?id=6924. (The priority of this issue could be IMHO P4, just as a reminder.)
Ok, but the bug originates in org.apache.jasper.JspC, which is apache/jasper. Just want to make sure that filing the bug against glassfish is appropriate (rather than against jasper).
this might be relevant... http://issues.apache.org/bugzilla/show_bug.cgi?id=28147
Reproducible. If I compile whole project it works. If I compile single JSP it fails. If I invoke glassfish/bin/jspc -uriroot symb-folder/WebApplication1/web -d symb-folder/WebApplication1/build/generated/src -die1 without NetBeans it works. So it seems the problem is somewhere in JspCSingle in NetBeans, not in glassfish.
-do-compile-single-jsp: Skipping /home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/generated/src because it already exists. Executing '/home/oleksiys/apps/jdks/jdk1.6.0_23/jre/bin/java' with arguments: '-classpath' '/home/oleksiys/apps/jdks/jdk1.6.0_23/lib/tools.jar:/home/oleksiys/netbeans-7.0/enterprise/ant/extra/jspcompile.jar:/home/oleksiys/netbeans-7.0/java/ant/lib/ant.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/servlet3.0-jsp2.2-api.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/glassfish-jspparser-3.0.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/jsf-2_0/jsf-api.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/jstl.jar:/home/oleksiys/netbeans-7.0/java/ant/lib/ant-launcher.jar' 'org.netbeans.modules.web.project.ant.JspCSingle' '-uriroot' '/home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/web' '-d' '/home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/generated/src' '-die1' '-schemas /resources/schemas/' '-dtds /resources/dtds/' '-sysClasspath /home/oleksiys/netbeans-7.0/java/ant/lib/ant.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/servlet3.0-jsp2.2-api.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/glassfish-jspparser-3.0.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/standard.jar:/home/oleksiys/netbeans-7.0/enterprise/modules/ext/jsf-2_0/jsf-impl.jar' '-jspc.files' '/home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/web/index.jsp' '-compilerSourceVM 1.6' '-compilerTargetVM 1.6' '-javaEncoding UTF-8' The ' characters around the executable and arguments are not part of the command. org.apache.jasper.JasperException: PWC6117: File "/home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/web/index.jsp" not found Exiting /home/oleksiys/Projects/0000/symb-folder/WebApplication1/build.xml. /home/oleksiys/Projects/0000/symb-folder/WebApplication1/nbproject/build-impl.xml:634: The following error occurred while executing this line: /home/oleksiys/Projects/0000/symb-folder/WebApplication1/nbproject/build-impl.xml:609: Java returned: 1 at org.apache.tools.ant.taskdefs.Java.execute(Java.java:111) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154) BUILD FAILED (total time: 0 seconds)
My fault, glassfish jspc fails as well: ~/Projects/0000/symb-folder$ ~/apps/glassfish/0000/glassfish3/glassfish/bin/jspc -uriroot /home/oleksiys/Projects/0000/symb-folder/WebApplication1/web -d /home/oleksiys/Projects/0000/symb-folder/WebApplication1/build/generated/src -die1 /home/oleksiys/Projects/0000/symb-folder/WebApplication1/web/index.jsporg.apache.jasper.JasperException: PWC6117: File "/home/oleksiys/Projects/0000/symb-folder/WebApplication1/web/index.jsp" not found Will reopen related GF bug.
Closing as WONTFIX per the latest comment in the corresponding GlassFish bug: http://java.net/jira/browse/GLASSFISH-6924
Verified. To allow symbolic links is forbidden by default because it is a potential security risk but it can be enabled in context.xml: <?xml version="1.0" encoding="UTF-8"?> <Context path="/myapp" allowLinking="true"> </Context>