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 133165 - Unable to attach source files to JAR in classpath
Summary: Unable to attach source files to JAR in classpath
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Freeform (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-04-18 07:55 UTC by frankioski
Modified: 2008-08-26 03:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attaching screen capture of Project Properties window (188.61 KB, image/jpeg)
2008-04-18 07:56 UTC, frankioski
Details
Attaching screen capture of the Library Manager, Classpath tab (174.91 KB, image/jpeg)
2008-04-18 07:58 UTC, frankioski
Details
Attaching screen capture of the Library Manager, Sources tab (175.48 KB, image/jpeg)
2008-04-18 07:58 UTC, frankioski
Details
Attaching screen capture of the file location of the source files. Note that ConvertUtilsBean.java exists and is selected. (117.07 KB, image/jpeg)
2008-04-18 08:00 UTC, frankioski
Details
Attaching screen capture of error message (see lower left corner of ConvertUtilsBean_not_found.JPG) (153.47 KB, image/jpeg)
2008-04-18 08:01 UTC, frankioski
Details
Attaching messages.log (45.09 KB, text/plain)
2008-04-18 08:04 UTC, frankioski
Details
Attaching screen cap "Go_to_type_6.0.JPG" showing ConvertUtils and ConvertUtilsBean can be found by "Go to Type" function, and both are in the same package. See later screen cap "ConvertUtils_not_found.JPG" to see that only the source for the one of the (194.54 KB, image/jpeg)
2008-04-19 05:04 UTC, frankioski
Details
Attaching screen cap "ConvertUtils_not_found.JPG" to show that NB 6.0 will not open the source for ConvertUtils.java through Ctrl-O even though it could open the source for ConvertUtilsBean.java. Both files reside in the same package. (222.19 KB, image/jpeg)
2008-04-19 05:07 UTC, frankioski
Details
Attaching screen cap of new file locations (shorter path name than previous path). (114.88 KB, image/jpeg)
2008-04-19 05:11 UTC, frankioski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description frankioski 2008-04-18 07:55:31 UTC
I am working on a Java web application with existing sources.
I've set up the Java Sources Classpath and added to it the Jakarta Commons BeanUtils JAR (commons-beanutils.jar); see
attached screen capture "Project_Properties2.JPG".

I then went to Library Manager and created a new library "Jakarta_Commons_BeanUtils_1.7" and added the JAR to the
Classpath and the source folder to the Source. See attached screen captures "library_manager_classpath.JPG",
"library_manager_sources.JPG", and "source_files_path.JPG".

When I used Ctrl-O to find the type ConvertUtilsBean, the IDE tells me that the file is not found (see lower left corner
of attached screen capture "ConvertUtilsBean_not_found.JPG").  "source_files_path.JPG" shows that the
ConvertUtilsBean.java exists in the folder I listed in "Jakarta_Commons_BeanUtils>1.7" library (Library Manager).
Comment 1 frankioski 2008-04-18 07:56:23 UTC
Created attachment 60389 [details]
Attaching screen capture of Project Properties window
Comment 2 frankioski 2008-04-18 07:58:02 UTC
Created attachment 60390 [details]
Attaching screen capture of the Library Manager, Classpath tab
Comment 3 frankioski 2008-04-18 07:58:42 UTC
Created attachment 60391 [details]
Attaching screen capture of the Library Manager, Sources tab
Comment 4 frankioski 2008-04-18 08:00:25 UTC
Created attachment 60392 [details]
Attaching screen capture of the file location of the source files. Note that ConvertUtilsBean.java exists and is selected.
Comment 5 frankioski 2008-04-18 08:01:37 UTC
Created attachment 60393 [details]
Attaching screen capture of error message (see lower left corner of ConvertUtilsBean_not_found.JPG)
Comment 6 frankioski 2008-04-18 08:04:53 UTC
Created attachment 60394 [details]
Attaching messages.log
Comment 7 frankioski 2008-04-18 09:39:06 UTC
Problem also exists in NB 6.0.
Without being able to attach said source, I am unable to debug the following exception:
org.apache.commons.beanutils.ConversionException
	org.apache.commons.beanutils.converters.BigDecimalConverter.convert(BigDecimalConverter.java:117)
	org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)
	org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
	org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
	org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)

