😊 Thanks -----Original Message----- From: Benoit TELLIER <btell...@linagora.com> Sent: 27 April 2023 10:59 To: server-user@james.apache.org Subject: Re: [EXT] Re: - Error while processing imap request
No and no. On 27/04/2023 16:58, Sean McElroy wrote: > Thanks Benoit. > > Does this affect Apache James or my client code? Does Apache James need to > use java 1.8, or does my code have to use 1.8? > > Best Regards, > Sean > > -----Original Message----- > From: Benoit TELLIER <btell...@apache.org> > Sent: 27 April 2023 10:37 > To: server-user@james.apache.org > Subject: Re: [EXT] Re: - Error while processing imap request > > Hello, > > Yes it helps. > > In java versions above java 11, java is more restrictive about reflection (as > shown in [1] ) and here the JMS mailqueue fails at initializing stuff to read > emails in the queue (shown in [2]). The FST serializer makes heavy usage of > reflection and needs to be allowed to do so (as shown in [3]). > > [1] > > java.lang.reflect.InaccessibleObjectException: Unable to make field > private final byte[] java.lang.String.value accessible: module > java.base does not "opens java.lang" to unnamed module @3d5c822d > > [2] > > at > org.apache.james.queue.jms.JMSCacheableMailQueue.mailAttribute(JMSCacheableMailQueue.java:477) > ~[james-server-queue-jms-3.6.0.jar:3.6.0] > at > org.apache.james.queue.jms.JMSCacheableMailQueue.lambda$populateMail$7 > (JMSCacheableMailQueue.java:462) > ~[james-server-queue-jms-3.6.0.jar:3.6.0] > > [3] > > at > org.nustaq.serialization.FSTClazzInfo.createFieldInfo(FSTClazzInfo.java:512) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzInfo.createFields(FSTClazzInfo.java:368) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzInfo.<init>(FSTClazzInfo.java:129) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzInfoRegistry.getCLInfo(FSTClazzInfoRegistry.java:129) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzNameRegistry.addClassMapping(FSTClazzNameRegistry.java:98) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzNameRegistry.registerClassNoLookup(FSTClazzNameRegistry.java:85) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTClazzNameRegistry.registerClass(FSTClazzNameRegistry.java:81) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.addDefaultClazzes(FSTConfiguration.java:807) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.initDefaultFstConfigurationInternal(FSTConfiguration.java:477) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.createDefaultConfiguration(FSTConfiguration.java:472) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.createMinBinConfiguration(FSTConfiguration.java:229) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.constructJsonConf(FSTConfiguration.java:319) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:301) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:290) > ~[fst-2.57.jar:?] > at > org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:294) > ~[fst-2.57.jar:?] > at > org.apache.mailet.Serializer$FSTSerializer.<clinit>(Serializer.java:51 > 2) ~[apache-mailet-api-3.6.0.jar:3.6.0] > > My theory: you ingested a mail with a serialized attribute and now due > to restrictions in the way you run java 11 you fail at deserializing > it... The mail is well received in SMTP, well enqueued but can't be > dequeued. > > My suggestion: relax those checks. > > CF add this to your java argline > > --add-opens java.base/java.lang=ALL-UNNAMED --add-opens > java.base/java.math=ALL-UNNAMED --add-opens > java.base/java.net=ALL-UNNAMED --add-opens > java.base/java.text=ALL-UNNAMED --add-opens > java.base/java.util.concurrent.atomic=ALL-UNNAMED > --add-opens java.base/java.util.concurrent=ALL-UNNAMED > --add-opens java.base/java.util=ALL-UNNAMED > > > FYI dropping fully FST is a long lasting desire I have CF > https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org > _jira_browse_JAMES-2D3829&d=DwICaQ&c=tv8X2YgD7mG0v9N2vuBcgw&r=0IEnp1fM > BAq7DzWaHhpZhmwghvD9z_ct-QdWofgGsiI&m=WgqxxyHP76QMzpW74J11upkXPaSrQqM8 > ay6hJxs0r-cA9bYJAReS60dvu1nqNh2o&s=Eoi4qq6IZo1PcAOdl1tqsdP4CccfRR1LVQu > ij_0eMjk&e= > > Best regards, > > Benoit TELLIER > > On 26/04/2023 22:39, Sean McElroy wrote: >> Hi Benoit, >> >> This is in the openjpa log. Does that help? >> >> 26-Apr-2023 16:22:58.827 ERROR [elastic-3] >> reactor.util.Loggers$Slf4JLogger.error:314 - Scheduler worker in >> group main failed with an uncaught exception >> java.lang.ExceptionInInitializerError: null >> at >> org.apache.mailet.Serializer$Registry.<clinit>(Serializer.java:78) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at >> org.apache.mailet.AttributeValue.findSerializerAndDeserialize(AttributeValue.java:206) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at >> org.apache.mailet.AttributeValue.lambda$deserialize$1(AttributeValue.java:202) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at java.util.Optional.flatMap(Optional.java:289) ~[?:?] >> at >> org.apache.mailet.AttributeValue.lambda$deserialize$2(AttributeValue.java:202) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at java.util.Optional.flatMap(Optional.java:289) ~[?:?] >> at >> org.apache.mailet.AttributeValue.deserialize(AttributeValue.java:201) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at java.util.Optional.flatMap(Optional.java:289) ~[?:?] >> at >> org.apache.mailet.AttributeValue.fromJson(AttributeValue.java:191) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at >> org.apache.mailet.AttributeValue.fromJsonString(AttributeValue.java:175) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.jms.JMSCacheableMailQueue.mailAttribute(JMSCacheableMailQueue.java:477) >> ~[james-server-queue-jms-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.jms.JMSCacheableMailQueue.lambda$populateMail$7(JMSCacheableMailQueue.java:462) >> ~[james-server-queue-jms-3.6.0.jar:3.6.0] >> at >> java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) >> ~[?:?] >> at >> java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) >> ~[?:?] >> at >> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] >> at >> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) >> ~[?:?] >> at >> java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) >> ~[?:?] >> at >> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] >> at >> java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] >> at >> org.apache.james.queue.jms.JMSCacheableMailQueue.populateMail(JMSCacheableMailQueue.java:463) >> ~[james-server-queue-jms-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.activemq.ActiveMQCacheableMailQueue.populateMail(ActiveMQCacheableMailQueue.java:122) >> ~[james-server-queue-activemq-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.jms.JMSCacheableMailQueue.createMail(JMSCacheableMailQueue.java:385) >> ~[james-server-queue-jms-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.activemq.ActiveMQCacheableMailQueue.createMailQueueItem(ActiveMQCacheableMailQueue.java:230) >> ~[james-server-queue-activemq-3.6.0.jar:3.6.0] >> at >> org.apache.james.queue.jms.JMSCacheableMailQueue.deQueueOneItem(JMSCacheableMailQueue.java:248) >> ~[james-server-queue-jms-3.6.0.jar:3.6.0] >> at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) >> ~[reactor-core-3.4.2.jar:3.4.2] >> at >> reactor.core.publisher.FluxRepeatPredicate$RepeatPredicateSubscriber.resubscribe(FluxRepeatPredicate.java:119) >> ~[reactor-core-3.4.2.jar:3.4.2] >> at >> reactor.core.publisher.MonoRepeatPredicate.subscribeOrReturn(MonoRepeatPredicate.java:47) >> ~[reactor-core-3.4.2.jar:3.4.2] >> at >> reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:55) >> ~[reactor-core-3.4.2.jar:3.4.2] >> at >> reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:193) >> ~[reactor-core-3.4.2.jar:3.4.2] >> at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) >> [reactor-core-3.4.2.jar:3.4.2] >> at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) >> [reactor-core-3.4.2.jar:3.4.2] >> at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] >> at >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) >> [?:?] >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) >> [?:?] >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) >> [?:?] >> at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: >> java.lang.reflect.InaccessibleObjectException: Unable to make field private >> final byte[] java.lang.String.value accessible: module java.base does not >> "opens java.lang" to unnamed module @3d5c822d >> at >> java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) >> ~[?:?] >> at >> java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) >> ~[?:?] >> at java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) >> ~[?:?] >> at java.lang.reflect.Field.setAccessible(Field.java:172) ~[?:?] >> at >> org.nustaq.serialization.FSTClazzInfo.createFieldInfo(FSTClazzInfo.java:512) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzInfo.createFields(FSTClazzInfo.java:368) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzInfo.<init>(FSTClazzInfo.java:129) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzInfoRegistry.getCLInfo(FSTClazzInfoRegistry.java:129) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzNameRegistry.addClassMapping(FSTClazzNameRegistry.java:98) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzNameRegistry.registerClassNoLookup(FSTClazzNameRegistry.java:85) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTClazzNameRegistry.registerClass(FSTClazzNameRegistry.java:81) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.addDefaultClazzes(FSTConfiguration.java:807) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.initDefaultFstConfigurationInternal(FSTConfiguration.java:477) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.createDefaultConfiguration(FSTConfiguration.java:472) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.createMinBinConfiguration(FSTConfiguration.java:229) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.constructJsonConf(FSTConfiguration.java:319) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:301) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:290) >> ~[fst-2.57.jar:?] >> at >> org.nustaq.serialization.FSTConfiguration.createJsonConfiguration(FSTConfiguration.java:294) >> ~[fst-2.57.jar:?] >> at >> org.apache.mailet.Serializer$FSTSerializer.<clinit>(Serializer.java:512) >> ~[apache-mailet-api-3.6.0.jar:3.6.0] >> ... 36 more >> >> -----Original Message----- >> From: Benoit TELLIER<btell...@apache.org> >> Sent: 26 April 2023 00:59 >> To:server-user@james.apache.org >> Subject: [EXT] Re: - Error while processing imap request >> >> Hello Sean, >> >> Which James server flavour are you using? (distributed, spring, >> guice-jpa, etc... ) >> >> Which version of James are you running> >> >> ClosedChannelException in IMAP are unrelated to email delivery and fully >> harmless... >> >> Best regards, >> >> Benoit >> >> On 25/04/2023 20:57, Sean McElroy wrote: >>> Hello, >>> >>> I have a system that uses Apache James, and it has been functioning well >>> until a few days ago. >>> It would appear that messages are being sent, but not delivered. I get no >>> exceptions in my code, but I see this in the James logs. >>> >>> 25-Apr-2023 14:29:39.880 WARN [imapserver-executor-12] >>> org.apache.james.imapserver.netty.ImapChannelUpstreamHandler.excepti >>> on >>> Caught:143 - Error while processing imap request >>> java.nio.channels.ClosedChannelException: null >>> >>> Any ideas, why this might be? >>> >>> Many thanks. >>> Confidential Communication: The contents of this e-mail including any >>> attachment are confidential and intended solely for the person(s) to whom >>> they are addressed. Any reader of this email who is not the intended >>> recipient is notified that any dissemination, distribution or copying of >>> this communication is strictly prohibited. If you have received this e-mail >>> in error, please notify the sender immediately and delete all copies from >>> your computer system. Subsequent alterations to this email after its >>> transmission will be disregarded. >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail:server-user-unsubscr...@james.apache.org >> For additional commands, e-mail:server-user-h...@james.apache.org >> >> Confidential Communication: The contents of this e-mail including any >> attachment are confidential and intended solely for the person(s) to whom >> they are addressed. Any reader of this email who is not the intended >> recipient is notified that any dissemination, distribution or copying of >> this communication is strictly prohibited. If you have received this e-mail >> in error, please notify the sender immediately and delete all copies from >> your computer system. Subsequent alterations to this email after its >> transmission will be disregarded. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail:server-user-unsubscr...@james.apache.org >> For additional commands, e-mail:server-user-h...@james.apache.org > Confidential Communication: The contents of this e-mail including any > attachment are confidential and intended solely for the person(s) to whom > they are addressed. Any reader of this email who is not the intended > recipient is notified that any dissemination, distribution or copying of this > communication is strictly prohibited. If you have received this e-mail in > error, please notify the sender immediately and delete all copies from your > computer system. Subsequent alterations to this email after its transmission > will be disregarded. > > --------------------------------------------------------------------- > 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 Confidential Communication: The contents of this e-mail including any attachment are confidential and intended solely for the person(s) to whom they are addressed. Any reader of this email who is not the intended recipient is notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately and delete all copies from your computer system. Subsequent alterations to this email after its transmission will be disregarded. --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org