I solved this problem! I had made a simple mistake of not making sure the correct dependencies were downloaded in Maven. The required jars for WrapperManager and WrapperListener were not available which were causing the errors.

Answer from G.One on Stack Overflow
Discussions

java - Error: Wrapper cannot find servlet class VendorRegistration or a class it depends on - Stack Overflow
I'm a newb whose also been searching for a solution to the same problem. I've followed the steps that the Elite Gentleman and Bozho outlined here. So first of all, thanks a lot guys. But I still se... More on stackoverflow.com
🌐 stackoverflow.com
Java Wrapper Class not found - Stack Overflow
INFO | jvm 5 | 2014/09/05 17:10:40 ...s(ClassLoader.java:247) INFO | jvm 5 | 2014/09/05 17:10:40 | Could not find the main class: org.tanukisoftware.wrapper.WrapperSimpleApp. Program will exit. INFO | jvm 5 | 2014/09/05 17:10:40 | Exception in thread "main" ERROR | wrapper | 2014/09/05 ... More on stackoverflow.com
🌐 stackoverflow.com
java - Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain - Stack Overflow
One nice day, I came into office ... the same error you stated!... For me the issue was actually a line ending (LF <-> CRLF) issue in the jvm.config file. As the mvnw script expands the options into an actual command the command would get messed up with a CR splitting it before the classpath option. Since that classpath is where the maven-wrapper.jar (containing the MaveWrapperMain) is passed, the java command couldn't ... More on stackoverflow.com
🌐 stackoverflow.com
What is exception wrapping in Java? - Stack Overflow
What is Exception wrapping in Java? How is it useful in exception handling? How it differs from exception propagation? More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › CoolProp › CoolProp › issues › 1172
Please Help With Java Wrapper · Issue #1172 · CoolProp/CoolProp
July 29, 2016 - I sure hope someone can point me in the right direction. As an additional FYI, the precompiled wrapper includes a folder named "platform-independent". While the example.java works you cannot add this folder to any Java project as a package. Because package names cannot contain "-".
Author   CoolProp
🌐
Tanuki Software
wrapper.tanukisoftware.com › doc › english › troubleshooting.html
Troubleshooting - Java Service Wrapper - Tanuki Software
In general, an application should run as fast under the Wrapper as it does when running standalone. Here are a few places to start looking · On some platforms, including Windows, sending large quantities of text to System.out or System.err will cause the program to slow down.
🌐
Coderanch
coderanch.com › t › 408650 › java › wrapper-class-program-error
wrapper class program error (Beginning Java forum at Coderanch)
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums · this forum made possible by our volunteer staff, including ... ... Can you please tell me whats wrong with my code? I am Getting an Error like this. /* Error WrapperTest.java:7: cannot find symbol symbol : class valueOf location: class java.lang.Integer Integer i3=new Integer.valueOf("101011",2); ^ WrapperTest.java:8: cannot find symbol symbol : class valueOf location
🌐
InfoWorld
infoworld.com › home › blogs › java challengers
What you need to know about Java wrapper classes | InfoWorld
July 3, 2025 - When Java attempts to unbox a null wrapper to its primitive equivalent, it tries to call methods like intValue() on a null reference, resulting in a NullPointerException. This issue is particularly dangerous because it passes compilation silently, ...
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › sql › Wrapper.html
Wrapper (Java Platform SE 8 )
April 21, 2026 - SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface. ... Java™ Platform Standard Ed.
Top answer
1 of 6
5

The servlet or one of its dependencies is missing in the classpath.

First of all, always put Java classes in a package, also servlets. Packageless classes are invisible to classes in a normal package. For servlets, this works in specific environments only. You don't want to be dependent on that.

package com.example;

public class VendorRegistration extends HttpServlet {
    // ...
}

With this package, the compiled .class file must end up in /WEB-INF/classes/com/example/VendorRegistration.class. Don't forget to alter the associated <servlet-class> entry in web.xml accordingly.

<servlet>
    <servlet-name>VendorRegistration</servlet-name>
    <servlet-class>com.example.VendorRegistration</servlet-class>
</servlet>

If that doesn't help, then you should put the classes or JAR files containing the (in)direct classes which are specified in any of the servlet's import statements also in /WEB-INF/classes (for .class files) or /WEB-INF/lib (for JAR files). The root cause in the exception stacktrace should tell which class exactly it is. Just read the stacktrace.

See also:

  • Servlets info page - contains a Hello World and several useful links
2 of 6
2

From tomcat 6.0 onwards, there is change in <url-pattern>

<servlet>
<servlet-name>VendorRegistration</servlet-name>
<servlet-name>VendorRegistration</servlet-name>
</servlet>

<servlet-mapping>
       <servlet-name>VendorRegistration</servlet-name>
       <url-pattern>/servlets/servlet/VendorRegistration</url-pattern>
</servlet-mapping>

It worked in my case!

Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 25690337 › java-wrapper-class-not-found
Java Wrapper Class not found - Stack Overflow
INFO | jvm 5 | 2014/09/05 17:10:40 ...s(ClassLoader.java:247) INFO | jvm 5 | 2014/09/05 17:10:40 | Could not find the main class: org.tanukisoftware.wrapper.WrapperSimpleApp. Program will exit. INFO | jvm 5 | 2014/09/05 17:10:40 | Exception in thread "main" ERROR | wrapper | 2014/09/05 ...
Top answer
1 of 4
14

Exception wrapping is when you catch an exception, wrap it in a different exception and throw that exception.

Here is an example:

 try{
       dao.readPerson();
 } catch (SQLException sqlException) {
       throw new MyException("error text", sqlException);
 }

Source: http://tutorials.jenkov.com/java-exception-handling/exception-wrapping.html

On the Other Hand

Exception Propagation: An exception is first thrown from the top of the stack and if it is not caught, it drops down the call stack to the previous method, if not caught there, the exception again drops down to the previous method, and so on until they are caught or until they reach the very bottom of the call stack.

Source: http://www.javatpoint.com/exception-propagation

2 of 4
5

I think Neeraj's answer is spot on. To add on to it, I think one particularly good case is to manage the number of exceptions thrown by abstracting exceptions. To expand on Neeraj's example:

class Manager {

    public void sendPerson() throws ManagerException {
        try{
            Person person = dao.readPerson();
            Socket socket = getSocket();
            OutputStream os = socket.getOutputStream();
            String personJson = objectMapper.writeValueAs(person);
            os.write(personJson);
        } catch (SQLException | SocketException | OutputStreamException | SerializationException e) {
            throw new ManagerException("error text", e);
        }
    }

}

This way, the client only needs to do the following:

try {
    manager.sendPerson();
} catch (ManagerException e) {
    // Handle fail by manager
}

instead of worrying about the fine-grained details of what may have gone wrong in the manager.

🌐
Tanuki Software
wrapper.tanukisoftware.com › doc › english › prop-exit-code-error.html
wrapper.exit_code.error Property - Java Service Wrapper
wrapper.exit_code.error Property · FREE TRIAL · BUY NOW · Configurations Overview · JVM Configurations · Logging Configurations · Windows Configurations · Linux/UNIX Configurations · WrapperW (GUI) Configurations · Property List by Category · Property List by Name · Advanced Properties · Event Properties · Debug "include file" Debug property values · Debug Java ...
🌐
Stack Overflow
stackoverflow.com › questions › 36527797 › sonarqube-5-4-wont-start-wrapper-error
java - SonarQube 5.4 won't start wrapper error - Stack Overflow
N. Lopez – N. Lopez · 2016-04-11 14:56:44 +00:00 Commented Apr 11, 2016 at 14:56 · Good to know, I add an answer in order to mark your question as resolved. ... As discussed, this error occurs when the JVM can not start.
🌐
Oracle
docs.oracle.com › javase › 7 › docs › api › java › sql › Wrapper.html
Wrapper (Java Platform SE 7 )
SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface. ... Java™ Platform Standard Ed.
🌐
SourceForge
sourceforge.net › home › browse › yet another java service wrapper › discussion
Yet Another Java Service Wrapper / Discussion / Open Discussion: YAJSW 12.07 - Cannot install and run the services
December 28, 2016 - errorThe filename, directory name, or volume label syntax is incorrect Dec 28, 2016 11:12:29 AM org.rzo.yajsw.wrapper.FileUtils getFiles WARNING: No files found for ?unresolved?/conf/module-web/logback/ WARNING|wrapper|module-web|16-12-28 11:12:29|working directory ?unresolved?/lib/jetty/ not ...
🌐
Advanced Installer Community
advancedinstaller.com › board index › advanced installer software › common problems
SOLVED: Troubleshooting Java Service Wrapper Issues - Advanced Installer Community
March 14, 2019 - I managed to figure out part of the issue. The Java project I am trying to turn into a service requires a specific JRE. I've now updated the project to bundle the correct JRE (10.0.2). If I just run my JAR file (outside of the service wrapper) the process runs as a daemon as expected and works fine.
🌐
Jenkov
jenkov.com › tutorials › java-exception-handling › exception-wrapping.html
Exception Wrapping
June 23, 2014 - try{ dao.readPerson(); } catch (SQLException sqlException) { throw new MyException("error text", sqlException); } The method dao.readPerson() can throw an SQLException. If it does, the SQLException is caught and wrapped in a MyException. Notice how the SQLException (the sqlException variable) is passed to the MyException's constructor as the last parameter. Exception wrapping is a standard feature in Java since JDK 1.4.