Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ServletInitialization Exception in Resteasy doFilter() chain

Posted on 2014-09-15
2
281 Views
Last Modified: 2014-09-16
In our WebSphere environment (8.5.0.2), this MULTIPART_FORM_DATA service call is causing all service calls to fail in the servlet doFilter() chain.

      @POST
      @Path("/upload_attachment")
      @Consumes(MediaType.MULTIPART_FORM_DATA)
      @Produces(MediaType.APPLICATION_JSON)
      public Response uploadAttachment(@FormDataParam("attachment") InputStream input,                               @FormDataParam("attachment") FormDataContentDisposition contentDisposition) {

The error:

javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:399)
        ...
Caused by: java.lang.NoSuchMethodError: com/sun/jersey/core/reflection/ReflectionHelper.getFromStringStringMethodPA(Ljava/lang/Class;)Ljava/security/PrivilegedAction;

This is not an issue for us locally.  Does any know what might be going on here?
0
Comment
Question by:jkavx
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 40324897
Make sure you have the correct Jersey library jars and that they are in the classpath. When you have it right, you should be able to run javap on the ReflectionHelper class that it's complaining about and see the method that it's currently saying does not exist
0
 

Author Closing Comment

by:jkavx
ID: 40326340
Thx.  There was an old version of the jersey-core jar that was overriding what we have in our war file.  The ReflectionHelper class in the older jar file does not have this method.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hibernate jars 4 45
jsp login check 12 42
java example issue 3 23
running on tomcat not jboss eap 7.0 3 18
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question