The following snippet code (executed on JBoss 4.0.2) results in a
'classcastexception' at the point marked '<--error here'.
.........snippet start.........
for (Iterator uldi=userLogonFields.iterator(); uldi.hasNext();) {
UserLogonDetails uld = (UserLogonDetails) uldi.next(); <--error here
UserLogonViewBean ulvb = new UserLogonViewBean();
ulvb.setUserLogonFieldIndex(uld.getUserLogonFieldIndex());
ulvb.setUserLogonFieldName(uld.getUserLogonFieldName());
ulvb.setUserLogonFieldType(uld.getUserLogonFieldType());
.........snippet end..........
The code is part of a session bean that relies on an entity bean to return a
collection of value objects (instances of UserLogonDetails), so that it can
build a view bean for its caller (a servlet). The 'builder' is a Data Access
Object (DAO) that is static and called via the standard DAO mechanism generated
by the JBossIDE in Eclipse (using Bean Managed Persistence (BMP)). Everything
works fine (all EJB calls via JNDI, etc.) until it executes the indicated point.
I spent quite a bit of time debugging and trying different ways with to fix the
problem to no avail. In my humble opinion, it appears that JBoss's BMP
Persistence Manager wraps each object in $Proxy fashion and CacheKey, making
access impenetrable (unless there is a way to extract the objects that I'm not
aware of).
Has anyone found a solution to this problem? Please advise.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913327#3913327
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3913327
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user