Error editing users

32 views
Skip to first unread message

dani

unread,
Oct 18, 2010, 11:12:04 AM10/18/10
to openid-server-dev
Hi to everybody:

I have installed openid-server (following the steps in tutorial) and
configured the domain, but when I am going to add a person to a user
and I save changes, the application shows an error ("OpenID is
unavailable. A general exception occurred while trying to access
OpenID. Please notify your system administrator") and Tomcat debug
don't seems to show any suspicious text.

Any idea about where is the error and why this error is generated??

Dani

Sutra Zhou

unread,
Oct 18, 2010, 12:52:52 PM10/18/10
to openid-s...@googlegroups.com
This problem may be introduced in r525 that throws exception in
getPersona, and an issue has been commit in the issue tracker, maybe
you can find the error stack trace in the stdout.log or stderr.log.
And you can checkout the r524 to avoid this problem.

> --
> You received this message because you are subscribed to the Google Groups "openid-server-dev" group.
> To post to this group, send email to openid-s...@googlegroups.com.
> To unsubscribe from this group, send email to openid-server-...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/openid-server-dev?hl=en.
>
>

Daniel Merida Barquero

unread,
Oct 25, 2010, 5:43:29 AM10/25/10
to openid-s...@googlegroups.com
I have installed openid-server in Windows, so I see the stack trace in Tomcat logs.
I have detected some errors, but I want to see deeper.
I don't understand what means r524 and r525.

Thanks in advance


2010/10/18 Sutra Zhou <zhous...@gmail.com>

Daniel Merida Barquero

unread,
Oct 25, 2010, 5:55:01 AM10/25/10
to openid-s...@googlegroups.com
The exception I received from openid-server is:
java.lang.NullPointerException
       at cn.net.openid.jos.domain.Persona.clearAttributes(Persona.java:392)
       at cn.net.openid.jos.web.controller.PersonaController.onBindAndValidate(PersonaController.java:135)
. . .

Thanks in advance
Dani


2010/10/25 Daniel Merida Barquero <informa...@gmail.com>

Sutra Zhou

unread,
Oct 25, 2010, 10:26:10 AM10/25/10
to openid-s...@googlegroups.com
On Mon, Oct 25, 2010 at 5:43 PM, Daniel Merida Barquero
<informa...@gmail.com> wrote:
> I have installed openid-server in Windows, so I see the stack trace in
> Tomcat logs.
> I have detected some errors, but I want to see deeper.
In changeset 525, I modified the method setAttributes of Persona class
from assignment to addAll, this may cause the hibernate failed.

Sutra Zhou

unread,
Oct 25, 2010, 10:34:58 AM10/25/10
to openid-s...@googlegroups.com
I think I have fixed this issue in changeset 526 and 527, you may svn
update to r527 and try it again.
By the way, r528 maybe not build with maven 2.2.1, it only build with maven 3.

Daniel Merida Barquero

unread,
Oct 25, 2010, 11:18:59 AM10/25/10
to openid-s...@googlegroups.com
How I distinguish the different reviews form openid-server?? 
The .war I have installed is the jos-webapp-1.2.1.war that is in the web page

Dani

2010/10/25 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Oct 25, 2010, 11:32:24 AM10/25/10
to openid-s...@googlegroups.com
Oh, I'm sorry, the Null Pointer Exception (NPE) when creating new
persona is decribed in issue 24 [1], not the r526 and 527.
You have to build the war by yourself, I will not release any new
version before I fix the issue 25 [2].

[1] http://code.google.com/p/openid-server/issues/detail?id=24
[2] http://code.google.com/p/openid-server/issues/detail?id=25

On Mon, Oct 25, 2010 at 11:18 PM, Daniel Merida Barquero

Daniel Merida Barquero

unread,
Oct 27, 2010, 6:32:46 AM10/27/10
to openid-s...@googlegroups.com
I have builded succesfully the last version of openid-server in svn, but I don't find any .war file in the directory /target
Where is the .war file?

Thanks in advance
Dani

2010/10/25 Sutra Zhou <zhous...@gmail.com>

Daniel Merida Barquero

unread,
Oct 27, 2010, 6:49:29 AM10/27/10
to openid-s...@googlegroups.com
Sorry, I have just found the war file. I was looking in the wrong directory.


2010/10/27 Daniel Merida Barquero <informa...@gmail.com>

Daniel Merida Barquero

unread,
Oct 29, 2010, 7:44:26 AM10/29/10
to openid-s...@googlegroups.com
I have tested the war (compiled from svn source) and the openid-server is still launching a exception in getPersona()
What can I do now?

Dani

Sutra Zhou

unread,
Oct 29, 2010, 9:44:52 AM10/29/10
to openid-s...@googlegroups.com
On Fri, Oct 29, 2010 at 7:44 PM, Daniel Merida Barquero
<informa...@gmail.com> wrote:
> I have tested the war (compiled from svn source) and the openid-server is
> still launching a exception in getPersona()
> What can I do now?
Tell me the revision and the exception stacktrace(can be found in the
logs or temp directory of tomcat).

Daniel Merida Barquero

unread,
Oct 29, 2010, 10:48:03 AM10/29/10
to openid-s...@googlegroups.com
The trace error is the same:
java.lang.NullPointerException
       at cn.net.openid.jos.domain.Persona.clearAttributes(Persona.java:392)
       at cn.net.openid.jos.web.controller.PersonaController.onBindAndValidate(PersonaController.java:135)
       at org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:398)
. . .

I don't know the number of the review, but I downloaded the source from svn on Tuesday 26

Dani



2010/10/29 Sutra Zhou <zhous...@gmail.com>

--

Sutra Zhou

unread,
Oct 29, 2010, 11:06:31 AM10/29/10
to openid-s...@googlegroups.com
Command `svn info' can find the revision information.

On Fri, Oct 29, 2010 at 10:48 PM, Daniel Merida Barquero

Daniel Merida Barquero

unread,
Nov 3, 2010, 6:50:34 AM11/3/10
to openid-s...@googlegroups.com
The version I downloaded is r528

2010/10/29 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Nov 5, 2010, 1:34:48 AM11/5/10
to openid-s...@googlegroups.com
On Wed, Nov 3, 2010 at 6:50 PM, Daniel Merida Barquero

<informa...@gmail.com> wrote:
> The version I downloaded is r528
>
> 2010/10/29 Sutra Zhou <zhous...@gmail.com>
>>
>> Command `svn info' can find the revision information.
>>
>> On Fri, Oct 29, 2010 at 10:48 PM, Daniel Merida Barquero
>> <informa...@gmail.com> wrote:
>> > The trace error is the same:
>> > java.lang.NullPointerException
>> >        at
>> > cn.net.openid.jos.domain.Persona.clearAttributes(Persona.java:392)
I checked the source, the line 392 of Persona.java [1] has no
effective code, so I guess you should execute `mvn clean' to clean the
build output before mvn package install.
[1] http://code.google.com/p/openid-server/source/browse/trunk/jos-domain/src/main/java/cn/net/openid/jos/domain/Persona.java#392

Daniel Merida Barquero

unread,
Nov 5, 2010, 6:31:16 AM11/5/10
to openid-s...@googlegroups.com
I should have supposed something like thtat.
I gonna test it and I will report to you if I find some troubles

Dani

2010/11/5 Sutra Zhou <zhous...@gmail.com>

Daniel Merida Barquero

unread,
Nov 8, 2010, 11:07:32 AM11/8/10
to openid-s...@googlegroups.com
Finally, I have added the attributes of a person in a JOS OpenID account.
Now, the problem is in the domain configuration, because every time I reload Tomcat and then try to access to the Server URL, the application applies to me to "configure an unresolved domain". This is the normal behaviour?

Dani

2010/11/5 Daniel Merida Barquero <informa...@gmail.com>

Sutra Zhou

unread,
Nov 8, 2010, 8:51:22 PM11/8/10
to openid-s...@googlegroups.com
On Tue, Nov 9, 2010 at 12:07 AM, Daniel Merida Barquero
<informa...@gmail.com> wrote:
> Finally, I have added the attributes of a person in a JOS OpenID account.
> Now, the problem is in the domain configuration, because every time I reload
> Tomcat and then try to access to the Server URL, the application applies to
> me to "configure an unresolved domain". This is the normal behaviour?
> Dani
Maybe you haven't yet config the database section. As default, it
stores data in memory, after you stop tomcat, the data should be lost.

Daniel Merida Barquero

unread,
Nov 10, 2010, 7:48:56 AM11/10/10
to openid-s...@googlegroups.com
I configure the database as the install guide explains, but I think that I have made a mistake in some point.

I have copied context.xml (now jos.xml) in <tomcat>\work\Catalina\localhost\ directory, with the following content:

<Context>

<!-- ================ DATASOURCE SETTING ================ -->

<Resource
name="jdbc/jos"
type="javax.sql.DataSource"
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:mem:jos"
username=<user that I have created in mysql>
password=<password for this user> />

<!-- ================ MAIL SESSION SETTING ================ -->
          <Resource
name="mail/Session"
type="javax.mail.Session"
mail.smtp.host="smtp.gmail.com"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
mail.smtp.socketFactory.fallback="false"
mail.smtp.port="993"
mail.smtp.socketFactory.port="993"
mail.smtp.auth="true"
mail.smtp.timeout="10000"
mail.smtp.from=<a Gmail account>
mail.smtp.user=<a Gmail account>
mail.smtp.password=<password for this account> />

<!-- ================ HIBERNATE SETTINGS ================ -->

// I haven't modified this tag
<Environment
name="hibernate.dialect"
type="java.lang.String"
value="org.hibernate.dialect.HSQLDialect" />
<Environment
name="hibernate.hbm2ddl.auto"
type="java.lang.String"
value="update"
override="false" />

<!-- ================ DOMAIN CONFIGURATOR SETTING ================ -->

        <Environment
name="domain.configurator.password"
type="java.lang.String"
value=<mysql password>
override="false" />

</Context>

The rest of the file is commented. Do you see where can be the mistake?
Dani



2010/11/9 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Nov 10, 2010, 9:00:56 AM11/10/10
to openid-s...@googlegroups.com
On Wed, Nov 10, 2010 at 8:48 PM, Daniel Merida Barquero
<informa...@gmail.com> wrote:
> I configure the database as the install guide explains, but I think that I
> have made a mistake in some point.
> I have copied context.xml (now jos.xml) in <tomcat>\work\Catalina\localhost\
> directory, with the following content:
> <Context>
> <!-- ================ DATASOURCE SETTING ================ -->
> <Resource
> name="jdbc/jos"
> type="javax.sql.DataSource"
> driverClassName="org.hsqldb.jdbcDriver"
> url="jdbc:hsqldb:mem:jos"
This line should be change to your mysql url, you can google `mysql
jdbc url' for help.

> username=<user that I have created in mysql>
> password=<password for this user> />
> <!-- ================ MAIL SESSION SETTING ================ -->
>           <Resource
> name="mail/Session"
> type="javax.mail.Session"
> mail.smtp.host="smtp.gmail.com"
> mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
> mail.smtp.socketFactory.fallback="false"
> mail.smtp.port="993"
> mail.smtp.socketFactory.port="993"
> mail.smtp.auth="true"
> mail.smtp.timeout="10000"
> mail.smtp.from=<a Gmail account>
> mail.smtp.user=<a Gmail account>
> mail.smtp.password=<password for this account> />
> <!-- ================ HIBERNATE SETTINGS ================ -->
> // I haven't modified this tag
> <Environment
> name="hibernate.dialect"
> type="java.lang.String"
> value="org.hibernate.dialect.HSQLDialect" />
And this line should change to mysql dialect of hibernate, google
`hibernate mysql dialect' for help.

Daniel Merida Barquero

unread,
Nov 15, 2010, 5:17:18 AM11/15/10
to openid-s...@googlegroups.com
> url="jdbc:hsqldb:mem:jos"
> This line should be change to your mysql url, you can google `mysql jdbc url' for help.

I have put the value "jdbc:mysql://192.168.4.6/mysql" for the URL

