2

I have some problems sending email using james 3.0-beta4 with Scala.

When I do...

Transport.send(message, externalRcpts.toArray(new Address[externalRcpts.size()]));

...I get the following error:

james.domainlist  - No domain found
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:345) ~[openjpa-2.1.0.jar:2.1.0]
at org.apache.james.domainlist.jpa.JPADomainList.containsDomain(JPADomainList.java:100) ~[james-server-data-jpa-3.0-beta4.jar:3.0-beta4]
at org.apache.james.mailetcontainer.impl.JamesMailetContext.isLocalServer(JamesMailetContext.java:341) [james-server-mailetcontainer-camel-3.0-beta4.jar:3.0-beta4]
at org.apache.james.transport.matchers.HostIsLocal.matchRecipient(HostIsLocal.java:38) [apache-standard-mailets-1.1.jar:1.1]
at org.apache.mailet.base.GenericRecipientMatcher.match(GenericRecipientMatcher.java:54) [apache-mailet-base-1.1.jar:1.1]
at org.apache.james.mailetcontainer.impl.camel.MatcherSplitter.split(MatcherSplitter.java:87) [james-server-mailetcontainer-camel-3.0-beta4.jar:3.0-beta4]
at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.6.0_26]
zb226
  • 9,586
  • 6
  • 49
  • 79
Bob
  • 1,351
  • 11
  • 28

1 Answers1

0

The error says James cannot resolve the destination domain. This may occur if you send to localhost or another unknown domain. Try this:

./james-cli.sh -h localhost -p 9999 adddomain domain_name.com

Anyway, if I remember correctly this error is not blocking - the message still goes to its destination. If it's blocking in your case, try to find config option to make it not blocking. I'm not sure where the option is actually located, but it should have quite intuitive name.

zb226
  • 9,586
  • 6
  • 49
  • 79