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 Tomcat 7 + Java 8 : Invalid byte tag in constant pool: 15

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 Tomcat : java.io.IOException: Keystore was tampered with, or password was incorrect

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 Tomcat to support SSL or https

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 How to configure MySQL DataSource in Tomcat 6

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 Tomcat Error – prunsrv.c Failed creating java (jvm.dll)

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 Tomcat – java.lang.OutOfMemoryError: PermGen space

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 Tomcat – java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers)

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 How to check Tomcat version Installed

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 Tomcat – java.security.AccessControlException: access denied (logging.properties read)

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 What is Tomcat default administrator password ?