Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class Loader Not Reset in Mail Transport #3514

Open
Rickfdalton opened this issue Jan 10, 2025 · 0 comments
Open

Class Loader Not Reset in Mail Transport #3514

Rickfdalton opened this issue Jan 10, 2025 · 0 comments
Labels

Comments

@Rickfdalton
Copy link

Rickfdalton commented Jan 10, 2025

Description

Hi team,

The below error was observed during the invocation of an API.

ERROR {org.wso2.securevault.secret.SecretCallbackHandlerFactory} - A SecretCallbackHandler cannot be found for class name : org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler java.lang.ClassNotFoundException: org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler cannot be found by axiom_1.2.11.wso2v25
  at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:512)
  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:423)
  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:415)
  at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
  at org.wso2.securevault.secret.SecretCallbackHandlerFactory.createSecretCallbackHandler(SecretCallbackHandlerFactory.java:62)
  at org.wso2.securevault.SecretResolverFactory.initPasswordManager(SecretResolverFactory.java:289)
  at org.wso2.securevault.SecretResolverFactory.create(SecretResolverFactory.java:166)
  at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:93)
  at org.wso2.carbon.core.multitenancy.TenantAxisConfigurator.populateAxisConfiguration(TenantAxisConfigurator.java:468)
  at org.wso2.carbon.core.multitenancy.TenantAxisConfigurator.populateAxisConfig(TenantAxisConfigurator.java:328)
  at org.wso2.carbon.core.multitenancy.TenantAxisConfigurator.getAxisConfiguration(TenantAxisConfigurator.java:273)
  at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
  at org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:332)
  at org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:159)
  at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:237)
  at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:87)
  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
  at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:399)
  at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:458)
  at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:206)
  at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:829)

From debugging, we found that the class loader is getting changed during the engagement of mailto transport in API mediation policy.

Regards,
Jathavan

Steps to Reproduce

Steps to Reproduce:
Deploy APIM 4.2.0 with a mediation policy that engages the mail transport.
Trigger the execution of the mediation policy involving the mail transport.

Version

APIM 4.2.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant