Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8635149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:54:09+00:00 2026-06-12T09:54:09+00:00

Been on this one for a few days now. I have a java servlet,

  • 0

Been on this one for a few days now. I have a java servlet, built with maven that will be deployed to Jetty (an older version). It’s a RESTful web service on Jetty built with RESTEasy and Jackson, and the Jackson Mongo Mapper to connect me to MongoDB.

I can run the application from maven/jetty just fine (using mvn jetty:run), and it returns JSON as expected for queries that don’t use the Jackson Mongo Mapper/Jackson bit. When I send a request that triggers Jackson and the mapper, however, I first get this error:

java.lang.NoClassDefFoundError: org/codehaus/jackson/map/deser/std/StdDeserializer

When I submit a second time (and all subsequent requests), I get this error:

java.lang.NoClassDefFoundError: Could not initialize class net.vz.mongodb.jackson.JacksonDBCollection

As nearly as I can tell, I have all the dependencies set up correctly, although I’ll include my web.xml and pom.xml at the end of the question. If it isn’t a dependency, it’s occurred to me that there might be some issue with how my bean (BillItem.class) is getting passed. I’m relatively new to Java so this could easily be a stupid mistake rather than something related to the specific stack I’m trying to implement…any ideas of what is going on?

Here’s my web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

   <welcome-file-list>
    <welcome-file>index.html</welcome-file>
   </welcome-file-list>

   <!--  
    <context-param>
        <param-name>resteasy.scan</param-name>
        <param-value>true</param-value>     
    </context-param> -->

   <context-param>
        <param-name>resteasy.resources</param-name>
        <param-value>com.myproject.BillServer</param-value>
   </context-param>

   <context-param>
      <param-name>javax.ws.rs.Application</param-name>
      <param-value>com.myproject.Service</param-value>
   </context-param>

    <context-param>
      <param-name>resteasy.resource.method-interceptors</param-name>
      <param-value>org.jboss.resteasy.core.ResourceMethodSecurityInterceptor</param-value>
   </context-param>

   <listener>
      <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
   </listener>

    <servlet>     
      <servlet-name>Resteasy</servlet-name>
      <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
      <servlet-name>Resteasy</servlet-name>
      <url-pattern>/*</url-pattern>
   </servlet-mapping>

</web-app>

Here’s my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.myproject</groupId>
    <version>0.0.1-SNAPSHOT</version>
    <name>MyProject</name>
    <artifactId>MyProject</artifactId>
    <packaging>jar</packaging>

    <properties>
        <java.version>1.6</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <dependencies>
        <!-- Servlet API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>

        <!-- Jetty -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>8.1.7.v20120910</version>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1-glassfish</artifactId>
            <version>2.1.v20100127</version>
        </dependency>   

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jackson-provider</artifactId>
            <version>2.3.4.Final</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>2.3.4.Final</version>    
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>jaxrs-api</artifactId>
            <version>2.3.4.Final</version>
          </dependency>
          <dependency>
              <groupId>org.codehaus.jackson</groupId>
              <artifactId>jackson-core-asl</artifactId>
              <version>1.9.9</version>
          </dependency>
          <dependency>
              <groupId>net.vz.mongodb.jackson</groupId>
              <artifactId>mongo-jackson-mapper</artifactId>
              <version>1.4.2</version>
          </dependency>       
          <dependency>
              <groupId>org.mongodb</groupId>
              <artifactId>mongo-java-driver</artifactId>
              <version>2.9.1</version>
          </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>jetty-maven-plugin</artifactId>
                </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <!-- The maven app assembler plugin will generate a script that sets up the classpath and runs your project -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <assembleDirectory>target</assembleDirectory> 
                    <programs>
                        <program>
                            <mainClass>com.MyProject.Main</mainClass>
                            <name>webapp</name>
                        </program>
                    </programs>
                    <useAllProjectDependencies>true</useAllProjectDependencies>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>                
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

And the last line of the following is the offending call that’s throwing the error:

        Mongo mongo = new Mongo(MONGO_PATH, MONGO_PORT);
        DB db = mongo.getDB(MONGO_APPDB);
        DBCollection collection = db.getCollection(MONGO_BILL_COL);
        JacksonDBCollection<BillItem, String> coll = JacksonDBCollection.wrap(collection, BillItem.class, String.class);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:54:10+00:00Added an answer on June 12, 2026 at 9:54 am

    This was some serious idiocy. I accidentally deleted 3 of the jackson dependencies when I was cleaning up my pom file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing with this one for a few days now, and keep
I have been stuck on this for a few days now and it is
This one has been driving me nuts for a few days now and I've
I have been trying to do this for a few days now using AVFoundation
I have been working on this frustrating bug for a few days now and
This has been bugging me for a few days now. I have written a
I have been searching about this subject now for quite a few days. And
This problem has been kicking my butt for a few days now. I have
this one has been puzzling me for a few days now and I feel
I've been Googling this one, on and off, for a few days now. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.