You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by EMike <mi...@neurosoft.fr> on 2002/09/30 16:00:02 UTC
MySQL : problem removing user
Hi all !
(English is not my native language, so please forgive my grammar errors...)
I just configured Jetspeed to talk MySQL for user authentication, using the scripts found in the distribution (1.4b1).
I am able to create users via the administrative portlets, i can see them in the MySQL tables, but i can't delete them...
In Jetspeed, i got "Database Delete Failure. Please report this error to your Database Administrator.".
In the logs, i see :
java.sql.SQLException: General error: Cannot delete a parent row: a foreign key constraint fails
at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
at com.workingdogs.village.Record.saveWithDelete(Unknown Source)
at com.workingdogs.village.Record.save(Unknown Source)
at com.workingdogs.village.Record.save(Unknown Source)
at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:700)
at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:563).
Is it a MySQL configuration problem ?
Anyone can help ?
Thanks in advance
Mike
Re: MySQL : problem removing user
Posted by EMike <mi...@neurosoft.fr>.
information i forgot to mention :
MySQL 4.0.3-beta-max-nt (InnoDB)
> (Suite)
>
> The problem is that jetspeed tries to remove a user in the TURBINE_USER
> table, without removing first the foreign key dependencies in the
> TUBINE_USER_GROUP_ROLE table.
>
> Does Jetspeed rely on a "cascade delete" done by MySQL ? (i don't know if
> it's possible and how to configure that)
>
> Help would be really appreciated ;o)
>
> Thanks
>
> Mike
>
>
>
> Hi all !
>
> (English is not my native language, so please forgive my grammar
errors...)
>
> I just configured Jetspeed to talk MySQL for user authentication, using
the
> scripts found in the distribution (1.4b1).
> I am able to create users via the administrative portlets, i can see them
in
> the MySQL tables, but i can't delete them...
>
> In Jetspeed, i got "Database Delete Failure. Please report this error to
> your Database Administrator.".
>
> In the logs, i see :
> java.sql.SQLException: General error: Cannot delete a parent row: a
foreign
> key constraint fails
> at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
> at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
> at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
> at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
> at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
> at com.workingdogs.village.Record.saveWithDelete(Unknown Source)
> at com.workingdogs.village.Record.save(Unknown Source)
> at com.workingdogs.village.Record.save(Unknown Source)
> at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:700)
> at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:563).
>
> Is it a MySQL configuration problem ?
> Anyone can help ?
>
> Thanks in advance
>
> Mike
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: MySQL : problem removing user
Posted by EMike <mi...@neurosoft.fr>.
I solved the problem in a way...
I used the "ON DELETE CASCADE" feature of InnoDB (ON DELETE CASCADE on all
foreign keys)
CREATE TABLE TURBINE_USER_GROUP_ROLE
(
USER_ID INTEGER NOT NULL,
GROUP_ID INTEGER NOT NULL,
ROLE_ID INTEGER NOT NULL,
PRIMARY KEY(USER_ID,GROUP_ID,ROLE_ID),
FOREIGN KEY (USER_ID) REFERENCES TURBINE_USER (USER_ID) ON DELETE
CASCADE,
FOREIGN KEY (GROUP_ID) REFERENCES TURBINE_GROUP (GROUP_ID) ON DELETE
CASCADE,
FOREIGN KEY (ROLE_ID) REFERENCES TURBINE_USER_ROLE (ROLE_ID) ON DELETE
CASCADE
);
It works, users and all dependancies in other tables are deleted.
This solved my problem but i don't know if a kind of ON DELETE CASCADE
feature is implemented in other table formats (ISAM etc..).
I think ORACLE supports that...
Good luck marian.
Mike
> Hi Mike!
> I'm experiencing the *same behaviour* using ORACLE database caused by the
> *same reason*. I was planning to post this issue, but you have jumped the
> queue Mike:))
> Anybody know about this bug ?
> Thx.
> $kala.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: MySQL : problem removing user
Posted by Marian Skalsky <ms...@euromove.sk>.
Hi Mike!
I'm experiencing the *same behaviour* using ORACLE database caused by the
*same reason*. I was planning to post this issue, but you have jumped the
queue Mike:))
Anybody know about this bug ?
Thx.
$kala.
----- Original Message -----
From: "EMike" <mi...@neurosoft.fr>
To: "Jetspeed Users List" <je...@jakarta.apache.org>
Sent: Monday, September 30, 2002 4:12 PM
Subject: Re: MySQL : problem removing user
> (Suite)
>
> The problem is that jetspeed tries to remove a user in the TURBINE_USER
> table, without removing first the foreign key dependencies in the
> TUBINE_USER_GROUP_ROLE table.
>
> Does Jetspeed rely on a "cascade delete" done by MySQL ? (i don't know if
> it's possible and how to configure that)
>
> Help would be really appreciated ;o)
>
> Thanks
>
> Mike
>
>
>
> Hi all !
>
> (English is not my native language, so please forgive my grammar
errors...)
>
> I just configured Jetspeed to talk MySQL for user authentication, using
the
> scripts found in the distribution (1.4b1).
> I am able to create users via the administrative portlets, i can see them
in
> the MySQL tables, but i can't delete them...
>
> In Jetspeed, i got "Database Delete Failure. Please report this error to
> your Database Administrator.".
>
> In the logs, i see :
> java.sql.SQLException: General error: Cannot delete a parent row: a
foreign
> key constraint fails
> at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
> at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
> at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
> at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
> at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
> at com.workingdogs.village.Record.saveWithDelete(Unknown Source)
> at com.workingdogs.village.Record.save(Unknown Source)
> at com.workingdogs.village.Record.save(Unknown Source)
> at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:700)
> at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:563).
>
> Is it a MySQL configuration problem ?
> Anyone can help ?
>
> Thanks in advance
>
> Mike
>
>
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: MySQL : problem removing user
Posted by EMike <mi...@neurosoft.fr>.
(Suite)
The problem is that jetspeed tries to remove a user in the TURBINE_USER
table, without removing first the foreign key dependencies in the
TUBINE_USER_GROUP_ROLE table.
Does Jetspeed rely on a "cascade delete" done by MySQL ? (i don't know if
it's possible and how to configure that)
Help would be really appreciated ;o)
Thanks
Mike
Hi all !
(English is not my native language, so please forgive my grammar errors...)
I just configured Jetspeed to talk MySQL for user authentication, using the
scripts found in the distribution (1.4b1).
I am able to create users via the administrative portlets, i can see them in
the MySQL tables, but i can't delete them...
In Jetspeed, i got "Database Delete Failure. Please report this error to
your Database Administrator.".
In the logs, i see :
java.sql.SQLException: General error: Cannot delete a parent row: a foreign
key constraint fails
at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
at org.gjt.mm.mysql.PreparedStatement.executeUpdate(Unknown Source)
at com.workingdogs.village.Record.saveWithDelete(Unknown Source)
at com.workingdogs.village.Record.save(Unknown Source)
at com.workingdogs.village.Record.save(Unknown Source)
at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:700)
at org.apache.torque.util.BasePeer.doDelete(BasePeer.java:563).
Is it a MySQL configuration problem ?
Anyone can help ?
Thanks in advance
Mike
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>