[opencms-dev] HELP : Web User creation and Login error...

Paolo Brunasti - Agora paolo.brunasti at agora.it
Thu Oct 2 16:21:01 CEST 2003


I'm trying to create Web User and then log on the system....
I create the user from a JSP with the following code :
---------------------------
  CmsUser createdUser = cmso.addWebUser(
    USER,
    cmso.digest(PWD), 
    I_CmsConstants.C_GROUP_GUEST,
    NAME,
    additionalInfos,
    I_CmsConstants.C_FLAG_ENABLED
    );
---------------------------

It seems to work, I found the entry in the DB, and if I create the user twice I got a correct exception.
Then I try to log with the following code :
----------------------------
 CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); 
 CmsObject cmso = cms.getCmsObject(); 

 System.out.println("Logging : ["+USER+"]["+PWD+"]");
  cmso.loginWebUser(USER, PWD); 
----------------------------

But I get en exception:

Logging : [gamma][gamma]
com.opencms.core.CmsException: 10 Unknown User. Detailed error: [com.opencms.file.mySql.CmsDbAccess]gamma.
        at com.opencms.file.genericSql.CmsDbAccess.readUser(CmsDbAccess.java:10271)
        at com.opencms.file.genericSql.CmsResourceBroker.loginWebUser(CmsResourceBroker.java:4502)
        at com.opencms.file.CmsObject.loginWebUser(CmsObject.java:2342)
        at org.apache.jsp.Login_jsp_jsp._jspService(Login_jsp_jsp.java:75)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
        .....
        .....

Anybody has any idea ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20031002/007660e1/attachment.htm>


More information about the opencms-dev mailing list