You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "Scott Wilson (JIRA)" <ji...@apache.org> on 2009/12/15 11:21:18 UTC

[jira] Created: (WOOKIE-88) "Friendly" error message to recommend clean-db?

"Friendly" error message to recommend clean-db?
-----------------------------------------------

                 Key: WOOKIE-88
                 URL: https://issues.apache.org/jira/browse/WOOKIE-88
             Project: Wookie
          Issue Type: Improvement
            Reporter: Scott Wilson


Several users have now raised the exception thrown when running "ant run" multiple times without cleaning the database. While this is now documented in the installation instructions (and will be added to the FAQ) I was wondering if this is a good case for swallowing the underlying exception and providing a more useful message?

For example:

  try {
        	StringTokenizer st = new StringTokenizer(sqlScript, ";");
        	while (st.hasMoreTokens()) {
        		String q = st.nextToken();
        		dbManager.beginTransaction();
        		SQLQuery query = dbManager.createSQLQuery(q);
        		query.executeUpdate();
        	}
    		dbManager.commitTransaction();
        } catch (HibernateException e) {
        	if (e.getCause().getMessage().contains("duplicate key value")){
        		throw new IOException("There was a problem setting up the database. If this is not the first time you are running Wookie in" +
        			"standalone mode, then you should run ant clean-db before running to clear the database.");
        	} else {
        		throw e;
        	}
        }

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


[jira] Work logged: (WOOKIE-88) "Friendly" error message to recommend clean-db?

Posted by "Scott Wilson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WOOKIE-88?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#action_11005 ]

Scott Wilson logged work on WOOKIE-88:
--------------------------------------

                Author: Scott Wilson
            Created on: 09/Feb/10 03:37 PM
            Start Date: 09/Feb/10 03:37 PM
    Worklog Time Spent: 1h 

Issue Time Tracking
-------------------

            Time Spent: 1h
    Remaining Estimate: 0h  (was: 1h)

> "Friendly" error message to recommend clean-db?
> -----------------------------------------------
>
>                 Key: WOOKIE-88
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-88
>             Project: Wookie
>          Issue Type: Improvement
>            Reporter: Scott Wilson
>            Priority: Minor
>             Fix For: 0.8.1
>
>   Original Estimate: 1h
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Several users have now raised the exception thrown when running "ant run" multiple times without cleaning the database. While this is now documented in the installation instructions (and will be added to the FAQ) I was wondering if this is a good case for swallowing the underlying exception and providing a more useful message?
> For example:
>   try {
>         	StringTokenizer st = new StringTokenizer(sqlScript, ";");
>         	while (st.hasMoreTokens()) {
>         		String q = st.nextToken();
>         		dbManager.beginTransaction();
>         		SQLQuery query = dbManager.createSQLQuery(q);
>         		query.executeUpdate();
>         	}
>     		dbManager.commitTransaction();
>         } catch (HibernateException e) {
>         	if (e.getCause().getMessage().contains("duplicate key value")){
>         		throw new IOException("There was a problem setting up the database. If this is not the first time you are running Wookie in" +
>         			"standalone mode, then you should run ant clean-db before running to clear the database.");
>         	} else {
>         		throw e;
>         	}
>         }

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


[jira] Updated: (WOOKIE-88) "Friendly" error message to recommend clean-db?

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

Ross Gardler updated WOOKIE-88:
-------------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 0.8.1

> "Friendly" error message to recommend clean-db?
> -----------------------------------------------
>
>                 Key: WOOKIE-88
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-88
>             Project: Wookie
>          Issue Type: Improvement
>            Reporter: Scott Wilson
>            Priority: Minor
>             Fix For: 0.8.1
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Several users have now raised the exception thrown when running "ant run" multiple times without cleaning the database. While this is now documented in the installation instructions (and will be added to the FAQ) I was wondering if this is a good case for swallowing the underlying exception and providing a more useful message?
> For example:
>   try {
>         	StringTokenizer st = new StringTokenizer(sqlScript, ";");
>         	while (st.hasMoreTokens()) {
>         		String q = st.nextToken();
>         		dbManager.beginTransaction();
>         		SQLQuery query = dbManager.createSQLQuery(q);
>         		query.executeUpdate();
>         	}
>     		dbManager.commitTransaction();
>         } catch (HibernateException e) {
>         	if (e.getCause().getMessage().contains("duplicate key value")){
>         		throw new IOException("There was a problem setting up the database. If this is not the first time you are running Wookie in" +
>         			"standalone mode, then you should run ant clean-db before running to clear the database.");
>         	} else {
>         		throw e;
>         	}
>         }

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