"internal server error" while trying to create an existing group

70 views
Skip to first unread message

Johan Martinsson

unread,
Oct 17, 2012, 11:49:23 AM10/17/12
to repo-d...@googlegroups.com
Hello,

We just tried to create a group twice. We were expecting an explicit error message as generated by NameAlreadyUsedException. But debugging the code we realize that something might be broken. The following lines in PerformCreateGroup 120-125
    try {
      db.accountGroupNames().insert(Collections.singleton(gn));
    } catch (OrmDuplicateKeyException e) {
      throw new NameAlreadyUsedException();
    }

Does not catch the OrmDuplicateKeyException because what is actually thrown from insert() is a generic OrmException. Following the debugger, the error is generated by
  public OrmException convertError(final String op, final String entity,
      final SQLException err) {
    if (err.getCause() == null && err.getNextException() != null) {
      err.initCause(err.getNextException());
    }
    return new OrmException(op + " failure on " + entity, err);
  }

starting at line 146 in com.google.gwtorm.schema.sql,SqlDialect

We're running the default configuration of v2.5rc0

Any ideas?


Shawn Pearce

unread,
Oct 17, 2012, 1:59:18 PM10/17/12
to Johan Martinsson, repo-discuss
What database is this? I thought the individual dialect
implementations tried to override convertError to handle conversion
from database specific error code to OrmDuplicateKeyException.

Steffen Gebert

unread,
Oct 17, 2012, 2:08:55 PM10/17/12
to repo-discuss
Hi Shawn,

we have the same with MySQL.
Yours
Steffen
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en

Johan Martinsson

unread,
Oct 17, 2012, 2:39:31 PM10/17/12
to Steffen Gebert, repo-discuss
We're using mysql as well.

I've checked, DialectPostgreSql is correctly overriding the SqlDialect.convertError, but not DialectMysql.

Should we file a an issue with gwtorm or can you think of some solution to make gerrit more resilient to this type of error?

Johan


--
Johan Martinsson

Formation : Specification by example avec Gojko Adzic à Grenoble le 6-7 novembre

Shawn Pearce

unread,
Oct 18, 2012, 10:10:55 AM10/18/12
to Johan Martinsson, Steffen Gebert, repo-discuss
On Wed, Oct 17, 2012 at 11:39 AM, Johan Martinsson
<martinss...@gmail.com> wrote:
> We're using mysql as well.
>
> I've checked, DialectPostgreSql is correctly overriding the
> SqlDialect.convertError, but not DialectMysql.
>
> Should we file a an issue with gwtorm or can you think of some solution to
> make gerrit more resilient to this type of error?

That is a bug with gwtorm. If you can fix it, you can upload it for
review to https://gerrit-review.googlesource.com/gwtorm as we
host/manage the gwtorm project too.

Johan Martinsson

unread,
Oct 19, 2012, 9:26:15 AM10/19/12
to Shawn Pearce, Steffen Gebert, repo-discuss
Sure, will do it in a few days.

Johan Martinsson
Enalean/Tuleap

Johan Martinsson

unread,
Oct 30, 2012, 4:44:39 AM10/30/12
to Shawn Pearce, Steffen Gebert, repo-discuss
Do you guys have any idea how long does it usually take for google to accept the contributors agreement? I sent the agreement on thursday and still no answer nor acknowledgement. Basically when should I start worrying.

Meanwhile the fix is just sitting around on my computer.
BR
Johan

David Pursehouse

unread,
Feb 14, 2013, 11:56:51 PM2/14/13
to repo-d...@googlegroups.com, Johan Martinsson, Steffen Gebert
> That is a bug with gwtorm. If you can fix it, you can upload it for 
> review to https://gerrit-review.googlesource.com/gwtorm as we 
> host/manage the gwtorm project too. 

A fix for this has been up for review [1] since November.

[1] https://gerrit-review.googlesource.com/#/c/39261/

David Pursehouse

unread,
May 22, 2013, 5:33:33 AM5/22/13
to repo-d...@googlegroups.com, Johan Martinsson, Steffen Gebert
I uploaded a new patch set on [1] to fix my and Dave Borowitz's review comments, but then found that the change causes test cases to fail.

Johan, are you still interested in getting this change in?  If so can you have a look and see why the test cases are failing?
Reply all
Reply to author
Forward
0 new messages