Dears, I tried https://apim.docs.wso2.com/en/latest/install-and-setup/setup/distributed-deployment/configuring-wso2-identity-server-as-a-key-manager/#step-1-download-and-install-wso2-is to use oracle db as shared_db between wso2 api manager and identity server and got this error ? just created databases and set deployment config based on the document.
nullType class java.lang.reflect.InvocationTargetException
org.wso2.carbon.user.core.UserStoreException: nullType class
java.lang.reflect.InvocationTargetException
The same issue was observed here. Check the provided answer.
Seems like changing the region might resolve the issue (if you have configured all others properly including the compatible drivers).
Related
I have 2 WSO2 Enterprise Integrator behind a load balancer.
I want to activate the tomcat http session replication, and followed the WSO2 documentation.
It seems quite simple :
Add
<Cluster className="org.wso2.carbon.core.session.CarbonTomcatSimpleTcpCluster"/>
and
<Valve className="org.wso2.carbon.webapp.mgt.session.CarbonTomcatSessionReplicationValve"/>
in catalina-server.xml, and make application distributable by adding <distributable/>
in web.xml.
Badly, it seems that WSO2 add some non serializable attributes to the session, making the replication fail.
When I try to connect to the carbon application, I get the following exception :
ERROR - ApplicationDispatcher Servlet.service() for servlet bridgeservlet threw exception java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute CarbonAuthenticator
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1453)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1413)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:149)
at org.eclipse.equinox.http.servlet.internal.HttpSessionAdaptor.setAttribute(HttpSessionAdaptor.java:96)
at org.wso2.carbon.ui.tracker.AuthenticatorRegistry.getCarbonAuthenticator(AuthenticatorRegistry.java:82)
at org.wso2.carbon.ui.CarbonUILoginUtil.getAuthenticator(CarbonUILoginUtil.java:69)
at org.wso2.carbon.ui.CarbonSecuredHttpContext.handleSecurity(CarbonSecuredHttpContext.java:76)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:60)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
Precision : I tried with a fresh WSO2EI 6.1.1 installation, doing only the previously described modifications.
I also had to manually add tomcat-juli-7.0.75.jar and tomcat-trives-7.0.75.jar on wso2/lib/endorsed to avoid ClassNotFoundException.
I checked the WSO2 source code, and saw that the CarbonAuthenticator class is effectively non serializable.
Does anyone already configured the http session replication successfully ?
Thanks in advance,
Regards,
Laurent
I am trying to access a service that I created in WSO2 Data Service Server 3.2.2. using the WSO2 Enterprise Service Bus 4.9.0. I generated the source code to access the service operations, and then created a class mediator using a Mediator Project in the WSO2 Developer Studio. First, the mediator simply calls an operation and print the obtained response. When I access the endpoint through a java application, it works, but when I put the same logic inside the mediator and load it in ESB, I receive the following error:
[2016-05-12 11:22:54,632] ERROR - NativeWorkerPool Uncaught exception
javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider org.apache.cxf.jaxws.spi.ProviderImpl not found
at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:130)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:124)
at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:44)
at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:211)
at javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:220)
at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:160)
at javax.xml.ws.spi.Provider.provider(Provider.java:43)
at javax.xml.ws.Service.(Service.java:35)
at org.wso2.ws.dataservice.myDSSDataService.(myDSSDataService.java:42)
at mediators.DSSMediator.getVolume(DSSMediator.java:12)
at mediators.DSSMediator.mediate(DSSMediator.java:22)
at org.apache.synapse.mediators.ext.ClassMediator.mediate(ClassMediator.java:78)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:317)
at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:363)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
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:745)
First of all to fetch the data from DSS and expose it through ESB does not need a class mediator. Usually we use class mediator to extend the ESB. Could you please let us know the purpose of the class mediator and your usecase. You may refer blogpost [1] to get this thing done. Also please check whether you have copied your database driver into the $DSS_HOME/repository/components/lib directory.
[1] http://dakshithar.blogspot.com/2014/05/entity-aggregation-with-wso2-esb-and_14.html
Thank you for your response.
The idea of use the class mediator in our usecase is to inject a business logic(operations) in the middle of the services' orchestration. Specifically, we can capture the data returned from one DSS data service, process them(using certain computations) and them put the result into the same service flow.
The WSO2 API Manager is raising the following error when adding an API:
[2013-08-08 16:39:00,062] ERROR - ApiMgtDAO Error while adding the API: org.wso2.carbon.apimgt.api.model.APIIdentifier#81588b20 to the database
java.sql.SQLException: Can't call commit when autocommit=true
I am currently using MySQL as database. How do I fix this?
Adding 'relaxAutoCommit=true' parameter to the datasources in wso2am-1.8.0/repository/conf/datasources/master-datasources.xml should fix this issue.
Having linked an instance of ESB v4.6.0 to a G-Reg v4.5.3 as per
http://docs.wso2.org/wiki/display/ESB460/Remote+Registry+Instance+Configuration#RemoteRegistryInstanceConfiguration-Atom-BasedRemoteInstanceConfiguration
When the ESB starts it throws several errors like:
[Framework Event Dispatcher] ERROR AbstractTransportService Error while checking the transport availability
java.lang.NullPointerException
Despite that, I can browse the Registry in both ends but when I create a BAM Profile in ESB while it's successfully saved in the Registry, the ESB starts to fail with:
[http-nio-9443-exec-37] ERROR RPCMessageReceiver Exception occurred while trying to invoke service method getResourceString
java.lang.reflect.InvocationTargetException
and the BAM Profile can't be read in the ESB end neither through the Registry Browser (empty resource) nor the BAM Profile management page (Exceptions). But can be read in the Governance Registry browser.
I set the permissions wide open when I create the shared collection, and the artifacts can be read, write, etc. by everyone.
I can't find information about what can be wrong with the connection, to allow to browse and write, but prevents ESB to read.
Any help would be much appreciated.
I'll respond my own question, to help out somebody else facing the same issue.
Atom-based registry sharing is deprecated "de-facto" in newer versions of WSO2.
Use JDBC-based registry sharing from now on.
Regards
i don't think its deprecated, im pretty sure its a bug, present in 4.5.1/2/3
wso2esb wso2 governance registry
I want to use a external JDBC store as default store instead of the default LDAP store. Followed the documentation in this link.
http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store
Getting the following exception Appreciate any help.
An unknown exception occurred while starting LDAP server.java.lang.NullPointerException: Name is null
You can configure WSO2 IS 4.0.0 with an external JDBC users store.The problem is due to an issue with the instructions in the documentation(1) as some configuration steps are missing there.I have created the jira [DOCUMENTATION-17] to track this doc issue.
Please follow below steps to connect IS 4.0.0 with external jdbc users-store.
1) Change the UserStoreManager class to JDBCUserStoreManager from user-mgt.xml [IS_Home/repository/conf] and add the related database connection property to it as mentioned in (1)
2) Add 'passwordHashMethod' propert within JDBCUserStoreManager and set the value to 'SHA' or 'PLAIN_TEXT' in {IS_HOME}/repository/conf/user-mgt.xml.
Eg: <Property name="passwordHashMethod">SHA</Property>
3) Set value of the 'MultiTenantRealmConfigBuilder' property to 'org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder' in {IS_HOME}/repository/conf/user-mgt.xml.
Eg: <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
4) Enable JDBCTenantManager in tenant-mgt.xml and comment out the config section for CommonHybridLDAPTenantManager.
Once you did above configurations,you'll able to configure WSO2 Identity Server to an external jdbc user store successfully.
(1) http://docs.wso2.org/wiki/display/IS400/Configuring+an+External+JDBC+User+Store
I was able to resolve this.
Start with a clean install of WSO2 IS 4.0.0 if possible.
Apart from following the directions given in the documentation to setup a JDBC datastore; you need to do the following :
Enable JDBCTenantManager in tenant-mgt.xml and comment out CommonHybridLDAPTenantManager2
Set the enable property to false for EmbeddedLDAP in embedded-ldap.xml