Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello all,
First off, I'm a linux newbie here, so this very well may be to blame.
Anyways, I've recently installed FC4 along with Sun's J2EE 1.4 suite. The installation went fine and I installed it to, /usr/java/j2ee. Now, I need to install tomcat to get going on my project. So, I go to apache.org and download Tomcat 5.X and follow their installation instructions. Everything seems to go fine until I try to start or stop Tomcat.
During the startup process, with my $JAVA_HOME set to /usr/java/j2ee, I get an error that Tomcat can't find my java VM. So, I switch my $JAVA_HOME to /usr/java/jre and that works great. I am able to test and run depoyed war files. However, more problems occur during stutdown.
When I run the shutdown.sh script, I get the following error:
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
At this point, I have no idea what to do, but am willing to try anything.
Also, when I run the command java -version, I get back 1.4.2. However, it's supposed to be using JDK1.5 that is installed with J2EE 1.4.
Any help would be greatly appreciated, as you can see I'm completely lost.
You do not have to install Java EE (J2EE) if all that you need is simple web development using JSP. Tomcat has a jar file that you can use to develop web applications using Servlet and JSP. The Java EE SDK that you downloaded has a Java EE certified Application Server unlike Tomcat which is a Servlet container.
From your post it looks like you downloaded Java EE 1.4 bundle that has Java SE 5.0 (J2SE 1.5). In order to use the bundled Java SE you need to override the default value of JAVA_HOME set by Fedora. You can do so by adding the following line of code to ~/.bashrc or ~/.bash_profile
The bundled Java SE should be in a directory under /usr/java/j2ee in your case.
If you want to know which java and javac are used issue the following command
Code:
which javac
Please note that changes to one of .bashrc and .bash_profile takes place only when you start a new session. Sorry but I cannot recall which one is that.
BTW, which version of Tomcat do you have? If you want to use Java SE 5.0 you need to download Tomcat 5.5.x. Tomcat 5.0.x works with Java SE 1.4.
There is a version of Tomcat available in the standard Fedora repositories which has, I believe, been "tuned" to work correctly in Fedora.
Rather than installing from apache.org, you might have been better off just trying a simple yum install tomcat. Under the "many hands make light work" policy, I think its usually better to try a yum install for a new package before looking for the generic package from the developers.
hey I am having the exact same problem. when i shut down my TC i get that same error. I know every thing works and is installed correclty. I have been using this install for a while with no problems. The only change i remember making of recent is that i added a file to the shared folder. (aspectjweaver.jar) and i updated my jvm with the DSTupdater from the java site. this thing is really kicking my A#$...need some serious help here. Thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.