This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Well you code looks a bit more complicated than it needs to be. I am also not sure why you are using Vectors and Arrays.
To your question though.
You will get this exception if you try to access unfetched data outside of a session context.
A few possible solutions:
1. You can either make sure you only access this when the session is still open
2. Trigger a lazy load before while the entity is still attached (i.e. by accessing the lazily loaded propertes)
3. Change your Fetch strategy to Eager
4. Change your HQL to eagerly fetch (look at the fetch keyword)