Announcement Announcement Module
Collapse
No announcement yet.
How to connect with mysql - inf. always stay at user disable Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


        • #5
          Re: How to connect with mysql - inf. always stay at user dis

          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.

          Comment

          Working...
          X