On my Mac, I have Tomcat set up with solr 1.4 and solr 3.5 under /Library/Home in the following locations:
/Library/Tomcat/Home
where /Home is symlinked to /Library/Tomcat/apache-tomcat-6.0.32
/Library/Tomcat/Home/webapps/solr
with individual cores under
/Library/Tomcat/solr
Java is installed at
/Library/Java/Home
where /home is symlinked to /System/Library/Frameworks/JavaVM.framework/Home
I was having issues getting Solr 4.10.4 running in conjunction with that Tomcat, and I'm using Homebrew for my MySQL and PHP, so I thought I'd try using tomcat7 and solr4 with homewbrew. So this installed tomcat7 to
/usr/local/Cellar/tomcat7/7.0.61
The problem arises when I try to start Tomcat using
/usr/local/Cellar/tomcat7/7.0.61/libexec/bin/startup.sh
I get this error:
The BASEDIR environment variable is not defined This environment
variable is needed to run this program
I've been searching around, and I've seen various suggestions for fixing this, but I can 't get any to work. First, I'm not sure if this is supposed to be the same as CATALINA_HOME. I have JAVA_HOME and CATALINA_HOME set in my profile (I did change CATALINA_HOME to /usr/local/Cellar/tomcat7/7.0.61/libexec). I tried also setting BASEDIR in my profile to the same path as CATALINA_HOME, but still get the same error when I try to start tomcat.
I don't remember having to do this with my previous installation of Tomcat 6 and Solr 3. What does BASEDIR need to be set to, and where exactly do I set it?
Thanks.
I used Eclipse EE luna. I couldn't start the tomcat7 server from inside eclipse while i can start it from cmd.It gave Server Tomcat v7.0 Server at localhost failed to start. error.I tried all the answers here but none of them helped me. Then i deleted my eclipse EE luna and downloaded juno package.
Here is the problem : This time i can start tomcat server from inside the eclipse and everything works fine, however, after stopping server from eclipse, i can't start it from cmd(My opinion is startup.bat thinks that server is still running and cancels the process).Therefore I can't deploy my projects under \tomcat7path\webapps\, just running it from eclipse.(It also runs from web browser. Actually this is an another question. How can it run from browser while "myproject" doesn't exist under \tomcat7path\webapps\ directory.)
I am stuck on this, any help would be appreciated.
More informaton: I am developing servlets using eclipse ee juno, on tomcat-7.0.55
Ok, i have solved the problem, finally. I removed JAVA_HOME and JRE_HOME environment variables, then opened a new command line window and started tomcat. It gave "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined.At least one of these environment variable is needed to run this program" error.After redefining JAVA_HOME, i started a new cmd and tried again. This time it worked.
I'm sure this has a relatively simple answer -_- , but I keep getting a ton of errors and I have no idea why.
Here is the guide I am following:
http://akbarahmed.com/2012/05/12/install-pentaho-bi-server-4-5-on-windows-7-x64/
I am using Java 1.8.0.05, and biserver-ce-5.0.1-stable
When I run start-pentaho.bat, and the Tomcat window opens, I get a whole host of errors.
If I go to localhost:8080/pentaho, I get the following errors:
One or more system listeners failed. These are set in the systemListeners.xml.
org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 -
Error while trying to execute startup sequence for
org.pentaho.platform.repository2.unified.BackingRepositoryLifecycleManagerSystemListener
I have gone through this entire process 3 times, but nothing seems to work.
There are 3 things you have to take care of:
When running on windows, it is easy to run into Windows' path-length limitation. This then will break the jar-loading which in return gives you random errors as the Tomcat server cannot find the classes contained in these jars. So when you install, do not install it deep into a directory, keep it at the root of your disk. From hard experience, I now always install it in DRIVE:\Pentaho
The Server will not run without the system database. If your logs show you a Quartz-Error, or a Hibernate error, then your HSQL database is not running. In the download, you'll find a "data" directory. Start the "start-hypersonic.bat" before you start the main Pentaho server.
Pentaho does not run with Java 8. There seem to be some incompatible changes in the JDK and I have not been able to actually start it up correctly. You have to use JDK 1.7 to be successful. ALso make sure that your JAVA_HOME or PENTAHO_JAVA_HOME points to the correct JDK.
The Pentaho bat files try to locate a Java installation automatically, and without explicitly setting these environment variables, any JDK may be picked up at random. Usually that is the last JDK that has been installed or updated. So to be safe, lock down the JDK by setting these variables (via Control Panel-> System -> Advanced System Settings -> Environment Variables)
You need to check the catalina.out and pentaho.log files (both should be at biserver-ce/tomcat/logs).
They'll give you more detail on why the server is not starting.
I was having the same error when I installed Java 8 and even after I reinstall Java 7 without removing Java 8 completely.
Remove all Java installations, then you install Java SDK 7
Set the environment variable PENTAHO_JAVA_HOME as your Java 7 path
Then you reboot your computer
Then you start Pentaho BI Server
Hope this help you.
BTW, don't use IE or Safari.
I'm trying to make a simple web app in IntelliJ by following this tutorial:
http://wiki.jetbrains.net/intellij/Creating_a_simple_Web_application_for_Tomcat_in_IntelliJ_IDEA_12
I believe my Tomcat is installed correctly since I see the tomcat pictures when I go to
http://localhost:8080/
I've followed all the steps up until the part it tells me to run index.jsp, at which point I get the error:
Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: nodename nor servname provided, or not known
I see this in the log:
Application Server was not connected before run configuration stop, reason:
Unable to ping server at localhost:1099
This 1099 comes from the JMX port in Run -> Edit Configurations.
How do I fix this?
To fix this you need add your machine name in the /etc/hosts file to point to localhost(127.0.0.1).
You can find your machine name by running the following command:
$ hostname
macbook-pro
From the output above you know your hostname is "macbook-pro".
Edit "/etc/hosts" file and add that name at the end of line that lists 127.0.0.1
127.0.0.1 localhost macbook-pro
Save the file.
Now you IntelliJ should be able to start your server.
See that the tomcat you are using is compatible with the Java version. For me the issue was Tomcat-9 required Java-8. If you have a older version of Java, you could use Tomcat-7 to test.
I added my hostname to /etc/hosts on localhost.
Added JAVA_HOME
but still it showed the same error. In the console, there was output:
Unable to start as CATALINA_BASE contains a colon (:) character
I solved the problem by going to Edit configurations -> Startup/Connection -> changing CATALINA_BASE value to the tomcat installation folder. Before that, it was
CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 8.0
which can't be correct on a linux machine ;)
For those who encounter this when you just recently updated IntelliJ (In my case 2019.2).
I am using JBoss server so i tried to run standalone.bat in the command line and I saw the real issue on the console.
It can be different to yours, but in my case I saw:
failure description: "WFLYSRV0137: No deployment content with
And on that error I was able to fix this by removing the items (war or ear) inside the <deployments/> node in my standalone.xml
Hope this helps for those using JBoss+IntelliJ
FYI Under certain network conditions your hostname may change or be incorrect. If you are on a mac the following will let you set your hostname fairly permanently:
sudo scutil --set HostName correct-name
This appears to be a problem with the way mac is handling reading the /etc/hosts file. See for example http://youtrack.jetbrains.com/issue/IDEA-96865
Adding the hostname to the hosts file as bond described should not be required, but it does solve the problem.
My problem was that tomcat 8 and higher are not compatible with java 6. Changing to java 7 solved it.
I had similar issue when I entered very big port here:
But when I corrected it to something smaller which is in offset range:
Issue was resolved.
I had same problem. In "Edit Configurations.." -> "Tomcat Server" I changed JRE from "Default" to my current version with SDK directory address (like C:\Program Files\Java\jdk1.8.0_121\jre)
My Tomcat version is 8.5.31
This error came to me when I configured (wrong) 3 Gb memory where there was none. IntelliJ does shows the real error message (Could not reserve enough space for object heap) in the Output frame.
I was confused, and attracted by the message in the Event Log, which is to be ignored in this case.
None of the answers above worked for me. In the end I figured out it was an configuration error (I used the android SDK and not Java SDK for compilation).
Got to
[Right Click on Project] --> Open Module Settings --> Module --> [Dependendecies] and make sure you have configured and selected the Java SDK (not the android java sdk)
I meet this question when i use intellij 15.0,then i update to 15.02 version. after that, I edit configurations and reset the Default JRE to my own JRE.It works well for me;
I added the following VM Options and it worked for me:
-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
I solve this problem adding the environment variables JAVA_HOME(C:\Program Files\Java\jdkx.x.x_xx) and JRE_HOME.
I had the same problem of "Unable to ping server at localhost:1099" while I was using intellij 2016 version.
However, as soon as I upgraded it to 2017 version(Ultimate 2017.1) which is installed using "ideaIU-2017.1.exe" the problem disappeared.
I had this issue when running Tomcat 6.0.53 on Mac OS Sierra with Intellij IDEA to deploy Spring projects.
This problem was solved after changing the Tomcat version to the 'tar.gz' one from official site. It seems the 'zip' one is for windows.
Setting project's SDK in IntelliJ (File > Project Structure > Project:Project SDK) worked for me
If your tomcat contains file setenv.sh ([YOUR_CATALINA_HOME]/bin/setenv.sh) it may redefine the JAVA_OPTS variable that JIdea uses to set up JMX, so you have to add them there:
export JAVA_OPTS ="$JAVA_OPTS <whatever was in setenv.sh>"
echo $JAVA_OPTS
Below is the error I observed :
to resolve, in my case, I exit intelliJ and renamed folder ".idea" to ".idea_old" (so that I don't loose old config) and restarted intelliJ, It created a new ".idea" folder and I provided new tomcat configuration. On running tomcat this issue was removed.
On top pointing my hostname to 127.0.0.1 in hosts (just run hostname in cmd to get it) as well as doing what David GC mentioned, for me the error cleared and debugging worked when I went into the tomcat configuration and changed the debugging startup script from startup.bat (which was just my monkeying around) back to the catalina.bat start default.
I had same issue and my mistake was, I was trying to start tomcat server with incompatible version of JDK and installed Apache tomcat server. In my case I had installed JDK 7 with Apache tomcat 9. For Apache 9 JDK should be >= 8.
For compatibility check this https://tomcat.apache.org/whichversion.html
For me, it was a much different solution since it was running on a virtualbox, so I had to edit the hosts file and add the virtualbox as a localhost
127.0.0.1 VirtualBox-blahblah
In windows environment just check the PATH environment variable if Oracle JRE runtime refreshed the path and put himself at the very beginning of the path. In this case even if the JAVA_HOME AND JRE_HOME points to the correct JDK, the JRE will have precedence. And this case IntelliJ will not start Tomcat instance with the mentioned error message.
If you are using java 7 then make sure you have Tomcat 7
brew install tomcat#7
and update run configuration to Tomcat 7
Tomcat 9 is working with java 8
I'm leaving an answer for the jboss user.
If any of the people experiencing this error are using jboss, make sure the JBOSS_HOME location is correct.
If we have the installed the compatible tomcat version for the application JAVA jdk version, we can resolve this issue easily.
In my case, when I am using Tomcat 10.1.0.M4 with JAVA JDK 1.8 I faced this issue. When I downgrade my tomcat version to 9.0.41, the issue resolved for me.
You can find the compatible tomcat version for the JAVA JDK here..
http://tomcat.apache.org/whichversion.html
I just installed the 'yomu' gem (https://github.com/Erol/yomu) in my application and deployed to heroku. On my local machine (Mac OS) it runs fine. I noticed in the documentation it states that JRE is required for it to work.
When I run the application on Heroku I get the following error:
Errno::ENOENT (No such file or directory - java -Djava.awt.headless=true -jar /app/.bundle/gems/ruby/1.9.1/gems/yomu-0.1.1/jar/tika-app-1.1.jar -t):
I'm assuming that yomu can't find the java compiler on Heroku. Am I reading this right? If I am, is there an add-on that I'm not considering?
By the way, the reason I'm using yomu is because it can extract text from doc and docx files.
Thanks!
If you're running on the Cedar stack then a JDK is available to you at: /usr/lib/jvm/java-6-openjdk
I'm not sure how Yomu finds your Java install, but it's probably looking in JAVA_HOME. If so then setting JAVA_HOME on Heroku should make it work:
heroku config:add JAVA_HOME=/usr/lib/jvm/java-6-openjdk
Not a java compiler - a java runtime (a JRE, like the documentation said). Installing a JRE as an addon is not (yet?) supported on Heroku.
In the new Heroku-16 stack, you can add jvm as a buildpack and you don't need to configure paths or anything else. Just make sure to have it set as your first buildpack. I tried it with Yomu/Henkei and it worked for me.