ding the whole discussion on the hibernate
site.
Kind regards,
Tobias
Von: Michael Horwitz [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 30. Juli 2007 09:45
An: users@appfuse.dev.java.net
Betreff: Re: [appfuse-user] LazyInitializationException: illegal acc
I have had a lot of problems in impelementing equals/hashcode, particularly
on entities that I wanted to include in a set. I found at one stage that
hibernate was instantiating the entity, adding it to the set, and only then
setting its properties. The net result is that the hashcode changed betwee
Matt & Michael,
It seems I finally found a solution
Checking again thru the logs I noticed that the exception was raised
everytime that my entity hashcode's method was called.
So I rechecked the Hibernate folks discussion on Equals and Hashcodes at
http://www.hibernate.org/109.html.
What I ba
private WebPageDao webPageDao = null;
public WebPageDao getWebPageDao() {
return webPageDao;
}
public void setWebPageDao(WebPageDao webPageDao) {
this.webPageDao = webPageDao;
}
public void testGetMaintenancePage() {
WebPage webPage = webPageDao.get(new Long(1));
Hi Daniel,
Could you post an example/code segment from one of your tests? It looks like
you may be trying to do something out of a transaction - unfortunately the
transaction beastie is needed for reading as well as writing...
Mike.
On 7/26/07, Daniel.Rodriguez <[EMAIL PROTECTED]> wrote:
mraible wrote:
>
> Are you trying to do something outside of a transaction? That's the
> only thing I can think of that might be causing this problem.
>
> Matt
>
>
Not that I'm aware of.
I'm not trying to save anything to the db. I'm just trying to transverse
the object graph. (check m
Matt,
Just wanted to double check the following:
1. All my mappings are bidirectional. (i.e.: for every OneToMany there is
a ManyToOne)
2. In this particular scenario I'm not using a HQL query, but I'm
navigating the object graph returned by GenericDao.get(). I'm
assuming that by using Lazy
Are you trying to do something outside of a transaction? That's the
only thing I can think of that might be causing this problem.
Matt
On 7/26/07, Daniel.Rodriguez <[EMAIL PROTECTED]> wrote:
Matt,
I double checked that, and I'm extending BaseDaoTestCase
mraible wrote:
>
> If you're get
Matt,
I double checked that, and I'm extending BaseDaoTestCase
mraible wrote:
>
> If you're getting this in a DaoTest, then you're probably not
> extending BaseDaoTestCase.
>
> Matt
>
> On 7/26/07, Daniel.Rodriguez <[EMAIL PROTECTED]> wrote:
>>
>> Hello Appfuzers,
>>
>> I'm having probl
If you're getting this in a DaoTest, then you're probably not
extending BaseDaoTestCase.
Matt
On 7/26/07, Daniel.Rodriguez <[EMAIL PROTECTED]> wrote:
Hello Appfuzers,
I'm having problems with my app. I'm trying to build a light-weight cms
(inhouse proyect) and I'm getting a LazyInitializatio
Hello Appfuzers,
I'm having problems with my app. I'm trying to build a light-weight cms
(inhouse proyect) and I'm getting a LazyInitializationException in my
*DaoTest. I already checked the following:
1.
1. Hashcode/ Equals: Generated using Commonclipse (left out the pk).
2. @OneToMany ma
11 matches
Mail list logo