I have installed Tomcat 9 by using standard way in my Ubuntu 20:
sudo apt install tomcat9 tomcat9-admin
But this installation not defines CATALINA_HOME value.
echo $CATALINA_HOME brings nothing. Why? What is right location for CATALINA_HOME?
Conent of /var/lib/tomcat9 :
conf lib logs policy webapps work
Conent of /etc/tomcat9 :
conf lib logs policy webapps work
My Eclipse JEE Tomcat server runtime environment configuration complains with message
Unknown version of Tomcat was specified.
How to fix that problem?
Don't use an installed copy. The locations of files needed to properly launch Tomcat from Eclipse and actually control the process could have been relocated to who knows where. Download the tar/zip file from tomcat.eclipse.org, and use that instead.
https://wiki.eclipse.org/WTP_Tomcat_FAQ#Why_won.27t_the_New_Server_Runtime_dialog_recognize_my_Linux_installed_version_of_Tomcat.3F
When you install by command
sudo apt install tomcat9 tomcat9-admin
Tomcat become a services inside operating system. Don't use this way in development.
Download Apache Tomcat, unzip, then point to its directory / declare path of Tomcat in Eclipse IDE. Tip: Must check permission some files, allow it read, write inside Tomcat.
Related
my centos Server is running the Spring boot application. I am trying to take threaddump of java process. But I cannot find jstack utility on the server. I figured out someone just installed the jre and did not install jdk, that may be the reason why jstack is missing.
Can you please let me know how can I install jstack on this server?
is there any pre-install checks ? or does it involve any downtime ?
You can have several java installations on the same OS by using jdk install from tar file option.
You may manually install jdk to a single parent directory by making use of the .tar.gz jdk installation option.
This option will enable you to download a the .tar.gz file into a new directory, then untar the downloaded file and answer some license agreement.
you will see the you will find jstack in the bin directory in the directory the of the jdk you have just installed. You may need to use the full file path of this jstack file when using.
I am trying to get an eclipse project to recognize the apache/tomcat(v8.0..) that I have installed, but I am having trouble. The installation is from sudo apt-get install tomcat8, which after a lot of errors I have finally managed to solve. Now I am getting the following after I hook up the tomcat install at /usr/share/tomcat8 to a new project in eclipse.
Description Resource Path Location Type
The container 'Apache Tomcat v8.0 [Apache Tomcat v8.0]' references non existing library '/usr/share/tomcat8/lib/commons-dbcp.jar' helloworld2 Build path Build Path Problem
I'm not sure what the problem could be. There should be no unreferenced libraries as I have installed everything from sudo. I DID have to use this ln -s conf /usr/share/tomcat8/conf to get Eclipse to hook up the library in the first place (as suggested here: Unknown version of Tomcat was specified 8.0.24 / Eclipse 4.4.2 (Luna)). So perhaps that broke it. The road to hello world continues.....
EDIT:
I tried the following:
patientplatypus#next /usr/share/tomcat8/lib $ sudo chmod u+x commons-dbcp.jar
chmod: cannot operate on dangling symlink 'commons-dbcp.jar'
So this appears to be another tomcat8 issue. On installation tomcat8 somehow makes a directory with dangling symlinks to important files. Why it does this or what the fix is, I do not know.
I've not much linux experience, but I use tomcat and eclipse. Eclipse is a mix of java and platform specific binaries, but tomcat is java only (apart from tomcat native which is optional).
If your eclipse supports tomcat8 (I don't remember which version luna supports), you do not need (or even desire) a full server install of tomcat8, you just need to have tomcat package unzipped in any directory you choose, and just point to it.
Which is not the same as installing tomcat8 on your machine and then trying to make it work with eclipse.
My advice is:
Download tomcat8 and unpackage it on a folder.
Create a server runtime with eclipse pointing to that folder.
Develop.
Once you have a war to deploy, you can install tomcat8 on a machine and put your war there and use it.
I have two jdks and jres installed in my pc java 1.5 and java 1.8 for some work purpose. Now I have one instance of tomcat 5.5 which I took from another pc and pasted it in my pc c:/servers folder. It is running fine using java 1.5. So I set the JAVA_HOME and path to java 1.5. Now I downloaded tomcat 7 binary distribution zip file and extracted it in my c:/servers directory. I changed the connector port, shutdown port and AJP port to different values. set CATALINA_BASE to c:/servers directory. But when I'm running the startup.bat two windows are popping up for a sec and they are closing. The server is not starting. I found the error as java.lang.UnsupportedClassVersionError. Bad version number in class file
Then I tried to install tomcat 8 using windows installer with again different port numbers in the same c:/servers directory which worked perfectly. It started and tomcat home screen also loaded. My work is survived with tomcat installer but I want to know why manual configuration failed.
OS = windows 10 64 bit
Please help me in making manual configuration of tomcat. If any other information is needed, I'll provide.
EDIT 1
I got this error java.lang.InvocationTargetException when I tried to install another instance of tomcat 5.5 manually in c:/servers directory
The exception UnsupportedClassVersionError occurs when you try to execute *.class files with an older version of Java as they were compiled for.
In your case, you are trying to run Tomcat 7 with Java 1.5, but its minimum requirement for the JRE is version 1.6. The latest version of Tomcat that supports Java 1.5 is Tomcat 6. Check out this overview for more information:
Apache Tomcat Versions
I've followed the following instructions to get Jive up and running on a windows 7 64 bit machine.
Java
Install latest version of Java
Download Java SE 6 Update 37 JDK (includes JRE) but do not install yet
Open a new command prompt and run java --version to verify that it is correctly installed.
If you receive an error saying version 1.5 was expected and 1.7 was found, make sure all versions of software are for the correct OS (64 or 32 bit) which may require you to uninstall current versions (system will use the most recent version installed, even if you try to install an older version after the newer version was installed)
Eclipse
Download & install Eclipse IDE for Java EE Developers
Once installed, create your default workspace and access Help – Eclipse Marketplace
Search the marketplace for SubClipse and install
Search the marketplace for Maven Integration for Eclipse WTP and install
PostGres
Install postgreSQL
Once you have installed postgres, uninstall java from the C:\oracle\Ora11gR2\product\11.2.0\client_1 directory and install Java version 7 there.
Open pgAdmin, click on the “plug” to create a new connection
Set name and host to localhost and include your network usename, port number, and password used when installing postgres
Expand the database tree, right click to add new login role - configure new login role as super user by selecting all options under role privileges, set PW under definition tab, and hit ok
exit or disconnect and log back in as your user
Create desired databases
Maven
Install binary mirror download of maven
Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
Go to your environment variable (How to) dialog within Control Panel\System and Security\System and access Advanced system settings. On the System properties dialog, go to the Advanced tab and click “Environment Variables”
Add the M2_HOME variable in the system variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.4
add the M2 environment variable in the system variables with the value %M2_HOME%\bin
add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m
update/create the Path environment variable in the system variables and append the value %M2% to add Maven available in the command line. (add ;%M2% to the end of the path value)
Add/Update JAVA_HOME in your system variables and set the value to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02
Make sure that %JAVA_HOME%\bin is in your Path environment variable. If not, append to existing Path system variable (remember to separate by semi-colon)
Open a new command prompt and run mvn --version to verify that it is correctly installed.
If this fails investigate the issues discussed in this article.
In the user’s directory (ie \USERNAME.m2) there will be a .m2 directory for the Maven repository. Create a settings.xml file in that directory with the repository settings
Jive Build
Check Jive out of SVN repository
edit the pom.xml file in the project root. Make sure the jive short version at about line 20 is set correctly: 5.0.2.1
Open a terminal window. Change to the top level project directory
Run this: mvn clean install -Djive.setup=false -P external
This is where i get stuck - I get a cmd prompt error when i run mvn clean install -Djive.setup=false -X external to get the debug log, and it says it's still missing the repository.
I've seen some documentation saying to get this all working on a windows 7 machien you should use a VM, but i've also seen that it's possible to do, just not supported.
Has anybody successfully installed, built, and ran jive on windows 7?
Following https://community.jivesoftware.com/docs/DOC-3547 for setting up maven says:
Note: this Maven configuration provides access to Jive binaries and sources via the maven-secure.jivesoftware.com server; it requires login access. See the bottom of the document where to put your login information.
Please request maven access by creating a Supportal case. If you do not have a company group, you may email your maven request to accountsupport#jivesoftware.com
It's possible that you don't have the required access.
the tricky part is getting the eae engine up and running in windows 7. It works from Jive 6 onwards. I remember in Jive 5 running the eae engine in a linux vm and hooking into it. after the setup, unless your doing development that requries the eae engine then you can just shut it off...
I'm having trouble installing Tomcat on my windows XP machine. I already have Apache and JDK 6 installed, what I need to know is:
Which file to download from the Lastest Tomcat download page
And how to install it so I can run the sample web app by going to http://localhost/
In my C:\Program Files\Java folder, I see the following folders, this should give you an idea of whether I need any additional stuff installed:
jdk1.6.0_10
jre1.6.0_04
jre1.6.0_06
jre1.6.0_07
jre6
Thanks.
Tomcat 6 doesn't really need the full JDK and it runs with Java 1.5 as well, so Java wise you should be well off. Just make sure that JAVA_HOME environment variable is set.
You can either get the core zip or tar.gz file, or the Windows Service installer file.
Core zip file:
http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.zip
Just unzip it and run bin/startup.bat. If you'd like to install it as a Windows service (and get the "usual" program entry in Windows add/remove programs) you can get the Windows Service Installer file instead:
http://www.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe
By default tomcat listens to port 8080, so to check out the sample apps you need to go to http://localhost:8080/examples/. You can change the default port by editing server.xml in the conf directory.
I'm not sure what that URL is that you provided ("CGI" seems strange from a J2EE site), but the download links for tomcat are on its home page: http://tomcat.apache.org/
You should probably download version 6, particularly if you're using it for personal development. The older versions are available and maintained primarily to support users who don't want to migrate J2EE versions.
Finally: unless you are already using Apache, don't bother with it. Most commercial sites use Apache as a front-end because of its configurability (particularly URL rewriting). If you're just looking to develop web apps, Tomcat will act as web server in addition to servlet/JSP container.
Installation instructions (as well as all other instructions) are here:http://tomcat.apache.org/tomcat-6.0-doc/index.html
If you haven't done any J2EE development before, you'll need some docs on it. The Sun Tutorial is OK, but targeted to the Sun app-server and covers a lot of XML that isn't really necessary. Look at the intro chapters on web apps, then jump to chapter 11: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
From the download page you should download the "Windows Service Installer" package.
As for the rest of the install process, follow just "Step 3: install Tomcat" described in the following page:
http://mircwiki.rsna.org/index.php?title=New_Installation_Instructions
Not a complete answer, but an add-on (how does Stack Overflow handle this?):
For a Windows (XP, Vista, 7) install, you can choose (from the options listed at http://tomcat.apache.org/download-60.cgi):
.zip (pick according to your Windows version)
Windows Service Installer
Now the difference between the top two options:
.zip -- This is a manual install, where you extract the .zip and move it into whatever folder you wish. It does not install Tomcat as a service. It does not "do" anything unless you manually do something with it or have another program use it. It is a manual setup.
Windows Service Installer -- This is a self-installer, just run the .exe. It installs Tomcat as a Windows Service, which if you load up your Windows services (run "services.msc"), you'll see it listed as "Apache Tomcat 6.0 Tomcat6". During the install it will ask you certain setup questions like.
If you choose "Windows Service Installer", here are the default settings the install will ask you:
Type of install: Normal
Server Shutdown Port: 8005
HTTP/1.1 Connector Port: 8080
AJP/1.3 Connector Port: 8009
Windows Service Name: Tomcat6
Create shortcuts for all users: disabled (not that this matters if it's your machine)
Tomcat Administration Login - User Name: blank
Tomcat Administration Login - Password: blank
Tomcat Administration Login - Roles: manager-gui
Path of a Java SE 5.0 or later JRE installed on your system: C:\Program Files\Java\jre7 (if you are running Java SE 7)
Destination (install) folder: C:\Program Files\Apache Software Foundation\Tomcat 6.0
Hope this helps.