menu

Saturday, May 21, 2016

Tomcat error when deploying web app : addFilter, addServlet NoSuchMethodException

Hey peeps,

Just a quick update on something i found today. I was hacking things with a tomcat server (wso2 IS). My need was to duplicate a webapp and make some changes as I like. But when I changed those 'stuff' in the webapp source I had to specifically mention some dependency versions (build tool was maven) rather than obtaining them from the parent pom.

And when I generated the war and deployed it in the server I got the following error



Solution

It turns out that the reason for this error has nothing to do with the actual content of the web.xml
But a dependency mismatch
That is some libraries in your WEB-INF\lib directory of the war file is conflicting with some libraries already loaded. So the fix was for me to delete the lib directory completely and deploy which worked!

But according to some stackoverflow answers, deleting just tomcat-catalina.jar and/or all tomcat-*.jars will fix it

Happy Deploying! :D

Monday, April 11, 2016

Laravel 5 : Getting started for collaborative development

Hey folks,

Laravel, for those who aren't familiar is a php framework that is widely gaining popularity these days. This came into my attention when I had to implement an HR system in PHP. Usually I would have gone with Symfony, which I know has a larger support base. But the issue is that Symfony has a huge learning curve and I have to work with a team. Laravel on the hand has a less difficult learning procedure and it can be used to start implementation rapidly.

But Laravel it self is really confusing sometimes. Mostly if you are not familiar to tools like composer and git (for collaborative development). So here's a quick tutorial in which I mention steps I took to setup Laravel and a git repo for development.

Friday, March 25, 2016

WSO2 Identity Server : Understanding XACML 3.0 policies, implementing them in IS and testing with SoapUI

Hi folks,

This is a weird way to resume a blog that was silent for a long time. But I guess this will do. The reason for this post is mainly GSoC 16' which is currently happening. And in selecting a project for it, I came up with WSO2 which has middleware based products. And with time constraints, I was forced to study a system overnight and thought that documenting what I found would be beneficial for those who try to do the same later.

So the question here is what exactly WSO2 Identity Server does?

Saturday, August 1, 2015

Explained: Finding the Longest Increasing Subsequence using Segment Tree

Hey guys,

Well this is just random but i found out that for my most disappointment that the tutorials on the above topic arent really useful for the novice. Most tutorials just give the procedure in english or the code but not both. Hence I'm trying to write something human-understandable in the simplest english i know :D

Problem

Find the length of the longest increasing subsequence in a given array of integers
For the context of the tutorial we assume all integers are positive hence 0 will be our minimum.
Read more about in the wikipedia article

Wednesday, July 1, 2015

Things I wish someone told me when doing Haskell

Hey people,

Long time not posts, yeah i know. Stuck with useless stuff. Finally got some time for a post. This would really be a bundle of snippets mainly for the beginner haskell coders that will soon be frustrated with all the functional elements. I'll try to keep this updated with every new frustration i get :D

IO

Doing IO was the worst thing i had to go through in haskell. As you know that haskell wont allow usual IO in a function, you have to explicitly use do to use a IO command

StdIn as a String


StdIn as an integer/double


Using a function inside a do block with IO

Friday, January 9, 2015

Function to generate a list of floating point numbers with defined precision in a given range in haskell

Well the top says it all
I'll just put the code here :)

n -  no of precisions
st - starting limit
en - ending limit



Tuesday, December 30, 2014

ExceptionInInitializerError when AsyncTask is used inside a Timer

Hey people,

A quick one here, I was working on a late project and got this weird bug. Tested my android app on 4.2 working all fine but suddenly it crashed on everything below it. Here's the code cause the error

See the problem here is that according to Android Dev, the Async Task MUST run in the UI thread. But the Timer is having it's own seperate thread. So, with the help of Stackoverflow :D I managed a solution where the Timer contains a Handler which would be running in the UI thread. Modified code

Refer http://stackoverflow.com/questions/17049516/android-gingerbread-cant-create-handler-inside-thread-that-has-not-called-loop for more references

Cya People