[jira] Created: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
Extend GenericEntityExceptions and provide subclasses for different types of database errors
--------------------------------------------------------------------------------------------

                 Key: OFBIZ-3870
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
            Reporter: Deyan
         Attachments: GenericEntityException_SQLState.patch

Currently EntityEngine provides only GenericDuplicateKeyException which is never used.

It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
database errors and warnings and help distinguish between recoverable and not-recoverable errors.

This improvement provides the following classes:

GenericIntegrityConstraintViolationException -> GenericEntityException

GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
GEnericCheckViolationException -> GenericIntegrityConstraintViolationException



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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3870:
-------------------------

    Attachment: GenericEntityException_SQLState.patch

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>         Attachments: GenericEntityException_SQLState.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Heath reassigned OFBIZ-3870:
---------------------------------

    Assignee: Adam Heath

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892100#action_12892100 ]

Jacques Le Roux commented on OFBIZ-3870:
----------------------------------------

Hi Deyan,

[In this thread|http://tinyurl.com/2bhvczn] Adrian suggested to handle the 2 specs using the an attribute of the datasource element of entitytengine.xml. I don't find any entitytengine.xml in your patch. Did you handle it another way (I did not look into details)

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deyan updated OFBIZ-3870:
-------------------------

    Attachment: GenericEntityException_SQLState_v2.patch

- Added more sql states
- Added sql state constants javadoc
- Added GenericDeleteConstraintViolationException
- Removed inner class SQLStateConstants.SQL2003, as SQL:2003 and x/open states seem to be compatible

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch, GenericEntityException_SQLState_v2.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892239#action_12892239 ]

Deyan commented on OFBIZ-3870:
------------------------------

No need to add an attribute of the datasource element in entityengine.xml as this info is provided by jdbc.

SQLProcessor:116
this._sqlStateType = connection.getMetaData().getSQLStateType();

Also it seems like x/open and sql:2003 states are compatible:

http://ieeexplore.ieee.org/Xplore/login.jsp?url=http://ieeexplore.ieee.org/iel2/330/3600/00128794.pdf%3Farnumber%3D128794&authDecision=-203

The SQL (structured query language) Access Group, an open industry consortium that includes many major SQL database vendors and a number of database tool developers, is developing a common embedded SQL language interface for client-server interoperability in OSI (open systems interconnection) environments. This specification covers most of the features in the current ANSI/ISO SQL standard, includes some new features from the proposed SQL2 standard, and maintains upward compatibility with X/Open applications. As part of this development process, SQL Access has seen the need for enhancements to SQL for remote access and has contributed to the ANSI and ISO standardization efforts. X/Open is a member of the SQL Access Group and enjoys an excellent working relationship in extending the X-Open specification to include SQL Access Group requirements

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch, GenericEntityException_SQLState_v2.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12892252#action_12892252 ]

Jacques Le Roux commented on OFBIZ-3870:
----------------------------------------

Thanks Deyan,

Looking forward for Adam's review...

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch, GenericEntityException_SQLState_v2.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904520#action_12904520 ]

Deyan commented on OFBIZ-3870:
------------------------------

Hi guys,

any progress ?

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch, GenericEntityException_SQLState_v2.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-3870) Extend GenericEntityExceptions and provide subclasses for different types of database errors

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-3870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904570#action_12904570 ]

Jacques Le Roux commented on OFBIZ-3870:
----------------------------------------

Hi Deyan,

Thanks to care, I guess Adam is in holidays I have not seen any messages from him for a while. I'd prefer that he had a look because he already expressed some suggestions and concerns...

> Extend GenericEntityExceptions and provide subclasses for different types of database errors
> --------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3870
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3870
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>            Reporter: Deyan
>            Assignee: Adam Heath
>         Attachments: GenericEntityException_SQLState.patch, GenericEntityException_SQLState_v2.patch
>
>
> Currently EntityEngine provides only GenericDuplicateKeyException which is never used.
> It is needed for development purposes to create more detailed exceptions level which allows developers to better handle
> database errors and warnings and help distinguish between recoverable and not-recoverable errors.
> This improvement provides the following classes:
> GenericIntegrityConstraintViolationException -> GenericEntityException
> GenericRestrictViolationException -> GenericIntegrityConstraintViolationException
> GenericNotNullViolationException -> GenericIntegrityConstraintViolationException
> GenericGoreignKeyViolationException -> GenericIntegrityConstraintViolationException
> GenericDuplicateKeyException -> GenericIntegrityConstraintViolationException ( modified superclass )
> GEnericCheckViolationException -> GenericIntegrityConstraintViolationException

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