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.
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).
Created attachment 8375 [details] WAR of web app which reproduces the problem
Created attachment 8376 [details] Source for the tag library
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.
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.
Tomas, any ideas about how to fix this ?
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?
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.
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).
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.
There are two workarounds: - set the IDE integration mode to Minimal - upgrade to JDK 1.4.2, when it is released
Downgrading to P2 per team agreement.
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?
Yes, that's fine. The IDE Integration Mode is a property on the Tomcat instance node in the Server Registry.
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.
This may also affect JSP validation, need to check JSP validation on JDK 1.4.1
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).
will not release note for 3.6
VERIFIED
removing RELNOTE keyword