OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 592 forks source link

No error message shown about missing application, when resourceAdapter is not found #10973

Open maxveit opened 4 years ago

maxveit commented 4 years ago

Example server.xml:

<server description="Test server">
    <featureManager>
        <feature>microProfile-3.2</feature>
        <feature>jca-1.7</feature>
    </featureManager>
    <resourceAdapter id="mq" location="test.rar"/>
    <webApplication id="test" name="test" location="test.war" contextRoot="test"/>
</server>

Context: Neither "test.rar" nor "test.war" exist. Logs:

[INFO] CWWKM2102I: Using installDirectory : /Users/max.veit/git/portfolio/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /Users/max.veit/git/portfolio/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Liberty profile is already installed.
[INFO] Copying 12 files to /Users/max.veit/git/portfolio/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /Users/max.veit/git/portfolio/src/main/liberty/config/server.xml.
[INFO] CWWKM2144I: Update server configuration file jvm.options from /Users/max.veit/git/portfolio/src/main/liberty/config/jvm.options.
[INFO] CWWKM2001I: server.config.dir is /Users/max.veit/git/portfolio/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: server.output.dir is /Users/max.veit/git/portfolio/target/liberty/wlp/usr/servers/defaultServer.
[INFO] CWWKM2001I: Invoke command is [/Users/max.veit/git/portfolio/target/liberty/wlp/bin/server, run, defaultServer].
[INFO] 
[INFO] OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[INFO] Launching defaultServer (Open Liberty 20.0.0.2/wlp-1.0.37.cl200220200204-1746) on OpenJDK 64-Bit Server VM, version 13.0.2+8 (en_DE)
[INFO] [AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[INFO] [AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /Users/max.veit/git/portfolio/target/liberty/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[INFO] [AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[INFO] [WARNING ] J2CA7014W: The resource adapter mq could not be installed as it could not be found at location test.rar.
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/jwt/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/openapi/ui/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/metrics/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/ibm/api/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/health/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/openapi/
^C[INFO] [AUDIT   ] CWWKE0085I: The server defaultServer is stopping because the JVM is exiting.
[INFO] [AUDIT   ] CWWKE1100I: Waiting for up to 30 seconds for the server to quiesce.
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/jwt/
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/openapi/ui/
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/metrics/
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/health/
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/ibm/api/
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/openapi/
[INFO] [AUDIT   ] CWWKF0012I: The server installed the following features: [appSecurity-2.0, cdi-2.0, concurrent-1.0, distributedMap-1.0, jaxrs-2.1, jaxrsClient-2.1, jca-1.7, jms-2.0, jndi-1.0, json-1.0, jsonb-1.0, jsonp-1.1, jwt-1.0, microProfile-3.2, mpConfig-1.3, mpFaultTolerance-2.0, mpHealth-2.1, mpJwt-1.1, mpMetrics-2.2, mpOpenAPI-1.1, mpOpenTracing-1.3, mpRestClient-1.3, opentracing-1.3, servlet-4.0, ssl-1.0].
[INFO] [AUDIT   ] CWWKF0013I: The server removed the following features: [jms-2.0].
[INFO] [AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 22,639 seconds.
[INFO] [AUDIT   ] CWWKE0055I: Server shutdown requested on Thursday, 20 February 2020 at 15:09. The server defaultServer is shutting down.
[INFO] [AUDIT   ] CWWKE0036I: The server defaultServer stopped after 32,924 seconds.

Obervation: A warning is issued, that the resourceAdapter cannot be found: [INFO] [WARNING ] J2CA7014W: The resource adapter mq could not be installed as it could not be found at location test.rar. However, no warning is issued, that the webApplication test.war cannot be found. Expected behavior: A warning should be displayed, that the webApplication test.war cannot be found.

Further findings / observations:

maxveit commented 4 years ago

I did another test and found that if you add e.g. a war file, to the dropins folder, after the server has started, it's being picked up nevertheless. However, if that war file is in the dropins folder already during server start, it does not get loaded.