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 "Ioan Eugen Stan (Jira)" <se...@james.apache.org> on 2020/06/15 22:08:00 UTC

[jira] [Commented] (JAMES-3221) What config is James loading and from where - log startup information

    [ https://issues.apache.org/jira/browse/JAMES-3221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17136173#comment-17136173 ] 

Ioan Eugen Stan commented on JAMES-3221:
----------------------------------------

When starting the server, I would like to see something like:

"Using base configuration directory XXXX/ ".
"Load configuration /my/full-path/to/james-database". 

Currently, this is what I get:

{noformat}
james/james-self-hosting-sandbox docker-setup> ./gradlew clean build :james-server:runJamesServer
<====---------> 32% EXECUTING [1s]
> :james-cli:distZip

> Task :james-server:runJamesServer
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/ieugen/.gradle/caches/modules-2/files-2.1/com.google.inject/guice/4.2.2/6dacbe18e5eaa7f6c9c36db33b42e7985e94ce77/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
01:03:21.891 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James
java.io.FileNotFoundException: james-database
        at org.apache.james.utils.PropertiesProvider.lambda$getConfiguration$1(PropertiesProvider.java:71)
        at java.base/java.util.Optional.orElseThrow(Optional.java:408)
        at org.apache.james.utils.PropertiesProvider.getConfiguration(PropertiesProvider.java:71)
        at org.apache.james.modules.data.JPAEntityManagerModule.provideConfiguration(JPAEntityManagerModule.java:72)
        at org.apache.james.modules.data.JPAEntityManagerModule$$FastClassByGuice$$ca2c4ff8.invoke(<generated>)
........
        ... 4 common frames omitted
Wrapped by: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error in custom provider, java.io.FileNotFoundException: james-database
  at org.apache.james.modules.data.JPAEntityManagerModule.provideConfiguration(JPAEntityManagerModule.java:72) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.apache.james.modules.mailbox.JPAMailboxModule -> org.apache.james.modules.data.JPAEntityManagerModule)
  while locating org.apache.james.modules.data.JPAConfiguration
    for the 1st parameter of org.apache.james.modules.data.JPAEntityManagerModule.provideEntityManagerFactory(JPAEntityManagerModule.java:47)
  at org.apache.james.modules.data.JPAEntityManagerModule.provideEntityManagerFactory(JPAEntityManagerModule.java:47) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.apache.james.modules.mailbox.JPAMailboxModule -> org.apache.james.modules.data.JPAEntityManagerModule)
  while locating javax.persistence.EntityManagerFactory
    for the 1st parameter of org.apache.james.mailrepository.jpa.JPAMailRepositoryUrlStore.<init>(JPAMailRepositoryUrlStore.java:35)
  at org.apache.james.modules.data.JPAMailRepositoryModule.configure(JPAMailRepositoryModule.java:42) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.apache.james.modules.data.JPADataModule -> org.apache.james.modules.data.JPAMailRepositoryModule)
  while locating org.apache.james.mailrepository.jpa.JPAMailRepositoryUrlStore
  while locating org.apache.james.mailrepository.api.MailRepositoryUrlStore
    for the 1st parameter of org.apache.james.mailrepository.memory.MemoryMailRepositoryStore.<init>(MemoryMailRepositoryStore.java:60)
  at org.apache.james.modules.server.MailStoreRepositoryModule.configure(MailStoreRepositoryModule.java:53) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.apache.james.modules.MailetProcessingModule -> org.apache.james.modules.server.MailStoreRepositoryModule)
  while locating org.apache.james.mailrepository.memory.MemoryMailRepositoryStore
    for the 1st parameter of org.apache.james.modules.server.MailStoreRepositoryModule.startMailStore(MailStoreRepositoryModule.java:76)
  at org.apache.james.modules.server.MailStoreRepositoryModule.startMailStore(MailStoreRepositoryModule.java:76) (via modules: com.google.inject.util.Modules$CombinedModule -> com.google.inject.util.Modules$CombinedModule -> org.apache.james.modules.MailetProcessingModule -> org.apache.james.modules.server.MailStoreRepositoryModule)
  while locating org.apache.james.utils.InitializationOperation annotated with @com.google.inject.internal.Element(setName=,uniqueId=9, type=MULTIBINDER, keyType=)
  while locating java.util.Set<org.apache.james.utils.InitializationOperation>
    for the 1st parameter of org.apache.james.utils.InitializationOperations.<init>(InitializationOperations.java:37)
  while locating org.apache.james.utils.InitializationOperations

1 error
        at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:226)
        at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1053)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
        at org.apache.james.GuiceJamesServer.start(GuiceJamesServer.java:88)
        at org.apache.james.JamesServerMain.main(JamesServerMain.java:34)
        at org.apache.james.JPAJamesServerMain.main(JPAJamesServerMain.java:95)

{noformat}


> What config is James loading and from where - log startup information
> ---------------------------------------------------------------------
>
>                 Key: JAMES-3221
>                 URL: https://issues.apache.org/jira/browse/JAMES-3221
>             Project: James Server
>          Issue Type: Sub-task
>            Reporter: Ioan Eugen Stan
>            Priority: Major
>
> I've setup Apache James to run inside docker.
> I have made a mistake and James throws an error on start.
> As an operator I would like to know what James is actually doing when starting up so I can validate that my configuration works ok.
> I don't know where is the location where James is loading my configuration files. 
> From the sample bellow, I can't figure out where is James looking for my configuration. 
> What files is it loading and from where? 
> Spring Boot has some nice starting information. I don't have samples right now to offer.
> Code to raise the issue: 
> https://github.com/ieugen/james-self-hosting-sandbox/commit/36e2b193d4368a8eeb365a4abcc983ba7a2092e2
> {noformat}
> james_1        | WARNING: An illegal reflective access operation has occurred
> james_1        | WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/apache-james/james-server/lib/guice-4.2.2.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
> james_1        | WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
> james_1        | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> james_1        | WARNING: All illegal access operations will be denied in a future release
> james_1        | 21:39:31.103 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James
> james_1        | java.io.FileNotFoundException: james-database
> james_1        | 	at org.apache.james.utils.PropertiesProvider.lambda$getConfiguration$1(PropertiesProvider.java:71)
> james_1        | 	at java.base/java.util.Optional.orElseThrow(Unknown Source)
> {noformat}



--
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