Skip to content

Server startup error when debug logs are enabled #4933

@Jaiya94

Description

@Jaiya94

The below error is observed during server startup in APIM 4.4.0 when debug logs are enabled for the org.wso2.carbon.securevault package:

[2026-03-30 16:13:07,218]  INFO - ServiceComponent Eventing Hub ServiceComponent is activated
[2026-03-30 16:13:07,311] ERROR - DataSourceRepository Error in creating JNDI subcontext 'javax.naming.InitialContext@1f207765/jdbc: Failed to create InitialContext using factory specified in hash table.
org.wso2.carbon.ndatasource.common.DataSourceException: Error in creating JNDI subcontext 'javax.naming.InitialContext@1f207765/jdbc: Failed to create InitialContext using factory specified in hash table.
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:233) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.registerJNDI(DataSourceRepository.java:256) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.registerDataSource(DataSourceRepository.java:359) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	...
Caused by: javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table.
	at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:493) ~[?:?]
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:727) ~[?:?]
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) ~[?:?]
	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:333) ~[?:?]
	at javax.naming.InitialContext.createSubcontext(InitialContext.java:481) ~[?:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:229) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	... 45 more
Caused by: javax.naming.NoInitialContextException: Failed to create InitialContext. No factory specified in hash table.
	at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:451) ~[?:?]
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:727) ~[?:?]
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) ~[?:?]
	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:333) ~[?:?]
	at javax.naming.InitialContext.createSubcontext(InitialContext.java:481) ~[?:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:229) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	... 45 more
[2026-03-30 16:13:07,316] ERROR - DataSourceRepository Error in creating JNDI subcontext 'javax.naming.InitialContext@ab8dbe2/jdbc: Failed to create InitialContext using factory specified in hash table.
org.wso2.carbon.ndatasource.common.DataSourceException: Error in creating JNDI subcontext 'javax.naming.InitialContext@ab8dbe2/jdbc: Failed to create InitialContext using factory specified in hash table.
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:233) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.registerJNDI(DataSourceRepository.java:256) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.registerDataSource(DataSourceRepository.java:359) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceRepository.addDataSource(DataSourceRepository.java:474) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSource(DataSourceManager.java:186) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSources(DataSourceManager.java:157) ~[org.wso2.carbon.ndatasource.core_4.9.27.jar:?]
	at org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.initSystemDataSources(DataSourceServiceComponent.java:206) ~[?:?]
	at org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.setSecretCallbackHandlerService(DataSourceServiceComponent.java:192) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

Steps to Recreate:

  1. Enable debug logs for the following package:
logger.secure_vault.name = org.wso2.carbon.securevault
logger.secure_vault.level = DEBUG
  1. Start APIM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions