WSO2 EI 6.2.0 CAR deployment broken - NoClassDefFoundError - wso2

we have a project, where we have been using WSO2 Enterprise Integrator for a year or so. The implementation became relatively complex over time and it involves combination of proxies, APIs, templates, custom mediators and message broker. This gets deployed via a single CAR deployment artifact. The common code has been shared as WSO2>Extensions>JavaLibraryProject (WSO2 DevStudio). This library gets archived into CAR as:
<artifact name="M2E-Commons" version="1.0.1" type="lib/library/bundle" serverRole="ApplicationServer">
<file>M2E-Commons-1.0.1.jar</file>
</artifact>
This had been working for us just fine for all of the past releases, but got broken with WSO2 EI 6.2.0
This is the beginning of the log while deploying on WSO2 EI 6.1.1:
TID: [-1234] [] [2018-04-09 14:33:52,337] INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} - Deploying Carbon Application : M2E-CAP_1.0.16.car... {org.wso2.carbon.application.deployer.internal.ApplicationManager}
TID: [-1234] [] [2018-04-09 14:33:52,350] INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} - OSGi bundle in file:///opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Commons_1.0.1/M2E-Commons-1.0.1.jar location is about to be installed to Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,351] INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} - OSGi bundle M2E-Commons installed to Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,369] INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} - OSGi bundle M2E-Commons successfully started on Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,369] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Device_1.0.0/M2E-Device-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,370] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Flic_1.0.0/M2E-Flic-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
And this is the same CAR deployed on WSO2 EI 6.2.0:
TID: [-1234] [] [2018-04-06 22:29:46,703] INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} - Deploying Carbon Application : M2E-CAP_1.0.16.car... {org.wso2.carbon.application.deployer.internal.ApplicationManager}
TID: [-1234] [] [2018-04-06 22:29:46,810] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-Device_1.0.0/M2E-Device-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-Flic_1.0.0/M2E-Flic-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-M2L_ISS_1.0.0/M2E-M2L_ISS-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810] INFO {org.apache.synapse.deployers.ClassMediatorDeployer} - Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-M2T_1.0.1/M2E-M2T-1.0.1.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,881] ERROR {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer} - Deployment of the Synapse Artifact from file : /opt/wso2ei-6.2.0/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-ISS.LightOff_1.0.0/M2E-ISS.LightOff-1.0.0.xml : Failed! {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer}
java.lang.NoClassDefFoundError: sk/m2ms/wso2/m2e/M2Mediator
Apparently the OSGi bundle M2E-Commons deployment was not prioritized properly to start before the rest of artifact deployments - resulting in NoClassDefFoundError.
Do you have any ideas?
Can this be solved via some OSGi compliant mechanism/concept?
Or this is a valid bug to be submitted against WSO2?
Thank you in advance,
Peter

An error like NoClassDefFoundError will never happen because of start ordering. It means that a bundle uses the package sk.m2ms.wso2.m2e but neither imports nor contains that package. That is an error in the construction of the bundle, so if this is not a bundle that you built yourself then I would suggest that this is indeed a bug that should be reported to the vendor.

Related

The service cannot be found for the endpoint reference while User Store Configuration Deployer initialization