Raising to P1.
Comment 8 Peter Pis 2008-04-18 10:30:10 UTC
Reassigning to "web" for evaluation.
Comment 9 Dan Kolar 2008-04-18 18:16:53 UTC
This scenatio works for me w.o any problem in NB 6.1 RC2
1) Add xy.jar to Java source classpath of web freeform project
2) Create Library xy with xy.jar and added xy sources
3) Invoke Ctrl-O, or code completion

All classes from xy.jar are offered, as they should. So closing as worksforme.

Comment 10 frankioski 2008-04-18 19:10:22 UTC
dkolar,

When you say "All classes from xy.jar are offered", do you mean that you can actually open up the source files for the
classes that appear listed in the "Go to Type" (Ctrl-O) window?

I can certainly see the classes listed in the "Go to Type" window, but I am unable to open up the source files for them.

Also, my project is a "Web Application with Existing Sources", not a "Web Free-Form Project".

Comment 11 frankioski 2008-04-19 04:36:30 UTC
I've now tested this "Go to Type" function in the following NB versions:

6.1 RC2
6.1 RC1
6.1
6.0
5.5

Only 5.5 works, but it was named "Go to Class" with the shortcut keys of Alt+Shift+O.
Comment 12 frankioski 2008-04-19 05:00:39 UTC
After moving the source folder to a different location from one with a long path
(C:\Toolbox\Jakarta\commons\src\commons-beanutils-1.7.0-src\src\java) to one with a short path (C:\Toolbox\src), "Go to
Type" is now able to get NB 6.0 to open up the source for ConvertUtilsBean.java in the Java editor (See attached screen
cap "Go_to_type_6.0.JPG").  Unfortunately, it still fails to be able to open up the source for ConvertUtils.java even
though the two source files are in the same package (See attached screen caps "ConvertUtils_not_found.JPG" and
"Go_to_type_6.0.JPG").

Strange.
Comment 13 frankioski 2008-04-19 05:04:19 UTC
Created attachment 60447 [details]
Attaching screen cap "Go_to_type_6.0.JPG" showing ConvertUtils and ConvertUtilsBean can be found by "Go to Type" function, and both are in the same package.  See later screen cap "ConvertUtils_not_found.JPG" to see that only the source for the one of the
Comment 14 frankioski 2008-04-19 05:07:04 UTC
Created attachment 60448 [details]
Attaching screen cap "ConvertUtils_not_found.JPG" to show that NB 6.0 will not open the source for ConvertUtils.java through Ctrl-O even though it could open the source for ConvertUtilsBean.java.  Both files reside in the same package.
Comment 15 frankioski 2008-04-19 05:11:32 UTC
Created attachment 60449 [details]
Attaching screen cap of new file locations (shorter path name than previous path).
Comment 16 Dan Kolar 2008-04-20 12:47:31 UTC
a) From your screenshot is evident, that icon for your project with opened Properties is "ant", and hence it is web
freeform project, as its icon differs from Web project/Web project with existing sources.
b) I tried this:
1) Opened web freeform project
2) Created new library Commons_Beans with jar and source for commons-beanutils attached
3) Added commons-beansutils.jar to Java sources classpath of web freeform project
4) Invoked Ctrl-O and looked for ConvertUtils class
5) If ConvertUtils available, went for source

When path to folder was longer, I was sometimes able to reproduce your bug. When it was shorter, everything worked as
desired (thats why at first I was unable to reproduce the bug using JCommon library). Also, if there was normal web
project with jar added to its libraries, bug was usually unreproducible. I'm not able to reproduce it 100% of time, but
just sometimes.
Comment 17 frankioski 2008-04-22 00:42:29 UTC
I see what you mean by the icon in the Projects window; I've never paid attention to it.  Interesting though because
I've never set up my projects as "Free-Form Project".  I suppose NB automatically makes the switch.

Nonetheless, I've been testing non-stop and the problem still persists for me.
Comment 18 Petr Jiricka 2008-06-10 14:31:17 UTC
Would a suitable workaround be to use the "Web project with existing sources" rather than freeform? Freeform is not
recommended in most cases. If this works with "web project with existing sources", then I would say this is a P3 priority.
Comment 19 David Konecny 2008-06-10 22:18:17 UTC
Let's resolve issue 133150 first and then I will have a look at this one. I do agree though that you should consider
using "Web project with existing sources" instead of "Web Free-form Application".
Comment 20 David Konecny 2008-06-17 23:43:15 UTC
Waiting for user's response.
Comment 21 David Konecny 2008-08-26 03:56:13 UTC
Never received any response from user.