3

When I try to run WSO2 Dataservices or other WSO2 Carbon servers, i got the following error:

$ sudo sh /opt/wso2dataservices-2.6.3/bin/wso2server.sh start
Error: JAVA_HOME is not defined correctly.:
CARBON cannot execute java

Then I check the JAVA_HOME variable:

$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.6.0_35

And it is the correct path. The machine have installed Oracle Java JDK 1.6 64-bit and Ubuntu Server 12.04 64-bit.

I really appreciate your answer. Thanks!

tk_
  • 16,415
  • 8
  • 80
  • 90
futbolsalas15
  • 163
  • 1
  • 8

2 Answers2

6

You are running the server as the super user (sudo) which is not required. However I think you dont have the JAVA_HOME set in super user environment.

nuwanbando
  • 601
  • 4
  • 5
  • Thanks for your help, but when I run withouth sudo I got the following: ` /opt/wso2dataservices-2.6.3/./bin/native/wrapper-linux-x86-32: not found`. I really appreciate your help. – futbolsalas15 Nov 01 '12 at 16:55
  • have you given enough permission to bin. other thing you can do is, set JAVA_HOME in sudo enviornment – nuwanbando Nov 05 '12 at 22:45
5

You can use it like this

sudo JAVA_HOME=/usr/lib/jvm/java-7-oracle ./wso2server.sh
tobias_k
  • 81,265
  • 12
  • 120
  • 179
Waruna Perera
  • 68
  • 1
  • 2