Error when setting up WSo2 API Manager with MySQL - wso2

I have setup the CarbonDB to use the MySQL, and changed the identity.xml to use the Carbon db.
But when we run the -Dsetup we receive this error
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.io.FileNotFoundException: E:\soft\wso2am-2.1.0\bin\..\dbscripts\identity\mysql.sql (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.wso2.carbon.identity.core.persistence.IdentityDBInitializer.executeSQLScript(IdentityDBInitializer.java:235)
is this expected? Is there any workaround?
Thanks,

Related

Bulk user import failing on wso2 identity server 5.11.0 with java.lang.NoClassDefFoundError: org/apache/commons/collections4/ListValuedMap

WSO2 Identity Server : 5.11.0
I am facing below error in logs while importing users using bulk import.
{org.apache.axis2.rpc.receivers.RPCMessageReceiver} - org/apache/commons/collections4/ListValuedMap java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/collections4/ListValuedMap
at org.wso2.carbon.user.mgt.bulkimport.ExcelUserBulkImport.createWorkbook(ExcelUserBulkImport.java:135)
at org.wso2.carbon.user.mgt.bulkimport.ExcelUserBulkImport.addUserList(ExcelUserBulkImport.java:59)
at org.wso2.carbon.user.mgt.UserRealmProxy.bulkImportUsers(UserRealmProxy.java:2208)
at org.wso2.carbon.user.mgt.UserAdmin.bulkImportUsers(UserAdmin.java:563)
... 80 more
**Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections4.ListValuedMap cannot be found by poi_3.17.0.wso2v1**
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.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 84 more
I tried out user bulk import with WSO2 - Identity Server version 5.11.0 with H2 and I could not reproduce any errors as such. But according to what I see there could be a missing dependency refer stackoverflow comment. You can download that missing jar file, add it to <IS_HOME>/repository/components/lib folder and try the scenario again after server restart. Furthermore you can validate any other issues regarding this scenario through the docs.

Unable to start WSO2 API Manager with Traffic Manager Profile

I am configuring the open-source version of WSO2 API Manager 3.1.0 in Distributed Setup. I have completed all the configurations, but when I try to start the API manager with Traffic Manager (or any other profile as a matter of fact), I am getting the below error.
org.apache.axis2.AxisFault: Exception occured while loading the Axis configuration from /wso2am-3.1.0/repository/conf/axis2/axis2.xml
at org.wso2.carbon.core.CarbonAxisConfigurator.getAxisConfiguration(CarbonAxisConfigurator.java:194) ~[org.wso2.carbon.core_4.6.0.jar:?]
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64) ~[axis2_1.6.1.wso2v41.jar:?]
at org.wso2.carbon.core.CarbonConfigurationContextFactory.createNewConfigurationContext(CarbonConfigurationContextFactory.java:65) ~[org.wso2.carbon.core_4.6.0.jar:?]
at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:415) [org.wso2.carbon.core_4.6.0.jar:?]
at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:305) [org.wso2.carbon.core_4.6.0.jar:?]
at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118) [org.wso2.carbon.core_4.6.0.jar:?]
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
Caused by: org.apache.axis2.deployment.DeploymentException: org.apache.synapse.transport.passthru.PassThroughHttpSender cannot be found by axis2_1.6.1.wso2v41
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:713) ~[axis2_1.6.1.wso2v41.jar:?]
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:125) ~[axis2_1.6.1.wso2v41.jar:?]
at org.wso2.carbon.core.CarbonAxisConfigurator.populateAxisConfiguration(CarbonAxisConfigurator.java:341) ~[org.wso2.carbon.core_4.6.0.jar:?]
at org.wso2.carbon.core.CarbonAxisConfigurator.getAxisConfiguration(CarbonAxisConfigurator.java:192) ~[org.wso2.carbon.core_4.6.0.jar:?]
... 8 more
Caused by: java.lang.ClassNotFoundException: org.apache.synapse.transport.passthru.PassThroughHttpSender cannot be found by axis2_1.6.1.wso2v41
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:512) ~[org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:423) ~[org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:415) ~[org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:155) ~[org.eclipse.osgi_3.14.0.v20190517-1309.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:315) ~[?:?]
at org.apache.axis2.util.Loader.loadClass(Loader.java:261) ~[axis2_1.6.1.wso2v41.jar:?]
at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:687) ~[axis2_1.6.1.wso2v41.jar:?]
at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:125) ~[axis2_1.6.1.wso2v41.jar:?]
at org.wso2.carbon.core.CarbonAxisConfigurator.populateAxisConfiguration(CarbonAxisConfigurator.java:341) ~[org.wso2.carbon.core_4.6.0.jar:?]
at org.wso2.carbon.core.CarbonAxisConfigurator.getAxisConfiguration(CarbonAxisConfigurator.java:192) ~[org.wso2.carbon.core_4.6.0.jar:?]
... 8 more
Please let me know what changes I have to do in order to start the servers without any issues.
Thanks in advance.
try following these steps to avoid this error
Unzip a fresh distribution, do not start it,
Navigate to APIM-HOME/bin folder and run sh profileSetup.sh -Dprofile=traffic-manager This will remove files and configs not required for traffic manager
Next add your configuration in deployment.toml Only shared db will be needed for traffic manager and keystore configs
Start the server sh wso2server.sh -Dprofile=traffic-manager
Try to follow this document when you set up these distribute setup profiles.
https://apim.docs.wso2.com/en/next/install-and-setup/setup/distributed-deployment/product-profiles/#method-1-optimizing-before-starting-the-server

Startup Errors for Version 5.2 of WSO2 Identity Server

I have downloaded the latest version of wso2 identity server (5.2). However during the startup process I am getting the following errors.
[2016-10-26 09:50:27,563] INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} - Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/wso2].File[D:\wso2is-5.2.0\bin\..\repository\deployment\server\webapps\wso2.war]
java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
java.security.KeyStoreException: failed to extract any certificates or private keys - maybe bad password?
[2016-10-26 09:50:29,074] ERROR {org.jaggeryjs.scriptengine.engine.RhinoEngine} -
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at org.apache.commons.ssl.SSL.<init>(SSL.java:154)
at org.apache.commons.ssl.SSLClient.<init>(SSLClient.java:60)
at org.apache.commons.ssl.HttpSecureProtocol.<init>(HttpSecureProtocol.java:55)
at org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory.<init>(EasySSLProtocolSocketFactory.java:94)
at org.jaggeryjs.hostobjects.xhr.XMLHttpRequestHostObject.<init>(XMLHttpRequestHostObject.java:84)
... 113 more
Caused by: java.lang.NullPointerException
at org.apache.commons.ssl.TrustMaterial.<init>(TrustMaterial.java:127)
at org.apache.commons.ssl.TrustMaterial.<init>(TrustMaterial.java:118)
at org.apache.commons.ssl.TrustMaterial.<clinit>(TrustMaterial.java:108)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.ssl.KeyMaterial
at org.apache.commons.ssl.SSL.<init>(SSL.java:154)
at org.apache.commons.ssl.SSLClient.<init>(SSLClient.java:60)
It is a vanilla version of the server and I haven't made any kind of configuration changes. I am running on JDK 1.8. Can someone tell me what the resolution will be. I tried including "not-yet-commons-ssl-0.3.10.jar" and that didnt help.
Regards
Ranjith Madhavan
I recently got this exception, it was due to the fact that i donot have /lib/security/cacerts and /lib/security/jssecacerts in my jre.

SAAJMetaFactoryImpl not found JBOSS EAP 6.3

I am trying to deploy my application pharma.ear onto JBOSS EAP 6.3 but getting an error:
17:23:42,622 SEVERE [javax.enterprise.resource.webservices.jaxws.server.http] (ServerService Thread Pool -- 78) WSSERVLET11: failed to parse runtime descriptor: java.lang.Error: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factoryProvider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found: java.lang.Error: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factoryProvider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:181) [jaxws-rt.jar:2.1.3]
at com.sun.xml.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:83) [jaxws-rt.jar:2.1.3]
at com.sun.xml.ws.api.BindingID.<clinit>(BindingID.java:318) [jaxws-rt.jar:2.1.3]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.createBinding(DeploymentDescriptorParser.java:325) [classes:2.1.3]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:264) [classes:2.1.3]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:156) [classes:2.1.3]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108) [jaxws-rt.jar:2.1.3]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_17]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.xml.soap.SOAPException: Unable to create SAAJ meta-factoryProvider com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl not found
at javax.xml.soap.SAAJMetaFactory.getInstance(SAAJMetaFactory.java:83) [jboss-saaj-api_1.3_spec-1.0.3.Final-redhat-1.jar:1.0.3.Final-redhat-1]
at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:144) [jboss-saaj-api_1.3_spec-1.0.3.Final-redhat-1.jar:1.0.3.Final-redhat-1]
at com.sun.xml.ws.api.SOAPVersion.<init>(SOAPVersion.java:178) [jaxws-rt.jar:2.1.3]
I have saaj-impl.jar and saaj-api.jar in my pharma.war/WEB-INF/lib.
Can anyone please help me in resolving this issue.
Can you deploy the ear file on another app server, e.g. JBoss 7.1.1.Final. This is just to verify that the issue is not with your ear file.
Also try not bundle the SAAJ jar with your war/ear file. Let JBoss pick it up from it own modules. In Maven you can do that by provided

WSO2 BPS 3.2 causes a NoClassDefFoundError when executing a BPEL Process

I have a BPEL deployed on WSO2 BPS 3.2.0 that invokes a webservice from w3schools.com and returns the result back to the BPEL invoker. When executing the BPEL service through SoapUI, i received a Timeout Exception, however upon close observation in the logs, i came across this error
TID: [0] [BPS] [2014-08-19 19:04:02,827] ERROR {org.apache.ode.jacob.vpu.JacobVPU} - Method "run" in class "org.apache.ode.bpel.runtime.INVOKE" threw an unexpected exception. {org.apache.ode.jacob.vpu.JacobVPU}
java.lang.NoClassDefFoundError: org/apache/synapse/core/axis2/SOAPUtils
at org.wso2.carbon.unifiedendpoint.core.UnifiedEndpointHandler.handleMessageOutput(UnifiedEndpointHandler.java:105)
at org.wso2.carbon.unifiedendpoint.core.UnifiedEndpointHandler.invoke(UnifiedEndpointHandler.java:59)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:426)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.bpel.core.ode.integration.utils.AxisServiceUtils.invokeService(AxisServiceUtils.java:305)
at org.wso2.carbon.bpel.core.ode.integration.PartnerService.invoke(PartnerService.java:324)
at org.wso2.carbon.bpel.core.ode.integration.BPELMessageExchangeContextImpl.invokePartner(BPELMessageExchangeContextImpl.java:43)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.invoke(BpelRuntimeContextImpl.java:793)
at org.apache.ode.bpel.runtime.INVOKE.run(INVOKE.java:140)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:898)
at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeNewInstance(PartnerLinkMyRoleImpl.java:208)
at org.apache.ode.bpel.engine.BpelProcess$1.invoke(BpelProcess.java:283)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:224)
at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:279)
at org.apache.ode.bpel.engine.BpelProcess.handleJobDetails(BpelProcess.java:434)
at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:558)
at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:467)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:536)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:530)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:280)
at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:235)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:530)
at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:514)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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)
Caused by: java.lang.ClassNotFoundException: org.apache.synapse.core.axis2.SOAPUtils
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 37 more
Upon close inspection , it seems that the %CARBON_HOME%/repository/components/plugins folder doesnt contain the
synapse-core_2.1.2.wso2v4.jar
I tried placing the jar file directly in the folder, and have also tried using the patch mechansim
Created a folder patch0006 in %CARBON_HOME%/repository/components/patches
Place the jar file in this new folder
Restart the server
Patch Mechanism successfully places the file in %CARBON_HOME%/repository/components/plugins folder.
But to no avail, the server still is unable to find the SOAPUtils class file. Any ideas, how to proceed further ?