Tomcat 7 + Java 8 : Invalid byte tag in constant pool: 15

Just upgraded to Java 8, and the Tomcat 7 keeps prompting the following exceptions: Jul 20, 2015 4:06:36 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar SEVERE: Unable to process Jar entry [jdk/nashorn/internal/objects/NativeURIError.class] from Jar [jar:file:/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/ext/nashorn.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15 at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:131) at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60) at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1942) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1908) …

Read more

How to change Tomcat manager default path ?

By default, Tomcat’s manager webapp is able to access via yourapp:8080/manager. It is a good practice to change the default /manager to something else, to avoid potential brute force attack. Environment Tomcat 7 (apt-get install) Debian 7.5 1. Solution This article show you how to change / rename the default manager webapp path from “/manager” …

Read more

How to change Tomcat to use JDK 7

The current environment is using Tomcat 7 + JDK 6. How to configure Tomcat to use JDK 7? Environment Tomcat 7 (apt-get install) Debian 7.5 JDK 6 and JDK 7 P.S Tomcat 7 is installed via apt-get Note You may interest at this tutorial – Apache Tomcat 8 + JDK 8 on Debian 1. Solution …

Read more

jConsole – JMX remote access on Tomcat

In this tutorial, we will show you how to use jConsole to remote access a Tomcat instance, for JVM monitoring stuff. Tools and environment used : Ubuntu 13 + Tomcat 7 + 192.168.1.142 Windows 8 + jConsole + 192.168.1.200 1. Tomcat + JMX To connect with jConsole, Tomcat need to enable the JMX options. To …

Read more

Tomcat : java.io.IOException: Keystore was tampered with, or password was incorrect

Problem Configured Tomcat’s SSL, while starting Tomcat server, it hits following exception : 14 Disember 2010 4:18:31 PM org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore SEVERE: Failed to load keystore type JKS with path c:\keystore due to Keystore was tampered with, or password was incorrect java.io.IOException: Keystore was tampered with, or password was incorrect at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38) at java.security.KeyStore.load(KeyStore.java:1185) …

Read more

How to configure Tomcat to support SSL or https

A guide to show you how to configure Tomcat 6.0 to support SSL or https connection. 1. Generate Keystore First, uses “keytool” command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in the certificate’s detail. $Tomcat\bin>keytool -genkey -alias mkyong -keyalg RSA -keystore c:\mkyongkeystore Enter keystore …

Read more

How to configure MySQL DataSource in Tomcat 6

Here’s a guide to show you how to configure MySQL datasource in Tomcat 6. 1. Get MySQL JDBC Driver Get JDBC driver here – http://www.mysql.com/products/connector/ , for example, mysql-connector-java-5.1.9.jar, and copy it to $TOMCAT\lib folder. 2. Create META-INF/context.xml Add a file META-INF/context.xml into the root of your web application folder, which defines database connection detail …

Read more

Tomcat Error – prunsrv.c Failed creating java (jvm.dll)

I had encountered following error message while starting my Tomcat server. [2009-01-16 11:22:19] [1343 prunsrv.c] [debug] Procrun log initialized [2009-01-16 11:22:19] [info] Procrun (2.0.4.0) started [2009-01-16 11:22:19] [info] Running Service… [2009-01-16 11:22:19] [1166 prunsrv.c] [debug] Inside ServiceMain… [2009-01-16 11:22:19] [info] Starting service… … [error] The specified module could not be found. [2009-01-16 11:22:19] [994 prunsrv.c] …

Read more

How to change Tomcat default port ?

Tomcat by default runs on port number 8080, However there is high chance get a port conflict with others program. Sometime we just need to change the Tomcat port number. Steps of changing the Tomcat Port 1) Locate server.xml in {Tomcat installation folder}\ conf \ 2) Find following similar statement <!– Define a non-SSL HTTP/1.1 …

Read more

Tomcat – java.lang.OutOfMemoryError: PermGen space

Often time, Tomcat may hits the following java.lang.OutOfMemoryError: PermGen space error. java.lang.OutOfMemoryError: PermGen space at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) It’s usually happened after the Tomcat restarts a few times. 1. Solution By default, Tomcat is assigned a very little PermGen memory for the running process. To fix it, increase the PermGen memory settings …

Read more

How to install Tomcat on Ubuntu

This tutorial shows you how to install Tomcat on Ubuntu, with help of the buith-in apt-get command. 1. apt-get install 1.1 Find an available Tomcat package to install $ sudo apt-cache search tomcat //… tomcat7 – Servlet and JSP engine tomcat7-admin – Servlet and JSP engine — admin web applications tomcat7-common – Servlet and JSP …

Read more

Tomcat – java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)

Problem As i said in previously post, Tomcat 5.5.25 made a lot of modification in policy file, which may enhance security on web application but it also causing a lot of problem, see another error message : SEVERE: Context initialization failed java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) Solution Policy file issue, vi 04webapps.policy, this …

Read more

How to check Tomcat version Installed

To find out the Tomcat version, find this file – version.sh for *nix or version.bat for Windows. This version.sh file is normally located in the Tomcat bin folder. For example : mkyong@hcompass:/usr/share/tomcat7/bin$ ./version.sh Using CATALINA_BASE: /usr/share/tomcat7 Using CATALINA_HOME: /usr/share/tomcat7 Using CATALINA_TMPDIR: /usr/share/tomcat7/temp Using JRE_HOME: /usr Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar Server version: Apache Tomcat/7.0.28 Server built: Apr …

Read more

Tomcat – java.security.AccessControlException: access denied (logging.properties read)

Problem After upgraded to Tomcat version 5.5.25, it starting to hit a lot of errors in security policy : Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /usr/share/tomcat5.5- webapps/jsp-examples/WEB-INF/classes/logging.properties read) Solution Above error is caused by the Tomcat’s policy file, Tomcat 5.5.25 made a lot of modification on policy file. To fix it, you need to make …

Read more

What is Tomcat default administrator password ?

Is there or what is the default administrator user and password for Tomcat? Tested : Tomcat 8.0.30 Tomcat 7.0.67 Tomcat 6.0.44 Article update history Updated 03/02/2016 : Add support for Tomcat 7 and 8. Updated 08/04/2011 : Update article. 1. Tomcat 7 and Tomcat 8 Tomcat users are defined in the file – $TOMCAT_HOME/conf/tomcat-users.xml, by …

Read more