You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the generated transportReceiver is incorrect, they are facing the following issue
[2025-01-08 14:36:33,973] ERROR {ListenerManager} - Couldn't initialize the oracleaqADTtransport listener java.lang.ClassCastException: class java.lang.String cannot be cast to class org.apache.axiom.om.OMElement (java.lang.String is in module java.base of loader 'bootstrap'; org.apache.axiom.om.OMElement is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @57729490)
at org.apache.axis2.transport.oracleaq.OracleAQConnectionFactory.<init>(OracleAQConnectionFactory.java:87)
at org.apache.axis2.transport.oracleaq.OracleAQConnectionFactoryManager.loadConnectionFactoryDefinitions(OracleAQConnectionFactoryManager.java:59)
at org.apache.axis2.transport.oracleaq.OracleAQConnectionFactoryManager.<init>(OracleAQConnectionFactoryManager.java:46)
at org.apache.axis2.transport.oracleaq.OracleAQListener.doInit(OracleAQListener.java:66)
at org.apache.axis2.transport.base.AbstractTransportListenerEx.init(AbstractTransportListenerEx.java:62)
at org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:84)
at org.wso2.micro.integrator.core.internal.CoreServerInitializer.initializeCarbon(CoreServerInitializer.java:220)
at org.wso2.micro.integrator.core.internal.CoreServerInitializer.initMIServer(CoreServerInitializer.java:125)
at org.wso2.micro.integrator.core.internal.Activator.start(Activator.java:103)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1013)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
at org.eclipse.osgi.container.Module.doStart(Module.java:598)
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
After checking on this, we identified that the issue is caused due to the way we generated the axis2 configs through the j2 template file.
We have edited the j2 file as follows and it generated the transportReceiver correctly and the issue was resolved
{% for transport_item in custom_transport.listener %}
<transportReceiver name="{{transport_item.protocol}}" class="{{transport_item.class}}">
<parameter name="{{transport_item.name}}" locked="false">
{% for parameter_key,parameter_value in transport_item.parameter.items() %}
<parameter name="{{parameter_key}}" locked="false">{{parameter_value}}</parameter>
{% endfor %}
{% if transport_item.keystore is defined %}
<parameter name="keystore" locked="false">
<KeyStore>
<Location>{{transport_item.keystore.location}}</Location>
<Type>{{transport_item.keystore.type}}</Type>
<Password>{{transport_item.keystore.password}}</Password>
<KeyPassword>{{transport_item.keystore.key_password}}</KeyPassword>
</KeyStore>
</parameter>
{% endif %}
{% if transport_item.truststore is defined %}
<parameter name="truststore" locked="false">
<TrustStore>
<Location>{{transport_item.truststore.location}}</Location>
<Type>{{transport_item.truststore.type}}</Type>
<Password>{{transport_item.truststore.password}}</Password>
</TrustStore>
</parameter>
{% endif %}
{% if transport_item.ssl_profile.file_path is defined %}
<parameter name="dynamicSSLProfilesConfig">
<filePath>{{transport_item.ssl_profile.file_path}}</filePath>
<fileReadInterval>{{transport_item.ssl_profile.read_interval}}</fileReadInterval>
</parameter>
{% endif %}
</parameter>
</transportReceiver>
{% endfor %}
With the change on J2 file, now the transportReceiver is generated as follows in axis2 file
Description
We are defining the custom_transport_listeners as follows in deployment.toml file
After starting the pack, the generated transportReceiver in axis2.xml is as follows
Since the generated transportReceiver is incorrect, they are facing the following issue
After checking on this, we identified that the issue is caused due to the way we generated the axis2 configs through the j2 template file.
We have edited the j2 file as follows and it generated the transportReceiver correctly and the issue was resolved
With the change on J2 file, now the transportReceiver is generated as follows in axis2 file
Please provide a patch version so the customer can use it in their deployment
Steps to Reproduce
Get a MI pack, define the custom_transport.listener as above in deployent toml and start the pack
Now examine the axis2.xml file
Version
MI 4.1.0 latest version
Environment Details (with versions)
non-prod
The text was updated successfully, but these errors were encountered: