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 29657 - Valid web module does not compile
Summary: Valid web module does not compile
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Petr Jiricka
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2002-12-19 19:01 UTC by Ana.von Klopp
Modified: 2005-12-09 14:22 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
WAR of web app which reproduces the problem (24.70 KB, application/octet-stream)
2002-12-19 19:02 UTC, Ana.von Klopp
Details
Source for the tag library (100.00 KB, application/octet-stream)
2002-12-19 19:04 UTC, Ana.von Klopp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ana.von Klopp 2002-12-19 19:01:30 UTC
The following bug was reported on nbusers: 

The input sample 
application from the Jakarta taglibs does not compile in the IDE. It fails 
for the <input:textarea tag for the attribute "attributes", where the 
compiler claims that there is no setter for this method. Switching to 
minimum installation fixes the problem. 

I will attach a WAR file with 
the sample application, and a jar file with the source of the tag library. 


To reproduce, mount the sample application (I mounted it as an 
expanded directory). Use the execute action on the WEB-INF node and then, 
in the directory listing select form.jsp. The request fails with a 
compilation error for attributes. 

Stop the server from the server 
registry and set the integration to minimum. Restart the server. The 
application can now be executed. 

Justification for priority: 
compilation of a valid web module does not work (no workaround). Valid web 
modules should execute from the IDE as it is configured out of the box 
(there is a workaround for this part).
Comment 1 Ana.von Klopp 2002-12-19 19:02:32 UTC
Created attachment 8375 [details]
WAR of web app which reproduces the problem
Comment 2 Ana.von Klopp 2002-12-19 19:04:08 UTC
Created attachment 8376 [details]
Source for the tag library
Comment 3 Petr Jiricka 2003-01-22 15:29:52 UTC
Interesting problem. My initial evaluation revealed that 
the problem is in the classloader architecture of the 
internal JSP compiler. This classloader is a part of our 
code, while when the page is compiled inside the server, 
it obviously uses the server's classloader. Our 
classloader seems to confuse java.beans.Introspector, 
which then incorrectly finds BeanInfo for 
java.awt.TextArea, rather than for 
org.apache.taglibs.input.TextArea. 

Will investigate more. jspc does the right thing here, so 
we may get inspiration in their code.

Comment 4 Petr Jiricka 2003-01-23 17:01:39 UTC
Now I know exactly what the problem is. The Form editor 
module provides BeanInfo for java.awt.TextArea 
(org.netbeans.modules.form.beaninfo.awt.TextAreaBeanInfo), 
and this BeanInfo is found when Jasper looks for BeanInfo 
for class org.apache.taglibs.input.TextArea.

So the problem is not in the classloader, but in the 
BeanInfoSearchPath.


Comment 5 Petr Jiricka 2003-01-30 14:48:42 UTC
Tomas, any ideas about how to fix this ?
Comment 6 Tomas Pavek 2003-01-30 17:18:10 UTC
Known bug in JDK: 4346874 (4346874)

I almost could not believe this but it's true... Introspector really
does not care if certain BeanInfo found on search path matches to the
bean class. Moreover it looks, there's no way how it could find it out.

Probably best would be to remove the BeanInfo search path entries in
the form editor, but I'm not sure it is doable (needs some investigation).

There could be a workaround if you have control over the code which
obtains and uses the BeanInfo. Interested in it?
Comment 7 Petr Jiricka 2003-01-30 18:22:15 UTC
I am not sure if 4346874 is really our case.

However, I agree that JDK does not behave correctly here, 
so I filed a bug as well: 4810551

Unfortunately, I don't control the code which acquires the 
BeanInfo (this is the server code), and I don't even have 
control over the bean and the beaninfo (this is user 
code), so this won't help.
Comment 8 Tomas Pavek 2003-01-30 18:32:14 UTC
Sorry, the number should be 4750368. You may try jdk 1.4.2,
it's already fixed there (I've checked java.beans.Introspector code in
b15).
Comment 9 Petr Jiricka 2003-01-31 13:32:39 UTC
Ok, I tried JDK 1.4.2, and it really works. Compiling the 
page succeeds in 1.4.2.

So I suggest that we don't try to fix this for Nevada (the 
fix would be very hacky), put it into release notes and 
instead recommend the users to use JDK 1.4.2.

Comment 10 Petr Jiricka 2003-02-03 17:31:23 UTC
There are two workarounds:

- set the IDE integration mode to Minimal
- upgrade to JDK 1.4.2, when it is released
Comment 11 Petr Jiricka 2003-02-04 09:24:05 UTC
Downgrading to P2 per team agreement.
Comment 12 Patrick Keegan 2003-04-03 15:48:56 UTC
Petr, could you review this proposed release note?:

"Description: Valid web module that contains classes 
produced by the IDE's Form Editor does not compile.

Workarounds: Either
a. set the IDE integration mode to Minimal
b. upgrade to JDK 1.4.2, when it is released"

Could you explain what you mean by "IDE integration mode"? 
Is there anything else I need to explain? 
Comment 13 Petr Jiricka 2003-04-03 16:25:59 UTC
Yes, that's fine.

The IDE Integration Mode is a property on the Tomcat 
instance node in the Server Registry.
Comment 14 Patrick Keegan 2003-04-03 16:39:35 UTC
OK, I've changed the note to:

Description: Valid web module that contains classes 
produced by the IDE's Form Editor does not compile.

Workarounds (do one of the following): 
On the Runtime tab, expand the Server Registry node and 
navigate to the node for the appropriate Tomcat instance. 
Set the IDE Integration Mode property to Minimal. 
Upgrade to JDK 1.4.2, when it is released. 
Comment 15 Petr Jiricka 2004-01-15 19:22:13 UTC
This may also affect JSP validation, need to check JSP validation on
JDK 1.4.1
Comment 16 Petr Jiricka 2004-01-21 13:57:23 UTC
Ok, I tested JSP validation in the current dev build with the
application that Ana provided, on JDK 1.4.1_01, and can not reproduce
in that setup. Thus marking as fixed. QE, please verify this thoroughly.

I am not sure what exactly changed so this does not appear any more -
could be the classloading architecture in the IDE's integration with
the JSP parser, or in the JSP parser itself (now we use the one from
Tomcat 5, rather than Tomcat 4).
Comment 17 Patrick Keegan 2004-03-03 22:38:26 UTC
will not release note for 3.6
Comment 18 Jaroslav Pospisil 2005-12-09 10:16:31 UTC
VERIFIED
Comment 19 Patrick Keegan 2005-12-09 14:22:07 UTC
removing RELNOTE keyword