Page 1 of 1

JAVA_HOME is not set Windows2008R2

PostPosted:Thu Jan 05, 2012 1:49 am
by marinbivol
Hi All,
recently i moved from CentOS to Windows Server2008R2 and i bumped into an error after bringing up OpenKM.
To make it short it is complaining that the JAVA_HOME is not set. Unexpected results may occur. See bellow please:
This error came up when trying to run the shutdown script.
any help is appreciated !!!
Code: Select all
JAVA_HOME is not set.  Unexpected results may occur.
Set JAVA_HOME to the directory of your local JDK to avoid this message.
Exception in thread "main" javax.naming.CommunicationException: Could not obtain
 connection to any of these urls: localhost:1099 [Root exception is javax.naming
.CommunicationException: Failed to retrieve stub from server localhost:1099 [Roo
t exception is java.io.EOFException]]
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to retrieve stub from ser
ver localhost:1099 [Root exception is java.io.EOFException]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:268)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
        ... 4 more
Caused by: java.io.EOFException
        at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Sourc
e)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:256)
        ... 5 more

Re: JAVA_HOME is not set Windows2008R2

PostPosted:Thu Jan 05, 2012 4:35 pm
by jllort
First type "java -version" in your terminal
You should configure it in your environement parameters, java installation will not doing it to you.
You should try to execute jboss as service, can be configured too in windows environment.

Re: JAVA_HOME is not set Windows2008R2

PostPosted:Thu Jan 05, 2012 5:39 pm
by marinbivol
Thanks for reply.
Can you forward me more detailed instruction on the steps you mentioned above?
your help is greatly appreciated

Re: JAVA_HOME is not set Windows2008R2

PostPosted:Sun Jan 08, 2012 11:28 am
by jllort
My pc -> right click -> contextual menu -> properties
Then will appearing some -> advanced options tab -> environment variables ( I don't know if it will be exactly the name, in my spanish environment is called "variables de entorno" )
Add as a system variable