-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Struts - Hibernate3 problem
PostPosted: Thu Jul 28, 2005 6:46 pm 
Newbie

Joined: Mon Oct 18, 2004 12:29 pm
Posts: 8
Hello everyone,
I'm using hibernate3.0.5 and struts 1.1. I have a problem (possibly related to reflection). Here's the thing:

In an Action I load a User, this user has many rolls, and each roll has many privileges. I go through all the privileges for that user, and store it in a Vector. Each Privilege has a forward field, in a jsp I iterate the Vector, and according to the forward field in each Privilege I print out a menu. The problem is that I get the following exception:

javax.servlet.jsp.JspException: Exception thrown by getter for property forward of bean privilege

This is because the forward field is null. In reality this field is not null, in fact, if I put somewhere in the action class a System.out.println(privilege.getForward()); the forward field gets printed correctly, and the system works fine, I get no exception!!!.
How can this be???. Another weird thing, if I debug the app, inside the action class, all the fields of the privilege object is null (but they are not!!!).

Help needed. I can send the hibernate mappings if necessary (although I they don't have anything unusual).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 28, 2005 6:48 pm 
Senior
Senior

Joined: Thu May 12, 2005 11:40 pm
Posts: 125
Location: Canada
Read the reference docs and/or HIA on the topic of lazy initialization.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.