Projects tigase _server tigase-http-api Issues #163
Latest docker image floods logs with `NoClassDefFoundError: RolesAllowed` (#163)
Wojciech Kapcia (Tigase) opened 2 weeks ago
xmpp-1  | [2025-02-26 06:55:35:665] [WARNING ] [                  main ] Kernel.injectDependencies()      :
xmpp-1  |
xmpp-1  |
xmpp-1  | =====================
xmpp-1  | Could not initialize bean featuresPage (class: class tigase.http.modules.setup.pages.FeaturesPage), skipping injection of this bean
xmpp-1  | RootCause:
xmpp-1  |    -> java.lang.IllegalArgumentException: Missing class in classpath for field 'protected tigase.http.modules.setup.SetupModule tigase.http.modules.setup.pages.AbstractPage.setupModule' in class class tigase.http.modules.setup.pages.AbstractPage from jar:file:/home/tigase/tigase-server/jars/tigase-http-api.jar!/tigase/http/modules/setup/pages/AbstractPage.class
xmpp-1  |       [tigase.kernel.BeanUtils.createExceptionForMissingClassForField(BeanUtils.java:203)]
xmpp-1  |       -> java.lang.NoClassDefFoundError: jakarta/annotation/security/RolesAllowed
xmpp-1  |          [java.base/java.lang.Class.getDeclaredMethods0(Native Method)]
xmpp-1  |          -> java.lang.ClassNotFoundException: jakarta.annotation.security.RolesAllowed
xmpp-1  |             [java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)]
Andrzej Wójcik (Tigase) commented 2 weeks ago

It suggests that jakarta.annotation-api dependency is missing from the image. I've added it to tigase-http-api in commit https://tigase.dev/tigase/_server/tigase-http-api/~commits/669134ad7ad38a3698e892b7b67832d7db44a8b5.

Initially it was missing from the tigase-server (old tigase-server-dist) project as a dependency and I've added it in commit https://tigase.dev/tigase/_server/tigase-server/~commits/e065ce7e53f34bb60c2114bff05b60db2c7e2adb to fix this issue (missing dependency).

Then I've checked zip/tar distribution packages created by build machine it worked just fine (after unpacking and replacing my Tigase XMPP Server installation).

I've seen in Builds section that last build (relaunched somehow?) of tigase-server failed and did not push updates and I've seen that you've pushed updated image to Docker Hub. Were changes to tigase-server (old dist project) included in the image you created?

Anyway, I've recreated build/image using 1dev build mechanism and I'll verify if the issue still exists.

Andrzej Wójcik (Tigase) commented 2 weeks ago

I've launched a new build/image (just pulled) without those exceptions:

2025-02-26 12:34:46 Checking if database is already available: :
2025-02-26 12:34:46 Running in setup mode, skipping schema upgrade...
2025-02-26 12:34:46 Starting Tigase XMPP Server...
2025-02-26 12:34:46 Running Tigase: 
2025-02-26 12:34:46 componentInfo{Title=Tigase XML Tools, Version=4.3.0-b325/e3218eb6, Class=tigase.xml.XMLUtils}
2025-02-26 12:34:46 componentInfo{Title=Tigase Utils, Version=4.5.0-SNAPSHOT-b489/baeff3ae, Class=tigase.util.ClassUtil}
2025-02-26 12:34:46 componentInfo{Title=Tigase XMPP Server, Version=8.5.0-SNAPSHOT-b6423/421dcc4e, Class=tigase.server.XMPPServer}
2025-02-26 12:34:46 componentInfo{Title=Tigase XMPP Server Distribution, Version=8.5.0-SNAPSHOT-b13038/e065ce7e, Class=tigase.dist.XmppServerDist}
2025-02-26 12:34:46 [2025-02-26 11:34:46:421] [FINEST  ] [                  main ] OldConfigHolder.detectPathAndFormat(): No property file not specified! Using default one etc/init.properties
2025-02-26 12:34:46 [2025-02-26 11:34:46:437] [FINEST  ] [                  main ] OldConfigHolder.detectPathAndFormat(): Provided property file /home/tigase/tigase-server/etc/init.properties does NOT EXISTS! Trying to use default one etc/init.properties
2025-02-26 12:34:46 [2025-02-26 11:34:46:438] [CONFIG  ] [                  main ] ConfigHolder.loadFromDSLFiles()  : Loading configuration from file: etc/config.tdsl
2025-02-26 12:34:47 [2025-02-26 11:34:47:478] [INFO    ] [                  main ] DNSResolverDefault.<init>()      : Resolving default host name: 005fe4e1d617 took: 5
2025-02-26 12:34:48 [2025-02-26 11:34:48:367] [INFO    ] [                  main ] BasicComponent.initialize()      : Loading component: message-router :: componentInfo{Title=Tigase XMPP Server, Version=8.5.0-SNAPSHOT-b6423/421dcc4e, Class=tigase.server.MessageRouter}
2025-02-26 12:34:48 [2025-02-26 11:34:48:594] [INFO    ] [                  main ] JettyStandaloneHttpServer.startupServer(): Starting listening on ports of HTTP server
2025-02-26 12:34:48 [2025-02-26 11:34:48:687] [INFO    ] [                  main ] BasicComponent.initialize()      : Loading component: http :: componentInfo{Title=Tigase HTTP API component, Version=2.5.0-SNAPSHOT-b573/d3f20590-8.5.0-SNAPSHOT-b6423/421dcc4e, Class=tigase.http.HttpMessageReceiver}
2025-02-26 12:34:48 [2025-02-26 11:34:48:687] [INFO    ] [                  main ] Bootstrap.start()                : Starting MessageRouter
2025-02-26 12:34:48 [2025-02-26 11:34:48:689] [INFO    ] [                  main ] DSLBeanConfigurator.dumpConfiguration(): Dumping full server configuration to: etc/config-dump.properties
2025-02-26 12:34:48 [2025-02-26 11:34:48:779] [INFO    ] [                  main ] XMPPServer.logTdslConfigWithSetupCredentials(): Setup configuration:
2025-02-26 12:34:48 'cluster-mode' = false
2025-02-26 12:34:48 'config-type' = 'setup'
2025-02-26 12:34:48 http () {
2025-02-26 12:34:48     setup () {
2025-02-26 12:34:48         'admin-password' = 'tigase'
2025-02-26 12:34:48         'admin-user' = 'admin'
2025-02-26 12:34:48     }
2025-02-26 12:34:48 }
2025-02-26 12:34:48 
2025-02-26 12:34:48 [2025-02-26 11:34:48:779] [INFO    ] [                  main ] XMPPServer.start()               : Please setup server at http://localhost:8080/

I've checked both images (default and enterprise).

Andrzej Wójcik (Tigase) added "Related" Customers/atom#211 2 weeks ago
Wojciech Kapcia (Tigase) changed state to 'Closed' 2 weeks ago
Previous Value Current Value
Open
Closed
Wojciech Kapcia (Tigase) commented 2 weeks ago

Yup, missing dependency due to local build as remote was failing. My bad.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
none
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/tigase-http-api#163
Please wait...
Page is in error, reload to recover