You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "David Leangen (Jira)" <se...@james.apache.org> on 2020/06/25 10:30:00 UTC

[jira] [Created] (JAMES-3285) Improve NoResultException Log message

David Leangen created JAMES-3285:
------------------------------------

             Summary: Improve NoResultException Log message
                 Key: JAMES-3285
                 URL: https://issues.apache.org/jira/browse/JAMES-3285
             Project: James Server
          Issue Type: Sub-task
            Reporter: David Leangen


This is the current log output:

{noformat}
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:346)
        at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:162)
        at org.apache.james.domainlist.jpa.JPADomainList.containsDomainInternal(JPADomainList.java:100)
        at org.apache.james.domainlist.lib.AbstractDomainList.containsDomain(AbstractDomainList.java:163)
        at org.apache.james.domainlist.lib.AbstractDomainList.setDefaultDomain(AbstractDomainList.java:146)
        at org.apache.james.domainlist.lib.AbstractDomainList.configureDefaultDomain(AbstractDomainList.java:128)
        at org.apache.james.domainlist.lib.AbstractDomainList.configure(AbstractDomainList.java:97)
        at org.apache.james.modules.data.JPADomainListModule.lambda$configureDomainList$0(JPADomainListModule.java:52)
        at org.apache.james.utils.InitilizationOperationBuilder$PrivateImpl.initModule(InitilizationOperationBuilder.java:52)
        at com.github.fge.lambdas.consumers.ConsumerChainer.lambda$sneakyThrow$9(ConsumerChainer.java:73)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(Unknown Source)
        at java.base/java.util.stream.DistinctOps$1$2.accept(Unknown Source)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
        at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
        at org.apache.james.utils.InitializationOperations.processConfigurables(InitializationOperations.java:53)
        at org.apache.james.utils.InitializationOperations.initModules(InitializationOperations.java:43)
        at org.apache.james.GuiceJamesServer.start(GuiceJamesServer.java:93)
        at org.apache.james.JamesServerMain.main(JamesServerMain.java:30)
        at org.apache.james.JPAJamesServerMain.main(JPAJamesServerMain.java:108)
{noformat}

This is much more verbose than it needs to be, and the domain that was not found is not even provided in the log message, making it pretty useless.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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