Error while configuring apache tomcat 8.0.44 on Windows 10 - java

I've successfully installed java 1.8.0 and the runtime environment. After configuring some global variables in the setting (such as setting CATALINA_HOME, CLASSPATH and Path) and running tomcat/bin/startup, I received many error messages in the console starting as:
java.util.logging.ErrorManager: 4
java.io.FileNotFoundExceptiong: C:\Program Files\apache-tomcat\logs\catalina.2018-03-27.log (access denied)
at java.io.FileOutputStream.open0(Native Method)
....
etc etc
Where should I start fixing this? Is it a problem with my java runtime? Both JRE and Tomcat I have are 64 bits

The issue is most likely resulting from your file location. Try the following steps:
Confirm that your Tomcat folder is written down accurately.
If it is correctly located in the folder you have mentioned, try moving your Tomcat folder to another location outside of your Program Files. The issue is most likely caused by lack of administrator access while trying to work with your program in a locked location (Program Files).
If you absolutely need to have your Tomcat in your Program Files directory, run your IDE/Terminal in Administrator mode to override access privileges for the Program Files directory.

Related

Tomcat unable to locate TreeTagger binary

I have a java application (Ninja framework) which uses TreeTagger. Root directory of TreeTagger is set via enviroment variable TREETAGGER_HOME. When I run application via ninja, everything works fine, however, when i deploy war file to tomcat, it cannot locate Tree Tagger binary:
java.lang.RuntimeException: java.io.IOException: Unable to locate tree-tagger binary in the following locations [/home/jarino/treetagger/bin/tree-tagger]. Make sure the environment variable 'TREETAGGER_HOME' or 'TAGDIR' or the system property 'treetagger.home' point to the TreeTagger installation directory.
The location which is specified in exception (/home/jarino/treetagger/bin/tree-tagger) is valid - the binary file exists. Why Tomcat application can't see existing file?
I'm guessing you are not running the Tomcat application server as the user jarino, so,
Double check that the tomcat user, which the tomcat process is running as, has the environment variable set
If the environment variable is actually set, double check that tomcat user has the correct privileges to access the treetagger directory in your home folder
TIP: I can see that a maven package exists for treetagger. Using a dependency manager, will make your life much easier :-)

Error starting Wildfly 10.0.0.Final

I haven't been able to find a specific answer to what could be causing this issue though I am hoping it is something quite simple.
Issue.
I have installed version 10.0.0.Final from the Wildfly website and extracted into C:\Program Files\wildfly-10.0.0.Final.
I then navigate to C:\Program Files\wildfly-10.0.0.Final\bin directory via windows command prompt and execute the standalone.bat command.
Wildfly doesn't start and I get the following exception:
java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
If anyone has encountered this error message before, then your guidance would be greatly appreciated.
Thanks!
Ben
The error appears to be a result of either file permissions on the JBoss home directory, lack of space available, or a missing directory.
Relevant posts include:
Starting WildFly 8.2 under a user with limited permissions
Which suggests setting the JBOSS_BASE_DIR property to the root folder of the JBoss installation.
https://github.com/jboss-dockerfiles/wildfly/issues/24
Suggests this can occur if the root folder does not have enough space allocated for the user (typically running in Unix environments).
Error in starting Wildfly 8.0 server with JDK 1.8
The logs/boot.log didn't exist. The author manually created the file which then revealed a permission issue on the log file (more likely on the entire Jboss installation folder).
The issue was caused due to the command prompt. As I am using windows 10, I needed to be using Command Prompt (Admin),rather than just the normal cmd hence the permission issues alluded to previously by pczeus.
After using Command Prompt (Admin), I was able to start the server.

Unable to start Oracle WebLogic Server

I am trying to start oracle WebLogic Server 10.3.6 using startWebLogic.cmd located in domain but I get the error below;
\Java\jdk1.7.0_60 was unexpected at this time.
What am I doing wrong and how can I fix it?
I am assuming you have java installed in either C:\Program Files (x86)\Java\jdk1.6.0_23 or C:\Program Files\Java\jdk1.6.0_23 folder.
Path can't take a space in it, so you need to replace this PROGRA~2 instead of Program Files(86); it's the Windows short name for the same folder.
Similarly, use PROGRA~1 for the Program Files folder.

Terminal vs Eclipse PosixFilePermissions

By running the same command from the Eclipse and from the command line I get 2 different results:
With Eclipse everything works fine, however with the command line I get the following error message:
PosixThing.java:17: error: error while writing PosixThing: PosixThing.class (Permission denied)
This error message does not appear if I run "sudo javac PosixThing.java".
As it if was not strange enough, the same code with a different file located in the same directory (Desktop) does not give me any problem. (I am talking about mere txt files just to test the PosixFilePermissions function).
I checked the file permissions and everything is -rw -rw -rw As well as the others'. Do not know why it happens only with that specific file.
Running on Ubuntu 11.10 jdk 1.7.
Any suggestion to what it might be?
It sounds like a file / filesystem permissions problem of some kind:
Check the owner, group and permissions for the file, and all directories on the file pathname.
Check that you are running Eclipse and your command shell as the same effective user.
Check that you are not attempting to write to some kind of "funky" file system; e.g. a Windows file system mounted on Linux, or a FUSE file system of some kind.
If you've got SELinux enabled, check that's not causing the problem. (That's unlikely.)
It is also possible that you are running different releases / versions of Java in the two contexts, or even that Eclipse's file system cache is out of sync. (It is not clear to me what contexts the code is actually running in.)

Tomcat -- Running a web application

I'm trying to run a sample app in Tomcat. I've installed tomcat, set up the environment variable by creating a new system variable called JAVA_HOME which is set to C:\Program Files\Java\jdk1.6.0_20. And I've created a new dir for the web app in the tomcat program directory. In the cmd prompt I navigate to the tomcat program directory and type in bin/startup.sh and I get the following error: 'bin' is not recognized as an internal or external command, operable program, or batch file.
I'm using tomcat 6.0 and I'm on a windows machine. What could the problem?
On Windows you must run the startup.bat file instead of the startup.sh file (note the extension is different).
Also, enter the bin directory before executing the bat script.
cd bin
startup.bat
Your on windows try:
bin\startup.bat
If you try typing in bin\startup.bat on a Windows machine and still get the same error, there's a possibility that Windows is not seeing the batch script where it should be. As a-horse-with-no-name already said, try installing Tomcat to a location where there are no spaces in the path. In your case, anywhere other than Program Files.
EDIT: To resolve this space issue, you can do two things: 1) Install JDK/JRE to a common location without spaces (say, C:\Java) and set it to be JAVA_HOME environment variable. 2) Install Tomcat to another location (say, C:\Tomcat) and proceed from there. Since these are all in common location, I believe you can do this as a limited account user without needing admin privileges.
Try to install Tomcat (and possibly the JDK) into a directory without spaces.
The script you ran is intended for *nix systems. Try bin\startup.bat
I'm a little confused by some of the answers. First, the error you are receiving is from Windows. Nothing to do with Tomcat. The Windows OS thinks you have entered a command, and doesn't recognize it. Files with the .bat extension are always recognized by Windows as Batch file commands....... soooo..... Navigate to the bin directory, again, under your tomcat installation. Then....
Don't append the bin in front of the command. You should do a quick look to make sure that the "startup.bat" file is here (dir *.bat). Then just type "startup.bat".
Seems like I just type "catalina.bat start" (for my tomcat catalina installation)

Categories