james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Charles (JIRA)" <server-...@james.apache.org>
Subject [jira] Commented: (JAMES-1171) DomainList should throw Exception
Date Mon, 03 Jan 2011 11:24:45 GMT

    [ https://issues.apache.org/jira/browse/JAMES-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976705#action_12976705
] 

Eric Charles commented on JAMES-1171:
-------------------------------------

Starting james with jpa domainlist and empty database gives now an exception.

Caused by: org.apache.james.domainlist.api.DomainListException: Unable to retrieve domains
        at org.apache.james.domainlist.jpa.JPADomainList.containsDomain(JPADomainList.java:110)
        at org.apache.james.mailetcontainer.lib.JamesMailetContext.configure(JamesMailetContext.java:483)
        ... 31 more
Caused by: javax.persistence.NoResultException: Query "SELECT domain FROM JamesDomain domain
WHERE domain.name=:name" selected no result, but expected unique result.
        at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:328)
        at org.apache.james.domainlist.jpa.JPADomainList.containsDomain(JPADomainList.java:102)
        ... 32 more


I made a quick fix in http://svn.apache.org/viewvc?rev=1054586&view=rev (catch NoResulteException).
No sure it that's the best practice or if we should modify the query.


> DomainList should throw Exception
> ---------------------------------
>
>                 Key: JAMES-1171
>                 URL: https://issues.apache.org/jira/browse/JAMES-1171
>             Project: JAMES Server
>          Issue Type: Improvement
>    Affects Versions: 3.0-M2
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 3.0-M3
>
>
> DomainList should throw Exception on error and not use a boolean flag for this kind of
stuff

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


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message