0 Replies Latest reply on Nov 27, 2006 9:35 AM by Test Tester

    findUserByUserName Problem

    Test Tester Newbie

      Hi,
      when i try to find a User on this way:

      User user = userModule.findUserByUserName(UserName);
      

      i get following error:

      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
      ... 274 more
      Caused by: java.lang.ClassCastException: org.jboss.portal.identity.db.UserImpl
      at $Proxy148.findUserByUserName(Unknown Source)
      at TreeBacker.check_access(TreeBacker.java:100)
      at TreeBacker.get_tree_rek(TreeBacker.java:139)
      at TreeBacker.getTreeData(TreeBacker.java:232)
      ... 279 more


      Can anybody help me? Do I need to work with Transactions? If yes, how does this work?

      I want to user the User to get his Role...

      thx
      Marc