from time to time our api throws 500 Http codes. I tried to track down the problem and found this kind of errors in the wso2carbon.log:
TID: [0] [AM] [2017-03-05 20:06:11,687] INFO {org.wso2.carbon.core.multitenancy.TenantAxisConfigurator} - Creating tenant AxisConfiguration for tenant: aTenant[2] {org.wso2.carbon.core.multitenancy.TenantAxisConfigurator}
TID: [0] [AM] [2017-03-05 20:06:11,726] INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} - User Store Configuration Deployer initiated. {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer}
TID: [0] [AM] [2017-03-05 20:06:11,730] ERROR {org.apache.axis2.engine.AxisEngine} - The service cannot be found for the endpoint reference (EPR) local://axis2services/some/api/path {org.apache.axis2.engine.AxisEngine}
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) local://axis2services/some/api/path
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:78)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRESTRequest(MultitenantMessageReceiver.java:594)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.doNhttpREST(MultitenantMessageReceiver.java:534)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.doREST(MultitenantMessageReceiver.java:353)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:212)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:79)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:344)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:168)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
TID: [0] [AM] [2017-03-05 20:06:11,803] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: wso2carbon-sts {aTenant[2]} {org.wso2.carbon.core.deployment.DeploymentInterceptor}
TID: [0] [AM] [2017-03-05 20:06:11,856] INFO {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service: org.wso2.carbon.sts - {org.apache.axis2.deployment.DeploymentEngine}
TID: [0] [AM] [2017-03-05 20:06:11,860] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: wso2carbon-sts {aTenant[2]} {org.wso2.carbon.core.deployment.DeploymentInterceptor}
TID: [0] [AM] [2017-03-05 20:06:11,926] INFO {org.wso2.carbon.mediation.initializer.multitenancy.TenantServiceBusInitializer} - Intializing the ESB Configuration for the tenant domain : aTenant {org.wso2.carbon.mediation.initializer.multitenancy.TenantServiceBusInitializer}
After Deploying Axis2 service:... everything runs fine.
So it seems that api calls can not be processed while the UserStoreConfigurationDeployer is running. But this happens between 10 and 20 times a day, causing several errors.
The javadoc says:
/**
* This is to deploy a new User Store Management Configuration file dropped or created at repository/deployment/server/userstores
* or repository/tenant/<>tenantId</>/userstores. Whenever a new file with .xml extension is added/deleted or a modification is done to
* an existing file, deployer will automatically update the existing realm configuration org.wso2.carbon.identity.user.store.configuration
* according to the new file.
*/
But these files are never touched.
I'm not an expert for wso2, so can someone point me where to search? Can the UserStoreConfigurationDeployer be configured to run only at start or only once a day (at 2:00 am or something)?
We are currently using wso2am-1.8.0, the upgrade to 2.something is planned.

WSO2 APIM 2.0 Clustering manage/monitor in carbon UI

I deployed the cluster in one server, here is the node start log:
TID: [-1234] [] [2016-09-02 03:55:41,596] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Cluster domain: wso2.pubstore.domain {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [-1234] [] [2016-09-02 03:55:41,596] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Loading hazelcast configuration from axis2 clustering configuration {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [-1234] [] [2016-09-02 03:55:41,620] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Using wka based membership management scheme {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [-1234] [] [2016-09-02 03:55:41,628] INFO {org.wso2.carbon.core.clustering.hazelcast.util.MemberUtils} - Added member: Host:10.222.47.201, Remote Host:null, Port: 4006, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true {org.wso2.carbon.core.clustering.hazelcast.util.MemberUtils}
TID: [-1234] [] [2016-09-02 03:55:41,628] INFO {org.wso2.carbon.core.clustering.hazelcast.util.MemberUtils} - Added member: Host:10.222.47.201, Remote Host:null, Port: 4007, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true {org.wso2.carbon.core.clustering.hazelcast.util.MemberUtils}
TID: [-1] [] [2016-09-02 03:55:47,768] INFO {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} - Starting polling event receivers {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService}
TID: [-1234] [] [2016-09-02 03:55:50,176] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 8544ms {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [-1234] [] [2016-09-02 03:55:50,274] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Local member: [faedd3de-2842-4447-a84e-0db43c86595d] - Host:10.222.47.201, Remote Host:null, Port: 4006, HTTP:8285, HTTPS:8248, Domain: wso2.pubstore.domain, Sub-domain:worker, Active:true {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [-1234] [] [2016-09-02 03:55:50,664] INFO {org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent} - Initializing Hazelcast Agent {org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent}
TID: [-1234] [] [2016-09-02 03:55:50,676] INFO {org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent} - Successfully initialized Hazelcast Agent {org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent}
TID: [-1234] [] [2016-09-02 03:55:50,686] WARN {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} - CEP started with clustering enabled, but SingleNode configuration given. {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService}
TID: [-1234] [] [2016-09-02 03:55:50,697] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
From carbon UI,
It seems carbon UI can't display cluster information.
So, my question is that can carbon UI display cluster information?
No, As far as I know you can't view cluster related information from UI. However, you can see whether the nodes are correctly joined or not by logs. Check for member joined log messages in all consoles.
Example:
INFO - WKABasedMembershipScheme Member joined [057c1105-97b2-4c99-8b1d-4164127b5684]: /192.168.1.100:4200
Note: To provide a complete answer kindly provide the post or article your following.
Hope this helps.

wso2 api manager wso2 BAM

Tables are created but the data is not populated . followed the below steps https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics this link is used to configure
below is the error i see in the wso2carbon.log on wso2 api manager
TID: [0] [AM] [2014-10-16 20:15:50,544] ERROR {JAGGERY.modules.statistics.usage:jag} - java.lang.NullPointerException: null {JAGGERY.modules.statistics.usage:jag}
TID: [0] [AM] [2014-10-16 20:15:59,210] ERROR {JAGGERY.modules.statistics.usage:jag} - java.lang.NullPointerException: null {JAGGERY.modules.statistics.usage:jag}
TID: [0] [AM] [2014-10-16 20:16:01,473] ERROR {JAGGERY.modules.statistics.usage:jag} - java.lang.NullPointerException: null {JAGGERY.modules.statistics.usage:jag}
No stats will be published if there is no activity on the API. Please:
1. create API activity
2. wait 10 minutes for the bam analysis scripts to run
3. try to access the stats through API Manager again

Gives error while trying to upload rule service in Business Rules Server, WSO2

I am trying to upload a .aar file in the management console of Business rules server, but while uploading i am getting this error: TID: [] [WSO2 BRS] [2013-02-19 18:41:29,556] ERROR {org.wso2.carbon.rulecep.service.RuleCEPDeployerService} - Can not build the service {org.wso2.carbon.rulecep.service.RuleCEPDeployerService}
java.util.MissingResourceException: Can't find resource for bundle org.apache.axis2.i18n.ProjectResourceBundle, key The operation is not valid: operation name missing
at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
at java.util.ResourceBundle.getString(ResourceBundle.java:334)
at org.apache.axis2.i18n.MessageBundle.getMessage(MessageBundle.java:194)
at org.apache.axis2.i18n.MessageBundle.getMessage(MessageBundle.java:83)
at org.apache.axis2.i18n.Messages.getMessage(Messages.java:74)
at org.apache.axis2.deployment.ServiceBuilder.processOperations(ServiceBuilder.java:717)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:355)
at org.wso2.carbon.rulecep.service.ServiceBuilder.createAxisService(ServiceBuilder.java:266)
at org.wso2.carbon.rulecep.service.ServiceBuilder.build(ServiceBuilder.java:146)
at org.wso2.carbon.rulecep.service.RuleCEPDeployerService.deploy(RuleCEPDeployerService.java:77)
at org.wso2.carbon.rule.service.RuleServiceDeployer.deploy(RuleServiceDeployer.java:69)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:371)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:365)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:73)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:94)
at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:93)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
TID: [] [WSO2 BRS] [2013-02-19 18:41:29,572] INFO {org.apache.axis2.deployment.DeploymentEngine} - org.apache.axis2.deployment.DeploymentException: Can't find resource for bundle org.apache.axis2.i18n.ProjectResourceBundle, key The operation is not valid: operation name missing {org.apache.axis2.deployment.DeploymentEngine}
TID: [] [WSO2 BRS] [2013-02-19 18:41:29,572] INFO {org.apache.axis2.deployment.DeploymentEngine} - org.apache.axis2.deployment.DeploymentException: Can't find resource for bundle org.apache.axis2.i18n.ProjectResourceBundle, key The operation is not valid: operation name missing {org.apache.axis2.deployment.DeploymentEngine}
try this method: http://wso2.com/library/articles/2013/05/eclipse-plugin-wso2-business-rules-server
I used to have problems similar to yours while uploading the .aar files through the wizard, but I followed the above tutorial and it works perfectly fine.

GREG 4.1.1 - customizing oracle

I have problem customizing $GREG_HOME/repository/conf/registry.xml file for oracle database 10, I am using ojdbc14_1.0.0.jar.
After recommendations at http://wso2.org/project/registry/4.1.1/docs/installation_guide/db_oracle.html
Edit $GREG_HOME/repository/conf/registry.xml and give the following:
oracle-db
jdbc:oracle:thin:#SERVER_NAME:PORT/DB_NAME
USER_NAME
PASSWORD
oracle.jdbc.driver.OracleDriver
80
60000
5
I have errors at the startup of carbon server ("function is not supported" in Russian):
" TID: [] [WSO2 Governance Registry] [2012-03-29 15:41:41,843]
INFO
{org.wso2.carbon.ldap.server.configuration.LDAPConfigurationBuilder} -
KDC server is disabled.
{org.wso2.carbon.ldap.server.configuration.LDAPConfigurationBuilder}
TID: [] [WSO2 Governance Registry] [2012-03-29 15:41:41,859] INFO
{org.wso2.carbon.ldap.server.DirectoryActivator} - Initializing
Directory Server with working directory
D:\Distr\WSO2greg\WSO2GR~1.1\WSO2GR~1.1\bin..\repository\data\org.wso2.carbon.directory
and port 10389 {org.wso2.carbon.ldap.server.DirectoryActivator} TID:
[] [WSO2 Governance Registry] [2012-03-29 15:41:50,265] ERROR
{org.wso2.carbon.registry.core.jdbc.dao.JDBCPathCache} - Failed to
insert resource to /. Не поддерживаемая функция
{org.wso2.carbon.registry.core.jdbc.dao.JDBCPathCache}
java.sql.SQLException: Не поддерживаемая функция at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
"
WSO2 Governance Registry(4.5.0 onward) supports for different encoding types
Eg:
If you want to use Governance Registry with Russian, you should start the server with proper encoding type.
Windows : wso2server.bat -Dcarbon.registry.character.encoding=windows-1251
Liux : sh wso2server.sh -Dcarbon.registry.character.encoding=windows-1251
More information : http://docs.wso2.org/wiki/display/Governance450/Supported+System+Properties