[
https://issues.apache.org/jira/browse/JAMES-4051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874214#comment-17874214
]
annisun commented on JAMES-4051:
--------------------------------
I have added it to Bean, but then there are many errors. I don't know what
caused this error.
{code:java}
19:52:23.888 [main] DEBUG
org.apache.james.container.spring.context.JamesServerApplicationContext - Bean
factory for
org.apache.james.container.spring.context.JamesServerApplicationContext@30f842ca:
org.springframework.beans.factory.support.DefaultListableBeanFactory@4e647f39:
defining beans
[spamAssassinModule,spamAssassinConfiguration,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,blacklistDAO,org.springframework.context.annotation.CommonAnnotationBeanPostProcessor#0,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor#0,org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor#0,configurationprovider,mailrepositorystore,mailetloader,matcherloader,protocolhandlerloader,org.apache.james.container.spring.bean.factorypostprocessor.FileSystemBeanFactoryPostProcessor#0,filesystem,sieveparser,authenticator,user-entity-validator,authorizator,mailqueuefactory,rawMailQueueItemDecoratorFactory,embeddedActiveMQ,persistenceAdapter,activeMQMetricCollector,mailprocessor,mailetcontext,localResources,mailspooler,dnsservice,fetchmail,smtpserver,lmtpserver,pop3server,mailboxAdapter,imapserver,imapProcessor,imapDecoderFactory,imapDecoder,imapEncoderFactory,imapEncoder,timeMetricFactory,managesieveserver,org.apache.james.container.spring.bean.factorypostprocessor.IndexerConfigurationBeanFactoryPostProcessor#0,messageParser,org.apache.james.container.spring.bean.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor#0,locker,messageIdFactory,jvm-locker,no-locker,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#1,jpa-mailboxIdFactory,jpa-mailboxmanager,threadIdGuessingAlgorithm,clock,jpa-subscriptionManager,jpa-sessionMapperFactory,jpa-uidProvider,jpa-modSeqProvider,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,datasource,entityManagerFactory,vendorAdapter,jpa-per-user-max-quota-dao,jpaMaxQuotaManager,jpaCurrentQuotaManager,lazyIndex,luceneIndex,fsDirectory,memory-mailboxIdFactory,memory-mailboxManager,memory-subscriptionManager,memory-sessionMapperFactory,mailboxcopier,aclResolver,storeMailboxAnnotationManager,storeRightManager,sessionProvider,mailbox-init,preDeletionHooks,org.apache.james.container.spring.bean.factorypostprocessor.QuotaBeanFactoryPostProcessor#0,currentQuotaManager,defaultQuotaRootResolver,currentQuotaCalculator,inMemoryCurrentQuotaManager,noMaxQuotaManager,fixedMaxQuotaManager,inMemoryMaxQuotaManager,noQuotaManager,storeQuotaManager,noQuotaUpdater,eventQuotaUpdater,quotaComponents,quota,event-bus,event-delivery,event-deadletters,mailboxmanagerresolver,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#1,dataSource,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#2,mbeanserver,serverConnector,registry,restrictedRmiSocketFactory,exporter,reindexer-impl,fake-reindexer,usersrepositorymanagement,recipientrewritetablemanagement,domainlistmanagement,mailboxmanagermanagementbean,mailboxcopiermanagement,quotamanagermanagement,reindexermanagement,sievemanagerbean,hostname,taskManager,metricFactory,gaugeRegistry,metricRegistry,jspfDnsService,aliasreverseresolver,cansendfrom];
root of factory hierarchy
19:52:24.072 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating
shared instance of singleton bean
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
19:52:24.073 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating
instance of bean
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
19:52:24.089 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory - Eagerly
caching bean
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
to allow for resolving potential circular references
19:52:24.091 [main] DEBUG
org.springframework.beans.factory.support.DefaultListableBeanFactory - Finished
creating instance of bean
'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
19:52:24.174 [main] DEBUG
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader -
Registering bean definition for @Bean method
org.apache.james.spamassassin.SpamAssassinModule.getSpamAssassinConfiguration()
Exception in thread "main" java.lang.IllegalStateException: Cannot load
configuration class: org.apache.james.spamassassin.SpamAssassinModule
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:404)
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanFactory(ConfigurationClassPostProcessor.java:249)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:127)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
at
org.apache.james.container.spring.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:43)
at
org.apache.james.app.spring.JamesAppSpringMain.init(JamesAppSpringMain.java:81)
at
org.apache.james.app.spring.JamesAppSpringMain.main(JamesAppSpringMain.java:57)
Caused by: java.lang.ExceptionInInitializerError
at
org.springframework.context.annotation.ConfigurationClassEnhancer.newEnhancer(ConfigurationClassEnhancer.java:122)
at
org.springframework.context.annotation.ConfigurationClassEnhancer.enhance(ConfigurationClassEnhancer.java:110)
at
org.springframework.context.annotation.ConfigurationClassPostProcessor.enhanceConfigurationClasses(ConfigurationClassPostProcessor.java:394)
... 10 more
Caused by: org.springframework.cglib.core.CodeGenerationException:
java.lang.reflect.InaccessibleObjectException-->Unable to make protected final
java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens
java.lang" to unnamed module @fe18270
at
org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)
at
org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)
at
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
at
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
at
org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
at
org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
at
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
at
org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)
at
org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)
at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:174)
at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:153)
at org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)
... 13 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
protected final java.lang.Class
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
throws java.lang.ClassFormatError accessible: module java.base does not "opens
java.lang" to unnamed module @fe18270
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at
java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at
org.springframework.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at
org.springframework.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)
at
org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)
at
org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at
org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)
... 25 more{code}
> SpamAssassin Missing
> --------------------
>
> Key: JAMES-4051
> URL: https://issues.apache.org/jira/browse/JAMES-4051
> Project: James Server
> Issue Type: Bug
> Components: James Core
> Affects Versions: 3.8.0, 3.8.1
> Reporter: annisun
> Priority: Major
> Fix For: 3.8.0, 3.8.1
>
> Attachments: image-2024-07-17-16-39-59-506.png
>
>
> The class can still be found in 3.7.5, but it is not found in 3.8.0 and later
> versions. SpamAssassin cannot be used after 3.7.5.
> !image-2024-07-17-16-39-59-506.png!
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]