Results 1 to 5 of 5

Thread: How to connect with mysql - inf. always stay at user disable

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Default How to connect with mysql - inf. always stay at user disable

    i have to make ma master work - i have already done it but now i'm doing authorization & authentication users with mysql and this is problem
    when i change web.xml and appcontext.xml to use with acegi sec. sys. and also change my base the information on web page always stayed at 'user is disabled' it's big problem why i'm beggining in java &spring
    Could you give me comprehensive answer how should i do it.
    I made in the base new tables : users(username (str), password(str), enabled(bool)) ; authorities(username (str), authority(str), and add new user usname:jur pass:jur enabled:T ; authorities usname:jur auth:ROLE_SUPERVISOR and....
    could any one help me plisss

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Take a look in the Acegi Security "hsqldb" directory. It contains a script which has the schema (and sample insert commands) which is by default supported by JdbcDaoImpl. Failing that, please post your application context for DaoAuthenticationProvider and JdbcDaoImpl as well as the table schema as your database reports it.

  3. #3
    Join Date
    Oct 2004
    Posts
    2

    Default

    thnx very much - now the app see that somebody is a supervisor but it stay in login form so when you are entering to app & loging (us,pass) the app welcome and refresh the page acegilogin and you have to loging one more time etc. and so go in infinity . I don't need define DaoApplicationManager because i use hibernate and his base-mapping so i need only def <ref> to datastore where i define another things which are important to connecting with the base.

    thanks in advance

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    DaoApplicationManager: what's that?

    I'm having difficulty understanding your email. Typically problems with infinite loops of the login form are related to your AuthenticationDao failing to return a valid UserDetails object. This seems especially likely given your initial post related to database problems.

    Switch on debug level logging for net.sf.acegisecurity.providers.dao as well as any package that contains the AuthenticationDao implementation you're using. You mention Hibernate, so that would suggest you've implemented a Hibernate-backed AuthenticationDao, so perhaps try posting its code to this forum if you don't have any success. Or prove your schema and configuration is correct by using the net.sf.acegisecurity.providers.dao.jdbc.JdbcDaoImp l. Please ensure you post these debug-level messages if you need any further help.

  5. #5
    Join Date
    Nov 2004
    Location
    Beijing,China
    Posts
    18

    Default Re: How to connect with mysql - inf. always stay at user dis

    Quote Originally Posted by ossi
    i have to make ma master work - i have already done it but now i'm doing authorization & authentication users with mysql and this is problem
    when i change web.xml and appcontext.xml to use with acegi sec. sys. and also change my base the information on web page always stayed at 'user is disabled' it's big problem why i'm beggining in java &spring
    Could you give me comprehensive answer how should i do it.
    I made in the base new tables : users(username (str), password(str), enabled(bool)) ; authorities(username (str), authority(str), and add new user usname:jur pass:jur enabled:T ; authorities usname:jur auth:ROLE_SUPERVISOR and....
    could any one help me plisss
    maybe you should use 1 instead of T for your enabled column

    because when you use BOOL type, value 0 "means" false, all non-zero values - TRUE

    in my case ,i use such script to populate mysql db
    Code:
    INSERT INTO USERS VALUES 'marissa','a564de63c2d0da68cf47586ee05984d7',1&#41;;
    INSERT INTO USERS VALUES&#40;'peter','22b5c9accc6e1ba628cedc63a72d57f8',0&#41;;
    it works fine.

Similar Threads

  1. Problem with HibernateInterceptor
    By prane in forum Data
    Replies: 5
    Last Post: Oct 16th, 2007, 08:01 AM
  2. LDAPPasswordAuthenticationDao problem
    By benoit_m35 in forum Security
    Replies: 15
    Last Post: Jan 11th, 2006, 07:04 AM
  3. Replies: 3
    Last Post: Sep 22nd, 2005, 10:14 AM
  4. Replies: 38
    Last Post: May 11th, 2005, 02:49 PM
  5. Replies: 2
    Last Post: Apr 27th, 2005, 02:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •