WSO2 Identity server Error starting LDAP server - wso2-identity-server

installed Wso2 as shown in wso2 documentation, changed the default db to mssql and now i keep getting errors on trying to restart the server
it is running on ubuntu
ERROR {org.wso2.carbon.apacheds.impl.ApacheLDAPServer} - Error starting LDAP server.
org.apache.directory.shared.ldap.exception.LdapConfigurationException: ERR_171 Failed to bind an LDAP service (10,389) to the service registry.
at org.apache.directory.server.ldap.LdapServer.startNetwork(LdapServer.java:582)
ERROR {org.wso2.carbon.user.core.common.DefaultRealm} - nullType class java.lang.reflect.InvocationTargetException
org.wso2.carbon.user.core.UserStoreException: nullType class java.lang.reflect.InvocationTargetException
at org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:395)
at org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:222)
at org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:127)
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:264)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:102)
[
2019-08-26 15:59:40,317] ERROR {org.wso2.carbon.user.core.internal.Activator} - Cannot start User Manager Core bundle
org.wso2.carbon.user.core.UserStoreException: Cannot initialize the realm.
at org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:274)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:102)
at org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:115)
at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:72)
at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
i have put bits of the errors i get when starting the server
please can anyone help i am new to this

Could you check if you have followed the steps given in this guide when changing the default DB to MSSQL?
[1] https://docs.wso2.com/display/ADMIN44x/Changing+to+MSSQL

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.

Migrate Web Service from Tomcat to Wildly

I am trying to migrate a SOAP Web service that works well with Tomcat but gives following error with JBoss:
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371)
at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:539)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:119)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:120)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:186)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
... 13 more
Caused by: org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/https.
at org.apache.cxf.bus.managers.DestinationFactoryManagerImpl.getDestinationFactory(DestinationFactoryManagerImpl.java:122)
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:79)
at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:63)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:170)
... 16 more
I did try to remove from standalone.xml after which the web service started working but after doing this my another web service that was made with jboss stopped so i have to retain this module in standalone.xml.
I removed these errors by regenerating the webservice by wsdl and JAXB artifacts.

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.

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 ?

WSO2 ESB: JAR file with callback handler not loading

I am trying to setup a proxy service that hides the security of a back end service, following the tutorial found here.
For the password callback handler I follow the instructions found here.
All pretty basic and straightforward.
I compiled the PWCBHandler class into a JAR file and put it in the esbhome\repository\components\lib folder together with all the JAR files from wss4j-1.6.15\lib.
I see no warnings or errors during startup of the ESB. However when I test the proxy service, I get the following error in the log:
org.apache.axis2.AxisFault: Error in obtaining a token
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:76)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
...
Caused by: org.apache.rampart.RampartException: Error in obtaining a token
at org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:779)
at org.apache.rampart.util.RampartUtil.getIssuedToken(RampartUtil.java:675)
...
Caused by: org.apache.rampart.RampartException: Cannot load password callback class: PWCBHandler
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:144)
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:118)
at org.apache.rampart.util.RampartUtil.getToken(RampartUtil.java:723)
...
... 26 more
Caused by: java.lang.ClassNotFoundException: PWCBHandler
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)
... 26 more
Caused by: java.lang.ClassNotFoundException: PWCBHandler
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)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:200)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:163)
at org.apache.rampart.util.RampartUtil.getPasswordCB(RampartUtil.java:142)
... 28 more
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_CODE : 0
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_MESSAGE : Unexpected error during sending message out
[2014-06-16 15:56:23,103] WARN - FaultHandler ERROR_DETAIL : org.apache.synapse.SynapseException: Unexpected error during sending message out
at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:170)
at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:69)
...
In other words, the ESB and Rampart know about the PWCBHandler class but it cannot load / access it.
At this point I have no ideas where to look further. Is there a way where I can check which JAR files were loaded during startup? What might prohibit the loading of the PWCBHandler JAR?
Thanks for your feedback,
Olivier
Thanks to the answer from Rajeev I got confirmation the class was not loading.
I recreated the JAR file with the class added to a package and after restarting the server a bundle for the JAR was created.
It looks like custom classes need to be added to a package for Carbon to create a bundle from it.
I know, I know, classes should always be added to a package, but I am not a Java hero and did not want to bother with the dirs and such.
Lessons learned! :)