In Wso2 ESB how to connect to HBase and query. As wso2 ESB we have dblookup mediator but it is for sql databases. So is there any solution for connection with HBASE.
You need to first provide the datasource details in wso2 esb, either you can do from front end or backend. i have mentioned the path WSO2_Home/repository/conf/datasources/update below in datasource.xml file.
<datasource>
<name>WSO2_ANALYTICS_RS_DB_HBASE</name>
<description>The datasource used for analytics file system</description>
<jndiConfig>
<name>jdbc/WSO2HBaseDB</name>
</jndiConfig>
<definition type="HBASE">
<configuration>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>fs.hdfs.impl</name>
<value>org.apache.hadoop.hdfs.DistributedFileSystem</value>
</property>
<property>
<name>fs.file.impl</name>
<value>org.apache.hadoop.fs.LocalFileSystem</value>
</property>
</configuration>
</definition>
</datasource>
After the changes try restarting the server and see if you are able to connect from front end.
Related
In WSO2 EI 6.5.0 , port offset has been done <Offset>3</Offset> in the below path <PRODUCT_HOME>/repository/conf/carbon.xml.
I have designed Task scheduler to call proxy service.
<?xml version="1.0" encoding="UTF-8"?>
<task class="org.apache.synapse.startup.tasks.MessageInjector" group="synapse.simple.quartz" name="EmailTicketingScheduler" xmlns="http://ws.apache.org/ns/synapse">
<trigger interval="60"/>
<property name="proxyName" value="EmailTicket_ConnectMSOutlook_Proxy" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="soapAction" value="urn:mediate" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="message" xmlns:task="http://www.wso2.org/products/wso2commons/tasks">
<root xmlns=""/>
</property>
<property name="injectTo" value="proxy" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
</task>
When Jobs running, Scheduler failed to call proxy even this proxy is available in WSO2 EI Server due to this port offset change.
Getting below ERROR:
Connection refused or failed for: localhost/127.0.0.1:8280
What are all the other configuration needs to be enabled/changed in WSo2 EI after changing port offset?
I have tested with a simple proxy service and the same schedule task. I did not have any issues with invoking the proxy service from the schedule task when I configure an offset. Since there is a service trying to connect to 8280 port, can you check if there are any internal calls from the proxy service to port 8280.
I am using ActiveMQ Version 5.7.0 with Jetty on a RHEL 7 VM.
I have already enabled the ssl connector to access the web console via https.
Now I am trying to configure a webconsole access redirect from HTTP to HTTPS but I am really struggling with it.
In have found this guideline for "How to have Jetty redirect https to https" in this forum site: https://serverfault.com/questions/367660/how-to-have-jetty-redirect-http-to-https
I have problems to follow both steps since:
Step 1: Configure the web.xml file --> I don't know which of the following is the correct one:
apache-activemq-5.7.0/webapps/fileserver/WEB-INF/web.xml
apache-activemq-5.7.0/webapps/admin/WEB-INF/web.xml
Step 2: The instruction looks very different from the jetty.xml file of ActiveMQ where different connectors are used:
<property name="connectors">
<list>
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<property name="port" value="8161" />
</bean>
<bean id="SecureConnector" class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<property name="port" value="8162" />
<property name="keystore" value="file:${activemq.conf}/broker.ks" />
<property name="password" value="password" />
</bean>
</list>
</property>
Can anyone help me please?
Thanks very much in advance.
The admin web app is the one you want to modify. The fileserver web app is for uploading files and it was removed in 5.14.0 via AMQ-6276 due to security issues (e.g. CVE-2016-3088).
I strongly encourage you to upgrade to the latest release.
I have a Oracle Database 12c and I want to create a Data source for that in WSO2 Data Services Server.
I have downloaded ojdbc7.jar and copied into repository/components/lib folder of WSO2 Data Services Server
While Creating Data source from DSS UI, it is asking for jdbc:oracle:[drivertype]:[username/password]#[host]:[port]/[database]
I am confused with "drivertype" what should be the value of drivertype?
Driver type should be 'thin'[1]. ojdbc7 comes under JDBC thin [2].
It should be one of one of oci, thin, or kprb (server-side internal).
Read this for more information: http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#05_04
This is my config for an Oracle DB:
<config id="etecsa2Oracle">
<property name="org.wso2.ws.dataservice.user">schemaName</property>
<property name="org.wso2.ws.dataservice.password">userPassword</property>
<property name="org.wso2.ws.dataservice.protocol">jdbc:oracle:thin:schemaName/userPassword#localhost:1521/ORCL</property>
<property name="org.wso2.ws.dataservice.driver">oracle.jdbc.driver.OracleDriver</property>
<property name="org.wso2.ws.dataservice.minpoolsize"/>
<property name="org.wso2.ws.dataservice.maxpoolsize"/>
<property name="org.wso2.ws.dataservice.validation_query"/>
</config>
Inside component/lib I put this jar: ojdbc6.jar
I am newbie to WSO2 AM and researching to understand it's good features. It seems that "The default database of user manager is the H2 database that comes with WSO2 products. We can configure it to point to databases by other vendors such as IBM DB2, Oracle, MySQL using the scripts provided by WSO2 for installing and configuring relational databases".
How we can connect WSO2 AM to MySQL DB? What files needs to be
changed? (I'm interested to use MySQL and not H2 db)
How we can use external client to see all tables?
Requesting you to please guide me on this.
Following sample works better with a fresh install(prior to initial start-up) :
Put the Mysql jar connector/driver in wso2am/repository/components/lib directory.
MySql you will need 2 databases :
mysql> create database reg_db;
mysql> create database am_db;
mysql> grant all on reg_db.* to dba#localhost identified by 'dba';
mysql> grant all on am_db.* to dba#localhost identified by 'dba';
mysql> flush privileges;
Overwrite the following 2 data sources in wso2am/repository/conf/datasources/master-datasources.xml
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration> <url>jdbc:mysql://localhost:3306/reg_db?autoReconnect=true&relaxAutoCommit=true&</url>
<username>dba</username>
<password>dba</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>false</defaultAutoCommit>
</configuration>
</definition>
</datasource>
<datasource>
<name>WSO2AM_DB</name>
<description>The datasource used for API Manager database</description>
<jndiConfig>
<name>jdbc/WSO2AM_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration> <url>jdbc:mysql://localhost:3306/am_db?autoReconnect=true&relaxAutoCommit=true&</url>
<username>dba</username>
<password>dba</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>false</defaultAutoCommit>
</configuration>
</definition>
</datasource>
Start the server with wso2server.sh -Dsetup or wso2server.bat -Dsetup
I am developing a soap web service client with spring.
I am using webServiceTemplate
How do I specify which kind of version of soap do I use?
I can see that it s using soap 1.1 by default.
I want to force it to use soap 1.2
How can I do that?
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
<property name="soapVersion">
<util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12"/>
</property>
</bean>
i just found, i need to pass a message Factory
You just specify the soap version in the configuration file of spring usually spring.cfg.xml in the following way:
<bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
<property name="soapVersion">
<util:constant static-field="org.springframework.ws.soap.SoapVersion.SOAP_12"/>
</property>
</bean>