You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Benoit Costes (JIRA)" <ji...@apache.org> on 2009/10/29 11:16:59 UTC

[jira] Created: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
-------------------------------------------------------------------------------------------------------------------------------

                 Key: CAY-1297
                 URL: https://issues.apache.org/jira/browse/CAY-1297
             Project: Cayenne
          Issue Type: Bug
          Components: Cayenne Core Library
    Affects Versions: 3.0M6
         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
            Reporter: Benoit Costes
            Priority: Critical


I launch a test project in my eclise.
When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception

If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Benoit Costes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771962#action_12771962 ] 

Benoit Costes commented on CAY-1297:
------------------------------------

Ok.

Thank you!

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771393#action_12771393 ] 

Andrus Adamchik commented on CAY-1297:
--------------------------------------

> And i have the same schema name in the DataMap => Entity Defaults => DB Schema 

Did you also click "update" next to DB Schema to set it on all tables? 

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Benoit Costes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771403#action_12771403 ] 

Benoit Costes commented on CAY-1297:
------------------------------------

Yes i did.

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Olga Tkachova (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771453#action_12771453 ] 

Olga Tkachova edited comment on CAY-1297 at 10/29/09 4:22 PM:
--------------------------------------------------------------

I agree. I reproduced this bug. I look it now. 

  
> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Benoit Costes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771387#action_12771387 ] 

Benoit Costes commented on CAY-1297:
------------------------------------

Here the JDBC URL : jdbc:mysql://localhost:3306/awn3?autoReconnect=true
And i have the same schema name in the DataMap => Entity Defaults => DB Schema

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-1297:
---------------------------------

    Priority: Minor  (was: Critical)
    Assignee: Andrus Adamchik

Thanks for the bug report. We'll take a look. Could you tell us what JDBC URL you are using to  connect (you can replace the actual names in it if this is confidential, but I'd like to see the format). And also do you have schema explicitly defined for the tables in the DataMap?

Thanks.

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1297) ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771875#action_12771875 ] 

Andrus Adamchik commented on CAY-1297:
--------------------------------------

Olga did some investigation and we had an offline chat with her. The problem here is that what Cayenne assumes to be a "schema" in MySQL, is actually a "catalog" in JDBC terms. MySQL driver treats it as a catalog anyways, and thinks there's no schemas at all, just catalogs, each one corresponding to a MySQL database.

There's no official support for cross-catalog naming resolution in Cayenne. You can actually trick MySQL by specifying catalogs as schemas to access multiple MySQL databases in runtime via the same connection. This works rather well in general, except for JDBC metadata driven operations (essentially ThrowOnPartialSchemaStrategy).

The workaround for you is to remove the schema name completely from the table definitions in Cayenne model. This will work if you access a single MySQL DB, and won't work if you have multiple DB's in the same model. (Note that the rest of Cayenne will work in the later case as well, as mentioned above). 

> ThrowOnPartialSchemaStrategy strategy generate a CayenneRuntimeException : Schema mismatch detected: no schema schemaname in db
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAY-1297
>                 URL: https://issues.apache.org/jira/browse/CAY-1297
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M6
>         Environment: Windows XP, Cayenne 3.0M6, Eclipse Galileo, Mysql 5.1, Mysql connector for 5.1, jdk1.6.0_16
>            Reporter: Benoit Costes
>            Assignee: Andrus Adamchik
>            Priority: Minor
>
> I launch a test project in my eclise.
> When i try the ThrowOnPartialSchemaStrateg and the ThrowOnPartialOrCreateSchemaStrategy, a CayenneRuntimeException with the message "Schema mismatch detected: no schema schemaname in db" is thrown on the DataContext commitChange() method.
> I tried with a schema where the tables already exist and with another one where the tables don't exist and i have the same exception
> If i select the CreateIfNoSchemaStrategy or SkipSchemaUpdateStrategy strategy the program does not thrown Exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.