-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
7.13.4.GA
-
None
-
None
-
False
-
None
-
False
-
Compatibility/Configuration, User Experience
-
-
-
-
-
-
-
---
-
---
-
-
While trying to create a custom log handler for RHPAM installed (template installation) in the OCP 4.12 environment following EAP documentation.
The logs handler addition seems to fail with below error.
~~~
[sudnair@sudnair target]$ oc rsh rhpam-trial-kieserver-1-m6skb
sh-4.4$ cd /opt/eap/bin/
sh-4.4$ ./jboss-cli.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] module add --name=com.sudhish.customLogHandler --resources=/opt/target/customlogger-1.0-SNAPSHOT.jar
[disconnected /] connect
[standalone@localhost:9990 /] /subsystem=logging/custom-handler=MY_LOGGER:add(name=MY_LOGGER,class=com.sudhish.CustomLogHandler,module=com.sudhish.customLogHandler)
[standalone@localhost:9990 /]
~~~
Module was added correctly and module.xml and jar is available at the correct location.
~~~
sh-4.4$ cd /opt/eap/modules/com/sudhish/customLogHandler/main/
sh-4.4$ ls -lrt
total 8
rw-rr-. 1 jboss root 3924 Nov 9 12:47 customlogger-1.0-SNAPSHOT.jar
rw-rr-. 1 jboss root 219 Nov 9 12:47 module.xml
~~~
In the pod logs (attached complete logs)rhpam-trial-kieserver-1-m6skb-rhpam-trial-kieserver (3).log we could see below error
~~~
12:36:13,727 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 3) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "logging"),
("custom-handler" => "MY_LOGGER")
]): java.lang.IllegalArgumentException: Failed to load module "com.sudhish.customLogHandler" for handler "MY_LOGGER"
at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:67)
at org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:51)
at org.jboss.logmanager.config.LogContextConfigurationImpl.addHandlerConfiguration(LogContextConfigurationImpl.java:143)
.
.
.
at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Caused by: java.lang.NoClassDefFoundError: org/jboss/modules/ModuleLoader
at org.jboss.logmanager.config.AbstractPropertyConfiguration$ModuleFinder.getClassLoader(AbstractPropertyConfiguration.java:579)
at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:64)
~~~
Please note that the same step works fine for RHPAM on-premise installation.
- is related to
-
CLOUD-3537 Update startup module / agent loading to not require bootclasspath/a
- New