Wednesday, June 20, 2012

Apache Directory Server NOT Starting. 1067 Error

Problem :- Apache Directory Server  not starting. Its giving 1067 error.
log can found at C:\Program Files (x86)\Apache Directory Server\instances\default\log

[11:31:53] ERROR [org.apache.directory.server.Service] - Cannot start the server : reuseAddress can't be set while the acceptor is bound. [11:33:38] ERROR [org.apache.directory.daemon.Bootstrapper] - Failed on null.init(InstallationLayout, String[]) java.lang.NullPointerException at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:946) at org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmStore.getEntryId(JdbmStore.java:70) at org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine.cursor(DefaultSearchEngine.java:103) at org.apache.directory.server.core.partition.impl.btree.BTreePartition.search(BTreePartition.java:295) at org.apache.directory.server.core.partition.DefaultPartitionNexus.search(DefaultPartitionNexus.java:876) 

ROOT CAUSE:-

the file C:\Program Files\Apache Directory 
Server\instances\default\conf\server.xml was corrupted
Solution:-
1) Uninstall Apache DS.
2) Delete folder from C:\Program Files (x86)\Apache Directory Server
3) Restart machine.
4) Install and configure again. 
Solved..!!!

Tuesday, June 19, 2012

How to set up JAVA_HOME in Windows 7?

Prerequisites for this tutorials:-  Java 1.x should be installed. In case not done, the setup can be download from link and can be installed as any other software. 

Assumption:- Java is installed in C drive i.e. C:\Java

Following are the instruction to setup JAVA_HOME environmental variable in windows 7. 

1) Click Windows
2) Right click on "Computer"
3) Click Properties, this will open a new window with all system information. 

4) Click "Advance system settings", last option under right top menu. 
5) Click Advance > Environment Variable > New 
6) Key-in  "JAVA_HOME" in Variable name and JDK Path in Variable value. 
7) Now verify.


How to verify?
1) Open Command prompt(Winow+R>Key in CMD>OK)
2) Type Java -Version. Below like output should come. 



DONE.!!!