Re: Questions about OSUser

[email protected]
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
Sorry, wrong exception.  Here is the actual exception I am getting.
===================================================================
java.lang.NullPointerException
 at com.opensymphony.module.user.User.<init>(User.java:32)
 at
com.opensymphony.module.user.UserManager.buildEntity(UserManager.java:281)
 at
com.opensymphony.module.user.UserManager.createEntity(UserManager.java:338)
 at
com.opensymphony.module.user.UserManager.createUser(UserManager.java:184)
 at com.contego.Test.main(Test.java:14)
Exception in thread "main" Process terminated with exit code 1
===================================================================

> I am having a number of problems with OSUser and I am trying to find the
> right list to post my question to.  So, if this is the wrong list then I
> am sorry.
>
> Here is a simple test that I am using:
> ===================================================================
> import com.opensymphony.module.user.UserManager;
> import com.opensymphony.module.user.DuplicateEntityException;
> import com.opensymphony.module.user.ImmutableException;
>
> public class Test
> {
>     public static void main( String[] args )
>     {
>         UserManager um = UserManager.getInstance();
>         try
>         {
>             um.createUser( "cwidhelm" );
>         }
>         catch( DuplicateEntityException e )
>         {
>             e.printStackTrace();  //To change body of catch statement use
> Options | File Templates.
>         }
>         catch( ImmutableException e )
>         {
>             e.printStackTrace();  //To change body of catch statement use
> Options | File Templates.
>         }
>
>         System.out.println( um.getGroups() );
>     }
> }
>
> ===================================================================
>
> Here is the exception that I am getting:
> ===================================================================
> com.opensymphony.module.user.DuplicateEntityException: user cwidhelm
> already exists
>  at
> com.opensymphony.module.user.UserManager.createEntity(UserManager.java:325)
>  at
> com.opensymphony.module.user.UserManager.createUser(UserManager.java:184)
>  at com.contego.Test.main(Test.java:14)
> [admin, user]
>
> ===================================================================
>
> I am using Hibernate as my persistance layer.
>
> I know that this is a wide open question.  Let me know if there is
> anything else that I can send that might help answer this.
>
> Thanks,
>
> Chris
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Opensymphony-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers
>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.