In terms of Hibernate Settings, I have uncommented all the properties and made no changes in the values
        
        <Environment
name="hibernate.dialect"
type="java.lang.String"
value="org.hibernate.dialect.HSQLDialect" />
<Environment
name="hibernate.hbm2ddl.auto"
type="java.lang.String"
value="update"
override="false" />
<Environment
name="hibernate.show_sql"
type="java.lang.String"
value="true"
override="false" />
<Environment
name="jdbc.fetch_size"
type="java.lang.String"
value="50"
override="false" />
<Environment
name="jdbc.batch_size"
type="java.lang.String"
value="25"
override="false" />

After making these changes, I keep on having the problem with storing database and every time I reload tomcat, the data are lost.
Are these changes correct?

Dani



2010/11/10 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Nov 15, 2010, 6:38:06 AM11/15/10
to openid-s...@googlegroups.com
You missed the SQL Dialect setting:

> <Environment
> name="hibernate.dialect"
> type="java.lang.String"
> value="org.hibernate.dialect.HSQLDialect" />
And this line should change to mysql dialect of hibernate, google
`hibernate mysql dialect' for help.

On Mon, Nov 15, 2010 at 6:17 PM, Daniel Merida Barquero

Daniel Merida Barquero

unread,
Nov 16, 2010, 10:45:56 AM11/16/10
to openid-s...@googlegroups.com
After a lot of attempts, openid-server runs correctly in my computer. 
Thank you very much for your help.

Now, I have a very big question about the way it works...
  • I have a webpage that receives some OpenID attributes via HTTP parameters. I have a kind of "WAYF" that let me choosing bettween different OpenID providers like, Google, Yahoo and now my own OpenIDP. 
  • I use a fragment of code that makes the redirection between the WAYF, the chosen OpenIDP and my webpage, but when I choose my OpenIDP or the demo OpenIDP in http://www.openid.org.cn/, I don't know how to configure this in order the server sends me all the attributes for the user that has been authenticated
How can I do that?

Dani


2010/11/15 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Nov 16, 2010, 11:03:14 AM11/16/10
to openid-s...@googlegroups.com
Sorry, what does 'WAYF' mean? I don't know about that, so I haven't
caught your requirement.

On Tue, Nov 16, 2010 at 11:45 PM, Daniel Merida Barquero

Daniel Merida Barquero

unread,
Nov 16, 2010, 11:07:49 AM11/16/10
to openid-s...@googlegroups.com
Sorry, a WAYF service means "Where Are You From". It shows a list of possible IDP in you can make the authentication and you have to choose one. In this case, this list is composed by Google OpenIDP, Yahoo OpenIDP and now my OpenIDP

Dani


2010/11/16 Sutra Zhou <zhous...@gmail.com>

Sutra Zhou

unread,
Nov 16, 2010, 11:13:21 AM11/16/10
to openid-s...@googlegroups.com
Is this one: http://code.google.com/p/openid-selector/ ?
or could you please give me a demo URL.

On Wed, Nov 17, 2010 at 12:07 AM, Daniel Merida Barquero

Daniel Merida Barquero

unread,
Nov 16, 2010, 11:22:01 AM11/16/10
to openid-s...@googlegroups.com
No, I use something like that, but made by me. 
I am going to test with it.

Sutra Zhou

unread,
Nov 16, 2010, 11:27:45 AM11/16/10
to openid-s...@googlegroups.com
What parameters of the OP(OpenID Provider) you need then?

The openid.server and openid2.provider is http://www.openid.org.cn/server .

On Wed, Nov 17, 2010 at 12:22 AM, Daniel Merida Barquero

Reply all
Reply to author
Forward
0 new messages