You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "anu-ragverma (via GitHub)" <gi...@apache.org> on 2025/05/26 19:20:06 UTC
[PR] Fix incorrect ResourceBundle reference in message logging function [directory-ldap-api]
anu-ragverma opened a new pull request, #205:
URL: https://github.com/apache/directory-ldap-api/pull/205
**Title:** Fix incorrect ResourceBundle reference in message logging function
**Description:**
While integrating this module into my local project, I encountered the following error:
```
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key MSG_04100_BIND_FAIL
```
Upon investigation, it appears that the function intended to use `MSG_BUNDLE` is incorrectly referencing `ERR_BUNDLE`. After updating the code to use the correct bundle (`MSG_BUNDLE`), the issue was resolved and logging now works as expected.
I’ve included the fix in this PR.
If the original use of `ERR_BUNDLE` is intentional, could someone clarify its intended use case—especially if it's used internally, such as in LDAP-related logic? I'm happy to adjust the fix accordingly if there's a broader context I'm missing.
---
Error Logs from Service
---
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key MSG_04100_BIND_FAIL
at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:567)
at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:523)
..........................
..........................
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:635)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org
Re: [PR] Fix incorrect ResourceBundle reference in message logging function [directory-ldap-api]
Posted by "anu-ragverma (via GitHub)" <gi...@apache.org>.
anu-ragverma closed pull request #205: Fix incorrect ResourceBundle reference in message logging function
URL: https://github.com/apache/directory-ldap-api/pull/205
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org
Re: [PR] Fix incorrect ResourceBundle reference in message logging function [directory-ldap-api]
Posted by "anu-ragverma (via GitHub)" <gi...@apache.org>.
anu-ragverma commented on PR #205:
URL: https://github.com/apache/directory-ldap-api/pull/205#issuecomment-2910694132
Dear Team,
Please find the log comparison before and after the fix. The functionality is now working as expected.
This fix improves the consistency and effectiveness of log messages. Previously, only error logs were functioning correctly, while message logs were not behaving as intended. After this fix, message logs now follow the same behavior and reliability as error logs.
## Before Log
2025-05-27 02:37:58,685 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) **MSG_06001_REGISTERED_EXTENDED_OP_FACTORY (1.3.6.1.1.21.3)**
2025-05-27 02:37:58,686 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) MSG_06001_REGISTERED_EXTENDED_OP_FACTORY (1.3.6.1.4.1.18060.0.1.5)
2025-05-27 02:37:58,686 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) MSG_06001_REGISTERED_EXTENDED_OP_FACTORY (1.3.6.1.4.1.18060.0.1.3)
......
......
2025-05-27 02:37:59,179 DEBUG [org.apa.min.fil.cod.ProtocolCodecFilter] (NioProcessor-1) Processing a MESSAGE_RECEIVED for session 1
2025-05-27 02:37:59,180 DEBUG [org.apa.dir.api.CODEC_LOG] (NioProcessor-1) MSG_14000_DECODING_PDU ()
2025-05-27 02:37:59,180 DEBUG [org.apa.dir.api.CODEC_LOG] (NioProcessor-1) 0x30 0x0C 0x02 0x01 0x01 0x61 0x07 0x0A 0x01 0x00 0x04 0x00 0x04 0x00
2025-05-27 02:37:59,184 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) **MSG_01007_LINE_SEPARATOR1** ()
2025-05-27 02:37:59,184 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01011_DECODING_PDU ()
2025-05-27 02:37:59,185 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01008_LINE_SEPARATOR2 ()
2025-05-27 02:37:59,185 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01012_STATE (TAG_STATE_START)
## Error Message Log (Same expected with Info Message)
org.apache.directory.api.ldap.model.exception.LdapProtocolErrorException: **ERR_13508_INVALID_FILTER The filter (X)(&(objectClass=ifscmaster)(ifscCode=ABHY0065005)) is invalid.**
at org.apache.directory.api.ldap.model.message.SearchRequestImpl.setFilter(SearchRequestImpl.java:184)
at com.finobank.mta.service.RestIfscService.getSingleSearchRequest(RestIfscService.java:339)
at com.finobank.mta.service.RestIfscService.searchIfsc(RestIfscService.java:308)
at com.finobank.mta.service.RestIfscService_Subclass.searchIfsc$$superforward(Unknown Source)
## After Fix
2025-05-27 03:19:11,151 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) **MSG_06001_REGISTERED_EXTENDED_OP_FACTORY Registered pre-bundled extended operation factory: 1.3.6.1.4.1.18060.0.1.6**
2025-05-27 03:19:11,152 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) MSG_06001_REGISTERED_EXTENDED_OP_FACTORY Registered pre-bundled extended operation factory: 1.3.6.1.4.1.4203.1.11.3
2025-05-27 03:19:11,152 INFO [org.apa.dir.api.lda.ext.ExtrasCodecFactoryUtil] (executor-thread-1) MSG_06002_REGISTERED_INTERMEDIATE_FACTORY Registered pre-bundled intermediate response factory: 1.3.6.1.4.1.4203.1.9.1.4
......
......
2025-05-27 03:19:11,485 DEBUG [org.apa.min.fil.cod.ProtocolCodecFilter] (NioProcessor-1) Processing a MESSAGE_RECEIVED for session 1
2025-05-27 03:19:11,486 DEBUG [org.apa.dir.api.CODEC_LOG] (NioProcessor-1) MSG_14000_DECODING_PDU Decoding the PDU:
2025-05-27 03:19:11,487 DEBUG [org.apa.dir.api.CODEC_LOG] (NioProcessor-1) 0x30 0x0C 0x02 0x01 0x01 0x61 0x07 0x0A 0x01 0x00 0x04 0x00 0x04 0x00
2025-05-27 03:19:11,491 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) **MSG_01007_LINE_SEPARATOR1 >>>==========================================**
2025-05-27 03:19:11,492 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01011_DECODING_PDU --> Decoding a PDU
2025-05-27 03:19:11,492 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01008_LINE_SEPARATOR2 >>>------------------------------------------
2025-05-27 03:19:11,493 DEBUG [org.apa.dir.api.asn.ber.Asn1Decoder] (NioProcessor-1) MSG_01012_STATE --- State = TAG_STATE_START ---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org