Starting Tomcat add-on XAMPP not working - xampp

I installed XAMPP 1.7.7, including:
Apache 2.2.21
MySQL 5.5.16
PHP 5.3.8
phpMyAdmin 3.4.5
FileZilla FTP Server 0.9.39
Tomcat 7.0.21 (with mod_proxy_ajp as connector).
My all other services work expect for Tomcat.
Things that I did right now, to fix this:
I realized that I did not had java on my computer, as on command prompt there was no path for java. So I installed JAVA 1.7.0 and also set the "Environment path".
But still its not getting started.
Any help would be appreciated.
Regards
Zeeshan

Assuming windows os,
Step 1. Create/edit an environment variable JAVA_HOME with path to jdk (important:- not to \bin but just c:\java\jdk_1_7_0 and dont put semicolon at the end).
step 2. Create/edit an environment variable JRE_HOME with path to jre (important:- again not to \bin but just the folder where bin is located and no semicolon in the end).
step 3. Create/edit an environment variable path that should be added like this,
< all the previous path stuff's >;%JAVA_HOME%/bin;.;
The xampp tomcat looks for %JAVA_HOME% or %JRE_HOME% individually, so just setting the path and classpath variables, up to the bin folder, will not work here. It works for standard Apache tomcat only.
Also, the your version of xampp have disabled the users by default. Enable it by un-commenting the user part in the x:\xampp\tomcat\conf\tomcat-users.xml

You need to execute manually following bat file
c:\xampp\catalina_start
or
put
catalina_start ,
catalina_stop
in XAMPP control panel start up

I had the exact same problem and it was caused by running a 32 bits Tomcat on a 64 bits windows. (I was using XAMPP 1.8.3 in a Windows 8 64 bits.)
First:
Make sure you have JAVA_HOME system variable pointing to your jdk folder (not the \bin);
Make sure %JAVA_HOME%\bin; is in your %PATH% system variable.
The solution:
Uninstall the Tomcat7 service if you have installed it already;
Download a 64 bit version of Tomcat 7 for windows (check this link to get the latest - I used the 7.0.42 version);
Replace the tomcat7.exe and tomcat7w.exe files of the C:\xampp\tomcat\bin folder with those present in the recently downloaded zip file.
Now you can install the service as usual (through XAMPP control panel, if you use it) and it should start just fine.

Just run the catalina.bat under the directory of C:\xampp\tomcat>
C:\xampp\tomcat>catalina.bat
CURRENT_DIR=%cd%"
set "CATALINA_HOME=%CURRENT_DIR%"
Since %cd% echo the current directory.

In environment variable add all these variable then catalina_start.bat will work
Variable Key
JAVA_HOME your java-jdk address
JRE_HOME your java-jre address
Path your java-jdk address ; your java-jre file address ; your java-jre/bin address ; our java-jdk/bin
It took me almost 5hours to find the method to let xampp-tomcat to start :'(

Related

Maven isn't installing properly

