You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christian Müller (Commented JIRA)" <ji...@apache.org> on 2012/01/08 22:12:39 UTC

[jira] [Commented] (CAMEL-4152) jdbc idempotent repository - table creation

    [ https://issues.apache.org/jira/browse/CAMEL-4152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182292#comment-13182292 ] 

Christian Müller commented on CAMEL-4152:
-----------------------------------------

Thanks Julian for looking at this. I changed the log output slightly.

For the case the table already exists you will see:
{code:java}
log.debug("Expected table for JdbcMessageIdRepository exists");
{code}

For the case the table doesn't exists and we could create it:
{code:java}
log.debug("creating table for JdbcMessageIdRepository because it doesn't exist...");
...
log.info("table created with query '{}'", createString);
{code}


For the case the table doesn't exists and we couldn't create it:
{code:java}
log.debug("creating table for JdbcMessageIdRepository because it doesn't exist...");
...
log.error("Can't create table for JdbcMessageIdRepository with query '{}' because of: {}. This may be a permissions problem. Please create this table and try again.", createString, e.getMessage());
throw dae;
{code}
and we rethrow this exception to Camel and starting of the Camel context will fail. This is the same if the password, url, ... is wrong (in this case you will see this exception before the Camel SQL component is created).

Committed with r1228956
                
> jdbc idempotent repository - table creation
> -------------------------------------------
>
>                 Key: CAMEL-4152
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4152
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sql
>    Affects Versions: 2.7.1
>         Environment: camels on any
>            Reporter: Julian Cable
>            Assignee: Christian Müller
>              Labels: idempotent, jdbc
>             Fix For: 2.9.1, 2.10
>
>
>  It would be nice if the class caught the error if the table does not exist and tried to create it. If the create privilege is not available then a more informative exception can be raised to inform the user what needs creating.
> I also suggest the schema is changed so that the fields are lower case as different database engines handle case differently and use incompatible quoting for mixed case tables (Oracle, MySql and Postgres are all slightly different).
> Julian

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira