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 127560 - Error using Object list as a source to a table
Summary: Error using Object list as a source to a table
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-16 21:32 UTC by cadorca
Modified: 2008-02-19 23:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cadorca 2008-02-16 21:32:38 UTC
when I try to use a List of objects as source for a visualweb table the IDE always generate a
java.lang.ClassNotFoundException for any object

Steps to reproduce:
1. Create a new visual web project
2. Create or Import some entities
3. Create a method that return a List<Some Object> for example public List<Customer> getCustomers(){ return new
LinkedList<Customer>();}
3. Add a table to the page and select the  customers as source

Trace in the log
java.lang.ClassNotFoundException: webapplication6.newpackage.NewClass
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:243)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at org.netbeans.modules.visualweb.insync.java.ClassUtil.getClass(ClassUtil.java:91)
	at org.netbeans.modules.visualweb.insync.java.ClassUtil.getClass(ClassUtil.java:106)
	at org.netbeans.modules.visualweb.insync.live.BeansDesignBeanExt.getTypeParameters(BeansDesignBeanExt.java:66)
	at com.sun.webui.jsf.component.table.TableDataProviderDesignState.<init>(TableDataProviderDesignState.java:8
Comment 1 _ sandipchitale 2008-02-19 22:50:34 UTC
For the fix for issue # 125081 ModelSet$ProjectClassLoader memory leaks the 

ClassUtil.getClass(typeName)

implementation now expects that the Thread's context Classloader is
set to the Project Classloader. The call in the BeansDesignBeanExt missed
setting it before calling ClassUtil.getClass(typeName). That resulted in:

java.lang.ClassNotFoundException
Comment 2 _ sandipchitale 2008-02-19 23:02:41 UTC
Fixed:

changeset:   68151:bb40cd75de36
tag:         tip
user:        Sandip V. Chitale <sandipchitale@netbeans.org>
date:        Tue Feb 19 14:49:57 2008 -0800
summary:     Bug Fix # 127560 Error using Object list as a source to a table