JAX-RS Jersey Application Throws java.lang.ArrayIndexOutOfBoundsException When Using JDK8 Lambdas Expression (Doc ID 2167159.1)

Last updated on MARCH 29, 2017

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 to 12.2.1.1.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

During deployment the following exception occurs while using Lambdas Expression on JDK 1.8 with JAX-RS/ Jersey library

<Mar 4, 2015 11:00:33 AM CET> <Error> <HTTP> <BEA-101216> <Servlet: "Jersey"
failed to preload on startup in Web application: "basicWebapp.war".
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at
com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:724)
Truncated. see log file for complete stacktrace

Caused By: java.lang.ArrayIndexOutOfBoundsException: 52264
at
jersey.repackaged.org.objectweb.asm.ClassReader.readClass(ClassReader.java:1976)
at
jersey.repackaged.org.objectweb.asm.ClassReader.accept(ClassReader.java:464)
at
jersey.repackaged.org.objectweb.asm.ClassReader.accept(ClassReader.java:420)
at
com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:138)
at
com.sun.jersey.core.spi.scanning.JarFileScanner.scan(JarFileScanner.java:97)

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms