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.

Bug 205304 - Page with custom tag library contained in external jar and "Test compile all JSP files" does not compile with Clean and Build
Summary: Page with custom tag library contained in external jar and "Test compile all ...
Status: REOPENED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 17:00 UTC by bakarirum
Modified: 2016-07-08 19:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Requested Log file per David's request (200.17 KB, text/plain)
2011-11-28 12:15 UTC, bakarirum
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bakarirum 2011-11-18 17:00:00 UTC
Steps to reproduce.

1) Create Web Project.
2) Add Project reference to Java Library (Jar) that contains a Tag Library Class.
3) Add TLD to either META-INF or WEB-INF
4) Create a new JSP file.
5) Add reference to Tag Library in JSP page.
6a) Press F9 to compile JSP (error occurs)
6b) Right Click project and go to properties.
    i) Under "Build->Compiling" section, check the "Test compile all JSP files during builds".
    ii) Clean and Build Project (JSP fails to compile).

Sample Error Message:

org.apache.jasper.JasperException: file:C:/myprojects/project1/build/web/index.jsp(71,8) PWC6032: Unable to load tag handler class "com.test.standard.Heading" for tag "test:Heading"
org.apache.jasper.JasperException:  PWC6032: Unable to load tag handler class "com.test.standard.Heading" for tag "test:Heading"
C:/myprojects/project1/build/web/index.jsp(71,8)
C:\myprojects\project1\nbproject\build-impl.xml:666: The following error occurred while executing this line:
C:\myprojects\project1\nbproject\build-impl.xml:641: Java returned: 1
BUILD FAILED (total time: 0 seconds)


I have verified that the class library is in the path.  If I deploy the application, the application runs.  So the problem is with adding the dependent project jars to the classpath of JSP Compiler.
Comment 1 David Konecny 2011-11-20 20:48:08 UTC
In output window there is a toolbar with settings button which opens Ant properties where Ant Verbosity can be increased to Verbose or Debug. Doing that and rebuilding a project would produce very useful output for evaluation of this issue - it will dump classpath with which the JSPC is called. Could you do this please and attach the output? Thx.
Comment 2 bakarirum 2011-11-28 12:15:56 UTC
Created attachment 113573 [details]
Requested Log file per David's request

David,

  I am sorry for the delay on this, but I was on vacation last week.  Here is the requested log file from the "DEBUG" log ant script log.

Thanks.
Comment 3 sproulsa 2012-07-19 16:15:10 UTC
So here's some info on this.... ready for it?
Im running Glassfish V 2.1.  In order to solve this issue I need to uncheck 'deploy on save'.  Once I do that and run again, no issue.Seems to always solve the issue for me.  

I;ve been struggling with this for about 6 months...at work...  never linked it to 'deploy on save' until today but that is EXACTLY what seems to cause it, for me.

Details (copied from an email I sent out):

<begin email>

I wrote my own tabs tag.  I copied a tabs tag taht I had from IT, and called it a different name.  We were running out of room (width) on the bottom level, we needed to grow up with the tabs.

Create a new project, grab the source code from clear case, add my library files, run in development mode from the netbeans IDE 6.9.1 and I get:  

PWC6032: Unable to load tag handler class "globalModules.tabs.tags.CreateTopTabsTag" for tag "tabs:toptabs"

Yes, all the tag code is in place to support this development.  Side note: a non debug deployment on 8080 behaves correctly and deployment on test (4848) and the production glassfish 2.1 app server behaves correctly, nop issue ever.

I’ve been banging my head trying to figure out what the issue is for months and I just figured it out…...

In the netbeans IDE, if  I right click on the project, select “Run” and uncheck the Deploy on Save option (see below),  and re deploy via netbeans IDE debug mode, the site behaves perfectly. 

NOW, if I stop the app, delete the build and dist directory, REcheck "deploy on save" and redeploy in debug mode the issue shows back up.

Deploy oni save is always checked when you create a new project.  IIRC, deploy on save is fairly new and people complain about it being slow....but I digress....

<end email>

Good luck guys.
Comment 4 Martin Balin 2016-07-07 08:55:36 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 5 bakarirum 2016-07-08 19:17:33 UTC
I just used Build 201607080002 and the error still occurs.

Used the same steps above to reproduce.  The classpath under Project Properties -> Libraries -> Compile-time libraries are not being added to the compile classpath of the JSP.  The tag library source code is in a Dependent NetBeans Project that is is not "packaged".