I've tried everything I could find on this topic, yet I'm not able to install Maven.
I'm at the following point:
I have java installed
I unzipped the files from the apache website
I have set up environment variables and added requirement parameters to the path (had to use the escape character in the path, because of the space in Program Files folder name: C:\Program^ Files\apache-maven-3.6.3)
what could be the problem?
cmd
From the attached image all requirements are OK. Try one of those two solutions:
Close the CMD window and reopen it (if you didn't this already).
Restart your computer in in order to apply the environment variables you've just added.

Postgres "psql not recognized as an internal or external command"

For Postgres, I keep getting this error multiple times even though I have already set the location of the bin folder to the path variable in Windows 8. Is there something else I'm missing?
(I can't post pictures since I don't have enough reputation)
Just an update because I was trying it on Windows 10 you do need to set the path to the following:
;C:\Program Files\PostgreSQL\14\bin ;C:\Program Files\PostgreSQL\9.5\lib
PS : 14 is the current version, check whatever version you are on.
You can do that either through the CMD by using set PATH [the path]
or from my
computer => properties => advanced system settings=> Environment
Variables => System Variables
Then search for path.
Important: don't replace the PATHs that are already there just add one beside them as follows ;C:\Program Files\PostgreSQL\9.5\bin ;C:\Program Files\PostgreSQL\9.5\lib
Please note: On windows 10, if you follow this: computer => properties => advanced system settings=> Environment Variables => System Variables> select PATH, you actually get the option to add new row. Click Edit, add the /bin and /lib folder locations and save changes.
Then close your command prompt if it's open and then start it again
try psql --version
If it gives you an answer then you are good to go if not try echo %PATH% and see if the path you set was added or not and if it's added is it added correctly or not.
Important note:
Replace 9.5 with your current version number. As of 2021, that is 13.
For 2022 is 14.
Windows 10
It could be that your server doesn't start automatically on windows 10 and you need to start it yourself after setting your Postgresql path using the following command in cmd:
pg_ctl -D "C:\Program Files\PostgreSQL\11.4\data" start
You need to be inside "C:\Program Files\PostgreSQL\11.4\bin" directory to execute the above command.
EX:
You still need to be inside the bin directory to work with psql
Enter this path in your System environment variable.
C:\Program Files\PostgreSQL\[YOUR PG VERSION]\bin
In this case i'm using version 10. If you check the postgres folder you are going to see your current versions.
In my own case i used the following on separate lines:
C:\Program Files\PostgreSQL\10\bin
C:\Program Files\PostgreSQL\10\lib
You can follow the following steps below.
C:\Program Files\PostgreSQL\yourversion
I had your issue and got it working again (on windows 7).
My setup had actually worked at first. I installed postgres and then set up the system PATH variables with C:\Program Files\PostgreSQL\9.6\bin; C:\Program Files\PostgreSQL\9.6\lib. The psql keyword in the command line gave no errors.
I deleted the PATH variables above one at a time to test if they were both really needed. Psql continued to work after I deleted the lib path, but stopped working after I deleted the bin path. When I returned bin, it still didn't work, and the same with lib. I closed and reopened the command line between tries, and checked the path. The problem lingered even though the path was identical to how it had been when working. I re-pasted it.
I uninstalled and reinstalled postgres. The problem lingered. It finally worked after I deleted the spaces between the "; C:..." in the paths and re-saved.
Not sure if it was really the spaces that were the culprit. Maybe the environment variables just needed to be altered and refreshed after the install.
I'm also still not sure if both lib and bin paths are needed since there seems to be some kind of lingering memory for old path configurations. I don't want to test it again though.
If you tried all the answers and still spinning your heads, don't forget to change the version with your one which you downloaded.
For example, don't simply copy paste
;C:\Program Files\PostgreSQL\9.5\bin ;C:\Program Files\PostgreSQL\9.5\lib
More clearly,
;C:\Program Files\PostgreSQL\[Your Version]\bin ;C:\Program Files\PostgreSQL\[Your Version]\lib
I was spinning my heads. Hope this helps.
Make sure that the path actually leads to the executables. I'm using version 11 and it did not work until this was set as the path:
C:\Program Files\PostgreSQL\11\bin\bin
Maybe this is how version 11 is structured or I somehow botched the installation but I haven't had a problem since.
Even if it is a little bit late, i solved the PATH problem by removing every space.
;C:\Program Files\PostgreSQL\<installed version>\bin;C:\Program Files\PostgreSQL\<installed version>\lib
works for me now.
Simple solution that hasn't been mentioned on this question: restart your computer after you declare the path variable.
I always have to restart - the path never updates until I do. And when I do restart, the path always is updated.
Find your binaries file where it is saved. get the path in terminal mine is
C:\Users\LENOVO\Documents\postgresql-9.5.21-1-windows-x64-binaries (1)\pgsql\bin
then find your local user data path, it is in mostly
C:\usr\local\pgsql\data
now all we have to hit the following command in the binary terminal path:
C:\Users\LENOVO\Documents\postgresql-9.5.21-1-windows-x64-binaries (1)\pgsql\bin>pg_ctl -D "C:\usr\local\pgsql\data" start
done!
Always better to install a previous version or in the installation make sure you specify the '/data' in a separate directory folder "C:\data"
For Windows 10 and 11 users, here are the steps:
Go to Edit environment variables for your account (search for it on the start menu)
It will open the System Properties form — click the Environment Variables
Under the User variables for <username> (or you can add it in system variables), find the path variables and click edit, and add the path to your Postgres bin file address (in my case it's C:\Program Files\PostgreSQL\15\bin).
And save it and re-open the terminal.

Error installing WebLogic server using Console mode in windows 8.1

Hi i have been trying to install the server weblogic of oracle on windows 8.1 but I obtain the follow when I run the configure.cmd file:
ERROR: You must set MW_HOME and it must point to a directory where an
installation of WebLogic exists. Ensure you point this variable to the
extract location of the zip distribution.
How do I correct this error?
There's a readme file linked from the product download page http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html although your experience would suggest that defining MW_HOME isn't optional! ...
1. Extract the contents of the zip to a directory (eg: /home/myhome/mywls)
This will create a base directory named wls12130 under /home/myhome/mywls
MW_HOME will be the entire directory including the base directory.
(eg: MW_HOME will be /home/myhome/mywls/wls12130).
2. Setup JAVA_HOME and optionally, MW_HOME variables in the current shell as required
for the target platform.
Windows
> set JAVA_HOME=C:\home\myhome\myjavahome
> set MW_HOME=C:\home\myhome\mywls\wls12130
3. Run the installation configuration script in the MW_HOME directory.
This step is required to be run only once. If you move the installation to
another location/machine, you need to rerun this step.
Windows
> configure.cmd
Environment variables are not set properly.
1.- Create product directory
mkdir E:\weblogic\wls << I'm sure you did it and Weblogic binaries are already installed.
2.- set environment variables properly
set JAVA_HOME=_path_to_\jdk1.7.0
set MW_HOME=E:\weblogic\wls
(change above settings according to your installation)
3.- Run configure.cmd

Apache Maven installation in windows 8

I followed steps mentioned in this link http://maven.apache.org/download.cgi
Whenever I type mvn --version in cmd.
I got 'mvn' is not recognized as an internal or external command, operable program or batch file.
But when I opened cmd with "Run as a administrator" it worked.
OS: windows 8
How can I run mvn for any user on windows 8.
Try setting the environment variable M2 as System variable instead of User variable.
I used Rapid Environment Editor, started as an Administrator, and put these variables into my System path, and this problem went away.
For some reason, when I added the the JDK, JRE, and Maven bin folders to my Path through the Windows utility, it didn't work. Rapid Environment Editor told me that the variables were not valid or I did not have access to them. Windows 8 seems to be really picky about administrator rights and I guess they didn't think that through very well.
Just be sure to start Rapid Environment Editor as an administrator, and re-open your command windows when you save your changes.
I had to move the installation directory of Maven into C:\Users*your_username*, so that Maven no longer required admin permissions. The PATH variables started working after that.
Set the MAVEN/M2 and MAVEN_HOME/M2_HOME variables in the environment variables in windows 8, this will solve the problem.
I'm using chinese version so that i'm not sure what's these word in english version.
click right button on "My computer"
click last item on list
click "Advanced system setting" at left side
"Evironment Variable"
append maven's bin directory into system's environment variables path
after all, try linux
The simplest way is:
Add maven directory to the path in systems variable.
don't add anything in user variable and no need to add any variable.
faced the same problem; The bins or files from path for M2_home and Java_home need to be found in a directory where the user has full control permission. Change the security permission settings of the user through the administrator by right click on the order, go to properties->security tab and check the Full control box for "authenticated user" and "user".

How to change Jenkins default folder on Windows?

How to change Jenkins default folder on Windows where Jenkins runs as Windows service.
I want to change C:\Users\Coola\.jenkins folder to d:\Jenkins due to lack of space on C: partition (Every build takes ~10MB of free space). I don't want to reinstall Jenkins as Windows service. I just want to change folder of existing Jenkins instance. In case of lack of global solution I could focus only on relocating jobs folder.
Thanks in advance for your help.
Stop Jenkins service
Move C:\Users\Coola\.jenkins folder to d:\Jenkins
Using regedit, change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Jenkins\ImagePath to "d:\Jenkins\jenkins.exe"
Start service
Apparently, grams' answer works but is not preferred. In Windows software and data/configuration files are supposed to reside in different places. This should be well known to Unix guys, it is basically like having a home directory. However, the wording with regard to JENKINS_HOME is broken anyways as setting an environment variable does not help despite what is being said in the help text.
I used the procedure that is described here: http://tech.nitoyon.com/en/blog/2014/02/25/jenkins-home-win/
Basically:
Stop Jenkins service
Edit entry <env name="JENKINS_HOME" value="%BASE%"/> in jenkins.xml in the Jenkins installation directory. This will be something like C:\Program Files (x86)\Jenkins. In your case value has to be set to d:\Jenkins
Move Files from the installation directory to the new destination, d:\Jenkins, all except (some of them may not exist in a fresh installation)
jre folder
jenkins.err.log
jenkins.exe
jenkins.exe.config
jenkins.out.log
jenkins.war
jenkins.war.bak
jenkins.war.tmp
jenkins.wrapper.log
jenkins.xml
Restart the service again.
When you read Administering Jenkins you can read all options how to modify the JENKINS_HOME environment variable.
On this website you can read how to configure you Tomcat container to override the JENKINS_HOME environment variable, they advise to create the file $CATALINA_BASE/conf/localhost/jenkins.xml, with the following content:
<Context docBase="../jenkins.war">
<Environment name="JENKINS_HOME" type="java.lang.String" value="/data/jenkins" override="true"/>
</Context>
Here is the answer that worked for me: Jenkins: How to change JENKINS_HOME on Windows
And in addition to grams answer, the most important part is creating an environment variable named JENKINS_HOME with value "D:\Jenkins". Without that, on starting Jenkins it would again create the .jenkins folder in your user home folder.
I was able to change the JENKINS_HOME variable following this http://tech.nitoyon.com/en/blog/2014/02/25/jenkins-home-win/
Setting JUST %JENKINS_HOME% as windows system wide environment variable didn't have any effect!
We installed by dropping the .war into Tomcat, and could set home by just setting the environment variable JENKINS_HOME (with a service restart).

Resources