Let's say the following is returned when attempting to start a Tomcat application server.
Failed to load Premain-Class manifest attribute
This typically means that the -javaagent option is being used to load a JAR file, and the JAR file's MANIFEST.MF file does not include the Premain-Class attribute. Typically, the -javaagent option and JAR file are defined in the setenv.sh file. For example, let's say setenv.sh contains the following. In this example, the foo.jar file would be the JAR file that does not include the Premain-Class attribute.
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/usr/local/tomcat/jars/foo.jar"
On a Linux system, the vi editor can be used to examine the JAR file. Or, the jar -tf command can be used.
~]# jar -tf foo.jar META-INF/MANIFEST.MF .classpath .project com/foo/Bar.class
Let's say the MANIFEST.MF file in the JAR contains the following. In this scenario, it most certainly makes sense that "Failed to load Premain-Class manifest attribute" is being returned since the MANIFEST.MF file does not contain the Premain-Class attribute.
The JAR may need to be recompiled so that the JAR contains the Premain-Class attribute, like this.
Manifest-Version: 1.0 Premain-Class: Bar