Help troubleshooting ClassNotFoundException

Aug 12, 2010 at 9:36 PM

As a new JSP / Tomcat developer, I'm looking for some suggestions on how to troubleshoot this issue:

At startup, when deploying my test app, Tomcat logs this:

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: waffle.apache.NegotiateAuthenticator

which throws a real monkey wrench in my plans to use Waffle and Windows authentication.

I develop and package my web app using Eclipse.  When I look in the WAR file (using 7zip), I can see the Waffle Jars are included in the WEB-INF\lib folder, so they should be getting deployed to Tomcat.  In Eclipse, I can expand the referenced libraries, waffle-jna.jar file and see "waffle.apache.NegotiateAuthenticator.class".    I use the same project and method to deploy jtds-1.2.5.jar, which works to retrieve and display data from a Microsoft SQL Server.   What am I missing?

Any tips on figuring this out would be appreciated.  Thanks!

Aug 13, 2010 at 8:09 AM

What is your filter/authenticator declaration?

I would start by putting those files manually in tomcat's lib and getting your configuration to work. Then you can move them into your application. You need jna.jar, platform.jar and commons-logging-1.1.1.jar as well, maybe you have an error above this one or an error in Tomcat's catalina.log. Depending on what you're using you may need to place those files in the parent classloader (tomcat/lib) anyway. Usually all but waffle-jna.jar go in the parent classloader (Tomcat).

Aug 13, 2010 at 7:48 PM
Edited Aug 13, 2010 at 7:49 PM

Thanks for your help.  Still getting the java.lang.ClassNotFoundException:  waffle.apache.NegotiateAuthenticator when Tomcat deploys the application.

I took your advice and moved all files with the exception of waffle-jna.jar to the tomcat\lib folder.  I updated my Eclipse project leaving only waffle-jna.jar and successfully built the WAR.

tomcat/lib contains ( commons.logging-1.1.1.jar   jna.jar  platform.jar  Waffle.Windows.AuthProvider.dll  Waffle.Windows.AuthProvider.msm  waffle-jacob.jar )

With Tomcat stopped,  I updated my classpath to null, my path to include only the tomcat/bin, tomcat/lib, and the Java SDK bin folders.

Startup Tomcat.  Other test app using JTDS works fine (to validate my environment changes).

I then uploaded my waffle tester app using the tomcat web interface, and get the ClassNotFoundException.

My \web\META-INF\context.xml file contains (copied the from instructions in the CHM helpfile):

<?xml version='1.0' encoding='utf-8'?>


  <Valve className="waffle.apache.NegotiateAuthenticator" principalFormat="fqn" roleFormat="both" />

  <Realm className="waffle.apache.WindowsRealm" />


Operating system is Windows Vista Ultimate ... and I'm logged in with admin privileges.   

The goal is to limit access to Windows users who are members of a specific role in our Active directory.

Thanks again for Waffle and your help!


Aug 16, 2010 at 8:54 AM

You need waffle-jna.jar, not waffle-jacob.jar and you don't need Waffle.Windws.AuthProvider.*.

Aug 16, 2010 at 4:30 PM

It works! 

Copying waffle-jna.jar to the tomcat/lib folder, removing waffle-jacob.jar and Waffle.Windows.AuthProvider.* - followed by a tomcat restart did the trick.

Waffle is a remarkable piece of software.  Thank you!


Jan 22, 2011 at 9:07 PM

I'm having a similar problem. The application doesn't deploy when I export it from eclipse. I get this error in the log.

SEVERE: Begin event threw exception
java.lang.ClassNotFoundException: waffle.apache.NegotiateAuthenticator

In my case, I put the 5 jar files in the application WEB-INF/lib (waffle-jna.jar, commons-logging-1.1.1.jar, guava-r07.jar, jna.jar and platform.jar).

However, when I press the start button from the Tomcat Manager page (http://localhost:8080/manager), it starts up without error.

Also, my tomcat web app use 5 spring jar files (spring-beans-2.5.6.jar, spring-context-2.5.6.jar, spring-core-2.5.6.jar and spring-web-2.5.6.jar).

I suspect that I may be missing a "waffle with spring" config setting. I'm using waffle 1.4 with Tomcat 7.0.6.

I'd like to get it to load succesfully when I export it to eclipse. Any thoughts?

Also, when I attempt to acce the tomcat web app. I get this error message.

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.

How do I associate a valid windows user account to the tomcat web app?


Jan 23, 2011 at 7:12 PM

One problem at a time. For starters, authenticators are loaded from a different classloader, so I don't think you can place these files in WEB-INF/lib. As the previous post from @hh1000 says, placing these files in tomcat/lib fixes the problem. Then you are using Tomcat 7? If you want to use an Authenticator (vs. a filter), you need a 1.4 version built with Tomcat 7 ( Then you're talking about spring. Sounds like a lot of moving parts here... backup, start a new thread on the first problem that you're having and describe what you're trying to achive.