Tuesday, December 16, 2008

Installing Axis2 web service container on Ubuntu

Prequisites:
Jdk1.5 or higher
Apache ant
Apache maven
Apache tomcat 6.0(gives error in tomcat 5)
Download and extract(unzip) Axis2 binaries
Steps:
Firstly deploy all the perquisites.
In ubuntu :
sudo apt-get install $package
Note: JDK installed in above manner is not sun jdk but eclipse version of jdk.(this will result in errors)
Specially ant and tomcat are essential.

Method 1: Starting axis2 standalone
Configure :port in axis2.xml file
$axis-home/conf
Set axis2server.sh executable in

$axis-home/bin

sudo chmod +x filename.

Run the script as root.
Test:
Try http://localhost:port in browser should list all the web services available in the server.

Method 2:Deploying in tomcat
Run
ant create.war
There will be a axis2.war in
$axis-home/dist
Copy this war(Web archive) in
$tomcat-root/webapps

Test: Try by http://localhost:tport/axis2 this should show you an axis welcome page.Click validate link on welcome page

Possible practical problems:
1. Wrong version of JDK :this is specially in linux when we use eclipse/gnu/redhat jdk.this problem should be checked by
javac -v
set correct version of javac .
2. Axis 2 gives internal server error with tomcat 5.0
3. For starting tomcat6.0 we need to run setclasspath.sh and then run startup.sh
4. Set all the scripts runnable first.
5. Set JAVA_HOME environment variable correctly.

Tuesday, December 2, 2008

MTU settings cause problems

BUG:
1.Microsoft.con opens a blank page
2.Cannot post on certain forums
3.Submitting some forms get stuck

Fix:
Check your router settings and find MTU value.
MTU-Maximum transmission unit.
It is mainly in wireless routers and adapters.
if you MTU value is 1500 or more then you have a problem.
Either set it to 1400/1452/576
finally try 0 as the value.

Saturday, July 26, 2008

Corrupt external hard drive...

How does this happen...?
Main reason for its happening may be power failure or accidental plug-out.
at this time any task finishing a write on MFT(master file table) or writing some indices in file table crashes and results in ...
tada!!!! corruption..

How to fix this?

Well fixing this windows XP is very easy just type the magic words in the "command prompt"..

c:/>CHKDSK /F drive letter

probably you knew this but just wanted to share..

for linux version just search the google as you always do...
or see
manual page of fdisk

~#man fdisk

Thursday, July 10, 2008

Jabber For Messaging

Jabber-It is a messaging protocol which has its prime features-
1. Presence based-providing advantage of Real-Time messaging
2. Open source
3. XML-Based making it future proof
4. Distributed client server architecture(hub and spoke model)-making clients a minimal entity
5. Multiple client Access-user can have multiple clients logged in at the same time each known as “Resource”

Keywords related to Jabber-:
Users-User is what can be called as client, but each user can have multiple clients called “Resource”.
Domain- Domain is address of server or server name, in jabber each Domain can connect to other domains that are present in the network, and talk to clients that are connected to that Domain, (star and star are connected to form network.
JabberID-It is a unique identification to the server of that user .Each JabberID can have multiple resources. Each ID has a standard structure i.e. “:user@domain/resource”
High level entities(Muse API)-:
Jabber Context-It is a container for the information about the user which is used as login information.
Jabber Session-each jabber context is logged in with a jabber session, which is somewhat like a pointer to the server.
All the interactions made with server are performed by each session that we register in server, and server in turn provides services based on request.
Roster-It is a technical name for “buddy list “ that you see in messenger, typically server displays the Presence information of certified users to client.

Advantages-
1. Open source
2. Good biosphere
3. Tested for enterprise applications

Muse API for jabber/XMPP:
It is a java implementation of client programming with Jabber . Muse API is very easy to use and well documented.
Link to javadoc:http://www.echomine.org/muse/javadocs/Download page: http://www.echomine.org/confluence/display/MUSE/2.1+Download+Muse

Tuesday, July 1, 2008

Getting rid of "File currently in use" malware

There are two ways of removing malware files with get locked by
"currently in use tag"
1. use a software called removeOnReboot.
can be downloaded from
http://www.snapfiles.com/php/download.php?id=108024&a=7122525
and this is effective to some extent.
2.Its the most fool proof method never fails..
you just click rename and add virus at the end of filename that is
malware.dll--->malware.dll.VIRUS
windows accepts this and will demount this file on next reboot which can be deleted normally.
second method is simplest to remove any maleare on windows

Quantum computing

Quantum computing is a new perspective to the world we live in. It is probabilistic approach to the deterministic world of information. We are using the coherent, probabilistic, parallel world of quantum mechanics to overcome the computational needs of modern world. Most important factor in development of this field is keen interest shown by scholars and scientist in this field. Although, there are many difficulties in actual realization of a quantum computer and replacing classical computers. We may also emphasize that a quantum computer is more efficient in terms of power consumption also as signals of computation are not electrical but optical. Basic boons of quantum computation are entanglement and parallelism due to superposition. These properties are being exploited in development of quantum algorithms that are feasible to run on our modern day computers also. Quantum algorithms are much more efficient in complexity of time. We are leading to development of quantum hardware (ion trap) that will be many times more efficient but consumes less power also.

JNI with Netbeans

Steps to compile a Native Code of Java using Netbeans IDE
1. Check for the C and C++ plugin for netbeans in the “Tools” menu item and clicking on “Plugins”
You will see a tab named “Installed plugins” and find required plugin in the list.If plugin is not present then download the same .
2. After installing your plugin you should be able to see a new category of C C++ projects in new project dialog box.
3. In new project dialog box you can select C or C++ dynamic library for new project and follow the steps of the wizard.
4. Now in the header file folder of your new project “include”(not copy) the file generated by using ”javah” using command line.
5. Now you can give implementation to native interface in the sources folder in a new file meant for the purpose.
6. Now build your project to create a dynamic library in your project build folder.
7. You can include this native library in your java code.
Problem:
You cannot make hybrid projects with both java and C\C++ in the same project. You have to make a separate project.
Also you need to set the path of the dynamic library in Java runtime.

RMI with Netbeans

Compiling RMI program in Netbeans:
Step 1:
You can create all the RMI server and client classes in default projects normally.Code your application normally.
Step 2:
In compilation first you need to build the classes using IDE,then from terminal change the working directory to /netbeansprojects/build/classes
now give
rmic
this will generate your Stub and skeleton class
Step 3:
Start the rmiregistry from the same directory to include your classpath.
now you can run the server.

Precautions:
1. Make sure that your rmiregistry includes your classpath,also take care of the port number and class name at the time of binding of the object to the registry.
2. Make sure that you are using right version of rmic and rmicompiler while working in linux.

Advances:
you can modify xml ANT script of your project in “build-impl.xml” file.
you can build the stub for the file from IDE only by using ANT script.
ANT is some what similar to Makefile in linux.