Pages

Wednesday, January 28, 2015

WSO2Con EU 2015

WSO2Con brings together architects, directors, and CxOs who desire to gain insights into creating a connected business. The WSO2Con EU 2015 agenda will showcase and share technology developments, architecture guidelines and best practices to compete in a connected world using the WSO2 enterprise middleware platform.










You can find more information from here

Monday, January 26, 2015

Install XACML Engine in WSO2 API

This article explains how to install XACML engine in WSO2 API Manager.

Prerequisite
WSO2 API Manager 1.5 or above

Steps
1. Download and unzip WSO2 API Manager
2. Start WSO2 API Manager.
3. Install XACML feature in API Manager.

Goto http://localhost:9443/carbon and login to management console. Once inside the admin console, select the ‘configure’ tab from the tabs available on the left-hand side. Inside the ‘configure’ menu you would find the features icon as shown below.










Inside the features page, select the repository management tab and click on the ‘add repository’ icon











Add the following repository details in the ‘Add Repository’ page.
Name – Turing
Once the repository is added, click on the ‘Available Features’ tab. Select the newly added repository and un-tick the ‘Group features by category option’ and click on ‘Find features’ button.

Select following two XACML features from the search list and install

Follow the installation flow and install the XACML features. After the installation is completed restart WSO2 API Manager.

Sunday, January 11, 2015

Remote debug in Tomcat

As developers we always need to debug the application, Please see below the simple steps to enable remote debug in apache tomcat. Here I am using Mac OS X. You can use same steps in Linux environment.

1. Open Terminal window and Set CATALINA_OPTS environment variable. Execute following command.

export CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n"


2. Goto <Tomcat_home>/bin and execute below command.

./catalina.sh run

3. Open required project from IntelliJ IDEA. (You can use other IDE such as Eclipse)

4. Go to Run->Edit Configurations


4. Add Remote debug by Clicking + and Remote


5. Change debug port to 1043 and click Apply and Debug


Thats all, you can add required breakpoint and debug the application.

Cheers. Hope this will help you all.



Troubleshoot WSO2 products

Troubleshooting is something key thing software products should have both in production and development stage. All WSO2 product has debug log facility to help developers to understand the exact problem.

Steps to enable debug log

1. Edit log4j.properties file which located in <IS_HOME>/repository/conf directory.

2. Add following entry to enable debug logs for all component in the product.

log4j.logger.org.wso2=DEBUG

3. Sometime you want to enable debug log in specific component, then you can the entry as follows.

log4j.logger.org.wso2.carbon.user.core=DEBUG

This will enable all logs related to user core component.

4. Restart the product.


Hope this will help you.

Wednesday, November 26, 2014

Resolve "ORA-01882: timezone region not found" when start WSO2 Product with Oracle Database

When datasource point to Oracle DB following error occurred when start any WSO2 product.

Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region  not found

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:573)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:752)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:366)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:536)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at org.wso2.carbon.user.core.claim.dao.ClaimDAO.getDialectCount(ClaimDAO.java:158)

... 22 more

Solution

Add following entry to <WSO2_PRODUCT>/bin/wso2server.sh 

-Duser.timezone="+05:30" \

Please see below a sample wso2server.sh with after modification with highlight. 



Monday, November 24, 2014

How to enable H2 database browser in WSO2 Products

Follow below steps to enable H2 Database browser in WSO2 Products. Here I am using WSO2 Identity Server . 

1. Download Identity Server (http://wso2.com/products/identity-server/)
2. Unzip downloaded pack (Ex. unzip wso2is-5.0.0.zip on Linux or Mac)
3. Edit <IS_HOME>/repository/conf/carbon.xml and uncomment H2DatabaseConfiguration section.
4. Remove all the tags after <property name="webAllowOthers" /> 

Please see below the relevant section in the carbon.xml after modification.

<H2DatabaseConfiguration>
        <property name="web" />
        <property name="webPort">8082</property>
        <property name="webAllowOthers" />
</H2DatabaseConfiguration>

5. Start server sh <IS_HOME>/bin/wso2server.sh

7. You will see following window


8. Enter required JDBC URL, User Name and Password which you can them in <IS_HOME>/repository/conf/datasources/master-datasources.xml

Please see below the required data have highlighted in a sample 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:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url>
                    <username>wso2carbon</username>
                    <password>wso2carbon</password>
                    <driverClassName>org.h2.Driver</driverClassName>
                    <maxActive>50</maxActive>
                    <maxWait>60000</maxWait>
                    <testOnBorrow>true</testOnBorrow>
                    <validationQuery>SELECT 1</validationQuery>
                    <validationInterval>30000</validationInterval>
                </configuration>
            </definition>
        </datasource>

9. Click Connect.





Tuesday, March 27, 2012

Please join me to congratulate Susantha Senevirathne on his new Job at anotherinnovation Ltd as a Senior Software Engineer