Re: Help with "no domain found" error James 3.8.0
Hi Matt, You can maybe tweak too the logback.xml configuration file to have a more fine grained logging experience, which could help you maybe reduce your log volume as well depending which part of James you target for logs. Best regards, Rene. On 1/9/24 08:26, Tung Tran wrote: Hi, You can use `SizeAndTimeBasedRollingPolicy` in logback file for rotate the file log https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy On 08/01/2024 18:57, Matt Pryor wrote: OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: Hi Matt, No problem actually I think. Looking at the code: https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 We can see that it's just a debug log saying it tried to look if the domain existed internally or not, it didn't find it. James logged it then as a debug log and then returns false (so no error). A bit verbose but my guess is also you are probably in a testing phase with debug logs enabled? If you turn off the debug logs in logback configuration file, you should not see them anymore I believe. But nothing to be alarmed of I think :) Best regards, Rene. On 12/13/23 10:34, Tung Tran wrote: It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: 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:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - No domain found javax.persistence.NoResult
Re: Help with "no domain found" error James 3.8.0
Hi, You can use `SizeAndTimeBasedRollingPolicy` in logback file for rotate the file log https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy On 08/01/2024 18:57, Matt Pryor wrote: OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: Hi Matt, No problem actually I think. Looking at the code: https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 We can see that it's just a debug log saying it tried to look if the domain existed internally or not, it didn't find it. James logged it then as a debug log and then returns false (so no error). A bit verbose but my guess is also you are probably in a testing phase with debug logs enabled? If you turn off the debug logs in logback configuration file, you should not see them anymore I believe. But nothing to be alarmed of I think :) Best regards, Rene. On 12/13/23 10:34, Tung Tran wrote: It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: 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:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) Queried the jamesdomain table and there's one result containing "localhost". What should be in there
Re: Help with "no domain found" error James 3.8.0
OK thanks Rene. I'm finding the logs a bit challenging, the main use for logs for our use is to track down deliverability issues, but in order to do this we need to turn on debug logging, for example: 16:36:59.492 [DEBUG] o.a.j.t.m.r.d.MailDelivrer - Temporary exception delivering mail (Mail1704386217842-49641a56-f7cf-43c3-911f-bf83b88a4fd4-to-aol.com). RemoteHost said: 421 4.7.0 [TSS04] Messages from 13.82.57.241 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes But this then generates 500+ Mb per day which is a lot to look through. Any tips on how to better manage this would be great. Thanks Matt On Wed, 13 Dec 2023 at 04:14, Rene Cordier wrote: > Hi Matt, > > No problem actually I think. Looking at the code: > > https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 > > We can see that it's just a debug log saying it tried to look if the > domain existed internally or not, it didn't find it. James logged it > then as a debug log and then returns false (so no error). > > A bit verbose but my guess is also you are probably in a testing phase > with debug logs enabled? If you turn off the debug logs in logback > configuration file, you should not see them anymore I believe. But > nothing to be alarmed of I think :) > > Best regards, > > Rene. > > > On 12/13/23 10:34, Tung Tran wrote: > > It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. > > :name is a "dynamic marker" as you wrote. > > > > > https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 > > > > > > > > On 12/12/2023 18:42, Matt Pryor wrote: > >> Hi all, I'm still seeing this error in the logs after setting the domain > >> using the webadmin: > >> > >> 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:179) > > >> > >>at > >> > org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) > > >> > >> > >> Please can you help me understand what this query is doing and what > >> is it > >> querying? There is no "JamesDomain" table in the tables generated in our > >> SQL Server database (there is a James_Domain). > >> I presume :name is a dynamic marker, in which case what will it be > >> setting > >> the value to? > >> > >> Below is a list of tables generated by James in SQL Server: > >> > >> JAMES_DOMAIN > >> JAMES_MAIL > >> JAMES_MAILBOX > >> JAMES_MAILBOX_ANNOTATION > >> JAMES_MAIL_PROPERTY > >> JAMES_MAIL_REPOS > >> JAMES_MAIL_STORE > >> JAMES_MAIL_USERFLAG > >> JAMES_MAX_DOMAIN_MESSAGE_COUNT > >> JAMES_MAX_DOMAIN_STORAGE > >> JAMES_MAX_GLOBAL_MESSAGE_COUNT > >> JAMES_MAX_Global_STORAGE > >> JAMES_MAX_USER_MESSAGE_COUNT > >> JAMES_MAX_USER_STORAGE > >> JAMES_QUOTA_CURRENTQUOTA > >> JAMES_RECIPIENT_REWRITE > >> JAMES_SIEVE_QUOTA > >> JAMES_SIEVE_SCRIPT > >> JAMES_SUBSCRIPTION > >> JAMES_USER > >> OPENJPA_SEQUENCE_TABLE > >> > >> Thanks and kind regards > >> Matt > >> > >> > >> > >> > >> > >> On Thu, 26 Oct 2023 at 12:41, Matt Pryor > >> > >> wrote: > >> > >>> Many thanks René! > >>> > >>> On Thu, 26 Oct 2023 at 03:32, René CORDIER > >>> wrote: > >>> > Hi Matt, > > On addition to using the cli, you have also other ways: > > - using webadmin: > > https://james.apache.org/server/manage-webadmin.html#Administrating_domains > > > - the domainlist.xml file. localhost is configured as > defaultDomain, but > you can add extra domains in `domainnames.domainname`, which is a > list, > spearated by "," I think... it's undocumented, looks rather obscur > (as a > name) and doesn't seem really tested in the code I realized > though... Might > need to add a little something there :) > > Best regards, > > Rene. > > > On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try > that > tomorrow. > > > On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: > > > Hi > > Have you created a domain name yet? > > By admin api, James Command line... > > Ex: james.apache.org/server/manage-cli.html#Manage_Domains > > > > Tung, > > > > On 25/10/2023 22:16, Matt Pryor wrote: > >>
Re: Help with "no domain found" error James 3.8.0
Hi Matt, No problem actually I think. Looking at the code: https://github.com/apache/james-project/blob/master/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/JPADomainList.java#L164 We can see that it's just a debug log saying it tried to look if the domain existed internally or not, it didn't find it. James logged it then as a debug log and then returns false (so no error). A bit verbose but my guess is also you are probably in a testing phase with debug logs enabled? If you turn off the debug logs in logback configuration file, you should not see them anymore I believe. But nothing to be alarmed of I think :) Best regards, Rene. On 12/13/23 10:34, Tung Tran wrote: It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: 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:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) Queried the jamesdomain table and there's one result containing "localhost". What should be in there, do I set it manually in the database, or does it come from a config file? Thanks Matt - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org -- Kind regards Matt Pryor Software Developer The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: Help with "no domain found" error James 3.8.0
It just a JPAQuery, the JamesDomain is an entity of table JAMES_DOMAIN. :name is a "dynamic marker" as you wrote. https://github.com/apache/james-project/blob/d7a4f45fa4d248a4911612eb367cef72e56c5f8c/server/data/data-jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java#L33 On 12/12/2023 18:42, Matt Pryor wrote: Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: 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:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: Hi Have you created a domain name yet? By admin api, James Command line... Ex: james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) Queried the jamesdomain table and there's one result containing "localhost". What should be in there, do I set it manually in the database, or does it come from a config file? Thanks Matt - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org -- Kind regards Matt Pryor Software Developer The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org
Re: Help with "no domain found" error James 3.8.0
Hi all, I'm still seeing this error in the logs after setting the domain using the webadmin: 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:179) at org.apache.james.mailetcontainer.impl.LocalResourcesImpl.isLocalServer(LocalResourcesImpl.java:67) Please can you help me understand what this query is doing and what is it querying? There is no "JamesDomain" table in the tables generated in our SQL Server database (there is a James_Domain). I presume :name is a dynamic marker, in which case what will it be setting the value to? Below is a list of tables generated by James in SQL Server: JAMES_DOMAIN JAMES_MAIL JAMES_MAILBOX JAMES_MAILBOX_ANNOTATION JAMES_MAIL_PROPERTY JAMES_MAIL_REPOS JAMES_MAIL_STORE JAMES_MAIL_USERFLAG JAMES_MAX_DOMAIN_MESSAGE_COUNT JAMES_MAX_DOMAIN_STORAGE JAMES_MAX_GLOBAL_MESSAGE_COUNT JAMES_MAX_Global_STORAGE JAMES_MAX_USER_MESSAGE_COUNT JAMES_MAX_USER_STORAGE JAMES_QUOTA_CURRENTQUOTA JAMES_RECIPIENT_REWRITE JAMES_SIEVE_QUOTA JAMES_SIEVE_SCRIPT JAMES_SUBSCRIPTION JAMES_USER OPENJPA_SEQUENCE_TABLE Thanks and kind regards Matt On Thu, 26 Oct 2023 at 12:41, Matt Pryor wrote: > Many thanks René! > > On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: > >> Hi Matt, >> >> On addition to using the cli, you have also other ways: >> >> - using webadmin: >> https://james.apache.org/server/manage-webadmin.html#Administrating_domains >> >> - the domainlist.xml file. localhost is configured as defaultDomain, but >> you can add extra domains in `domainnames.domainname`, which is a list, >> spearated by "," I think... it's undocumented, looks rather obscur (as a >> name) and doesn't seem really tested in the code I realized though... Might >> need to add a little something there :) >> >> Best regards, >> >> Rene. >> >> >> On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that >> tomorrow. >> >> >> On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: >> >> > Hi >> > Have you created a domain name yet? >> > By admin api, James Command line... >> > Ex: james.apache.org/server/manage-cli.html#Manage_Domains >> > >> > Tung, >> > >> > On 25/10/2023 22:16, Matt Pryor wrote: >> > > Hi, I'm seeing the following error in the logs: >> > > >> > > 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) >> > > >> > > Queried the jamesdomain table and there's one result containing >> > "localhost". >> > > >> > > What should be in there, do I set it manually in the database, or >> does it >> > > come from a config file? >> > > >> > > Thanks >> > > Matt >> > > >> > >> > - >> > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >> > For additional commands, e-mail: server-user-h...@james.apache.org >> > >> > >> >> >> > > -- > Kind regards > Matt Pryor > Software Developer > > The International Presence Group of Companies > EMAIL: pr...@presencebpm.com > URL: www.International-presence.com > > > -- Kind regards Matt Pryor Software Developer The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com
Re: Help with "no domain found" error James 3.8.0
Many thanks René! On Thu, 26 Oct 2023 at 03:32, René CORDIER wrote: > Hi Matt, > > On addition to using the cli, you have also other ways: > > - using webadmin: > https://james.apache.org/server/manage-webadmin.html#Administrating_domains > > - the domainlist.xml file. localhost is configured as defaultDomain, but > you can add extra domains in `domainnames.domainname`, which is a list, > spearated by "," I think... it's undocumented, looks rather obscur (as a > name) and doesn't seem really tested in the code I realized though... Might > need to add a little something there :) > > Best regards, > > Rene. > > > On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that > tomorrow. > > > On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: > > > Hi > > Have you created a domain name yet? > > By admin api, James Command line... > > Ex: james.apache.org/server/manage-cli.html#Manage_Domains > > > > Tung, > > > > On 25/10/2023 22:16, Matt Pryor wrote: > > > Hi, I'm seeing the following error in the logs: > > > > > > 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) > > > > > > Queried the jamesdomain table and there's one result containing > > "localhost". > > > > > > What should be in there, do I set it manually in the database, or does > it > > > come from a config file? > > > > > > Thanks > > > Matt > > > > > > > - > > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org > > For additional commands, e-mail: server-user-h...@james.apache.org > > > > > > > -- Kind regards Matt Pryor Software Developer The International Presence Group of Companies EMAIL: pr...@presencebpm.com URL: www.International-presence.com
Re: Help with "no domain found" error James 3.8.0
Hi Matt, On addition to using the cli, you have also other ways: - using webadmin: https://james.apache.org/server/manage-webadmin.html#Administrating_domains - the domainlist.xml file. localhost is configured as defaultDomain, but you can add extra domains in `domainnames.domainname`, which is a list, spearated by "," I think... it's undocumented, looks rather obscur (as a name) and doesn't seem really tested in the code I realized though... Might need to add a little something there :) Best regards, Rene. On Oct 26, 2023 1:36 AM, from Matt Pryor Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: > Hi > Have you created a domain name yet? > By admin api, James Command line... > Ex: james.apache.org/server/manage-cli.html#Manage_Domains > > Tung, > > On 25/10/2023 22:16, Matt Pryor wrote: > > Hi, I'm seeing the following error in the logs: > > > > 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) > > > > Queried the jamesdomain table and there's one result containing > "localhost". > > > > What should be in there, do I set it manually in the database, or does it > > come from a config file? > > > > Thanks > > Matt > > > > - > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org > For additional commands, e-mail: server-user-h...@james.apache.org > >
Re: Help with "no domain found" error James 3.8.0
Thanks a lot Tung will try that tomorrow. On Wed, 25 Oct 2023 at 16:33, Tung Tran wrote: > Hi > Have you created a domain name yet? > By admin api, James Command line... > Ex: https://james.apache.org/server/manage-cli.html#Manage_Domains > > Tung, > > On 25/10/2023 22:16, Matt Pryor wrote: > > Hi, I'm seeing the following error in the logs: > > > > 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) > > > > Queried the jamesdomain table and there's one result containing > "localhost". > > > > What should be in there, do I set it manually in the database, or does it > > come from a config file? > > > > Thanks > > Matt > > > > - > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org > For additional commands, e-mail: server-user-h...@james.apache.org > >
Re: Help with "no domain found" error James 3.8.0
Hi Have you created a domain name yet? By admin api, James Command line... Ex: https://james.apache.org/server/manage-cli.html#Manage_Domains Tung, On 25/10/2023 22:16, Matt Pryor wrote: Hi, I'm seeing the following error in the logs: 16:07:55.691 [DEBUG] o.a.j.d.j.JPADomainList - 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:346) Queried the jamesdomain table and there's one result containing "localhost". What should be in there, do I set it manually in the database, or does it come from a config file? Thanks Matt - To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org