Page 1 of 1

500 Servlet Exception /bin/sh: javac: command not found

Posted: Sat Aug 01, 2009 9:35 am
by mflammia
Hi,

Very new to this, so please bear with me.

Currently getting the below error when browsing to OpenEMM

500 Servlet Exception

Resin can't execute the complier 'javac'. this usually means that the compiler is not in the operating system's PATH or the compiler is incorrectly specified in the configuration. You may need to add the full path to <java compiler='javac'/>

/bin/sh: javac: command not found.

Running Fedora 11 on VMware.
Java 6 update 14

Thanks.

Posted: Sat Aug 01, 2009 8:26 pm
by maschoff
Have a look at file core.conf in directory /home/openemm/conf and modify the XML-tag <javac> or change environment variable JAVA_HOME to the appropriate directory so that Resin can find your Java compiler "javac".

Exact same problem

Posted: Wed Aug 19, 2009 9:34 am
by jason310
I am sorry, I am totally new to Linux here.
Opened core.conf from /home/openemm/conf with
vi core.conf

Problem is I don't know where to fix. :(
They look like this:

=================================
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">

<log name="" level="info" path="stdout:" timestamp="[%H:%M:%S.%s]"/>
<log name="com.caucho.java" level="config" path="stdout:" timestamp="[%H:%M:%S.%s]"/>
<log name="com.caucho.loader" level="config" path="stdout:" timestamp="[%H:%M:%S.%s]"/>

<javac compiler="javac" args=""/>
<user-name>openemm</user-name>
<group-name>openemm</group-name>

<server>
<class-loader>
<tree-loader path="${resin.home}/lib"/>
</class-loader>

<http server-id="core" host="*" port="8080"/>

<web-app-default>
</web-app-default>

</web-app-default>

<resin:import path="${resin.home}/conf/app-default.xml"/>

<access-log path='${resin.home}/var/log/access-core.log'
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period='1D'/>

<host id="" root-directory="${resin.home}/webapps">
<web-app id="/" document-directory="core">
</web-app>
</host>
</server>


</resin>




======================

How do I fix it? Thanks for the help.
:oops:

Posted: Wed Aug 19, 2009 12:33 pm
by maschoff
Since your core.conf does not define a path to the Java compiler, you have to check is JAVA and JAVA_HOME are set correctly.

Posted: Thu Aug 20, 2009 4:37 am
by jason310
Thank for the reply ma,

how to I check/correct JAVA and JAVA_HOME settings?

Posted: Tue Aug 25, 2009 7:54 am
by jason310
jason310 wrote:Thank for the reply ma,

how to I check/correct JAVA and JAVA_HOME settings?
<javac compiler="javac" args=""/tmp/jdk1.5.0_20/bin>


Ok.. I made some mistakes. Forgot to install JDK 5. So I did that, and located the path to javac, is this the right way to edit the path?

<javac compiler="javac" args=""/tmp/jdk1.5.0_20/bin>

?

Thanks :)