Actually what ever i put into the DynamicUser.hbm.xml (only tested in the
User class though) makes it fail. 

Sure I want to put it together, but I thought I should start out simple
(I've changed the one-to-one to a property, with same result)..

Am I not supposed to change the classname here to MyUser?

  <component
    role="org.apache.fulcrum.security.UserManager"
    class="org.apache.fulcrum.security.hibernate.HibernateUserManagerImpl"> 
    <className>com.corp.prod.security.hibernate.MyUser</className>  
  </component>   

I mean the changes I apply to the DynamicUser.hbm.xml must be provided in a
class somewhere, and I must refer to this class somewhere too...

/martin

-----Original Message-----
From: Eric Pugh [mailto:[EMAIL PROTECTED] 
Sent: 29. juni 2004 14:50
To: Turbine Users List
Subject: RE: Subclassing DynamicUser..

It's kinda of a cheap answer but..  Do you need the one-to-one?  Why not
just have your subclassed user have a single table instead of both?

Also, if the original works fine, then try and add a one-to-one on the
original..  Just to verify that it is the one-to-one causing it (not sure
why it would though)..

Eric

> -----Original Message-----
> From: Martin Wendel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 29, 2004 12:59 PM
> To: 'Turbine Users List'
> Subject: RE: Subclassing DynamicUser..
>
>
> I forgot to say, if i remove the one-to-one from the User it works, so it
> must be something i'm missing trying to extend it?
>
> /M
>
> -----Original Message-----
> From: Martin Wendel [mailto:[EMAIL PROTECTED]
> Sent: 29. juni 2004 12:55
> To: 'Turbine Users List'
> Subject: RE: Subclassing DynamicUser..
>
> Ok i've solved the other problem, but now i have this one which is a bit
> more tricky.
>
> Running the antelope example again, still trying to subclass the
> dynamicuser.
>
> When i try to run this line (abstractcreatetestuser):
>
> HibernateService hibernateService = (HibernateService)
> lookup(HibernateService.ROLE);
>
> it gives me this error:
>
> junit.framework.AssertionFailedError:
> org.apache.avalon.framework.component.ComponentException: Could not access
> the Component (key [net.sf.hibernate.avalon.HibernateService])
> at junit.framework.Assert.fail(Assert.java:47)
> at com.webcellcorp.affection.HibernateCreateUsersTest.setUp
>
>
>
> The mapping files look like this:
>
>
> <class name="User" table="USER" >
> <id name="id" type="long" column="USER_ID" unsaved-value="0">
> <generator class="native"/>
> </id>
> <one-to-one name="profile" class="Profile"/>
> </class>
>
>
> <class name="Profile" table="profile" lazy="true">
> <id name="id" column="profile_id" type="long">
> <generator class="foreign">
> <param name="property">user</param>
> </generator>
> </id>
> <one-to-one name="user" class="User" constrained="true"/>
> </class>
>
>
>
> What am i doing wrong?
>
> /Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to