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.
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).
Created attachment 60389 [details] Attaching screen capture of Project Properties window
Created attachment 60390 [details] Attaching screen capture of the Library Manager, Classpath tab
Created attachment 60391 [details] Attaching screen capture of the Library Manager, Sources tab
Created attachment 60392 [details] Attaching screen capture of the file location of the source files. Note that ConvertUtilsBean.java exists and is selected.
Created attachment 60393 [details] Attaching screen capture of error message (see lower left corner of ConvertUtilsBean_not_found.JPG)
Created attachment 60394 [details] Attaching messages.log
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.
Reassigning to "web" for evaluation.
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.
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".
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.
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.
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
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.
Created attachment 60449 [details] Attaching screen cap of new file locations (shorter path name than previous path).
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.
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.
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.
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".
Waiting for user's response.
Never received any response from user.