Here I'm going to tell you an easy way of debugging java packages deployed under any WSO2 product. So, you don't need to go wondering and go through thousands of lines looking what the bug was in your package.
What you need:
- IntelliJ IDEA
- Download the latest version from http://www.jetbrains.com/idea/download/index.html#linux
- Installation instructions can be found here.
- The WSO2 Product you are deploying the package in. All WSO2 Products are listed here.
Then, go to Run -> Edit Configurations
Add a remote debug configuration by clicking on '+' sign (at top left corner) and then remote.
It comes with a default set of settings. Keep them intact. get to know the port number(generally it's 5005)
Now, start the WSO2 Product you are using with the parameter of debug followed by the port number.
sh wso2server.sh debug 5005
It waits and listens on port 5005 until remote debugging client is started. Start the client by, (in IDEA)
Run -> DebugAll done. Now you can do normal debugging by putting break-points in your .java files.
That's how I got it done. Does this help you to succeed in remote debugging?