Classloader Causes java.lang.ClassNotFoundException In WLS When Using JAXB (Doc ID 1594263.1)

Last updated on JULY 29, 2017

Applies to:

Oracle TopLink - Version 12.1.2.0.0 to 12.1.2.0.0 [Release 12c]
Oracle WebLogic Server - Version 12.1.2.0.0 to 12.1.2.0.0 [Release 12c]
Information in this document applies to any platform.
TopLink 12.1.2 + patch 17410040

Symptoms

The code references default jaxb, but weblogic has EclipseLink MOXy as jaxb implementation.


When using HelloWorld.war in WLS 10.3.6 and it was working fine. But in WLS 12.1.2, it started reporting the error:

Exception Description: Class: [com.abc.CTSCalendarDate] was not found while converting from class names to classes.
Internal Exception: java.lang.ClassNotFoundException: com.abc.CTSCalendarDate
- with linked exception:
[Exception [EclipseLink-7198] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Class: [com.abc.CTSCalendarDate] was not found while converting from class names to classes.
Internal Exception: java.lang.ClassNotFoundException: com.abc.CTSCalendarDate]]
at helloworld.MakeContext.makeContext(MakeContext.java:30)
at jsp_servlet.__index._jspService(__index.java:75)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

The application does NOT use EclipseLink anywhere. It only is being used because it is now the default of WLS 12.1.2 as the jaxb implementation.

This issue is noticed when TopLink 12.1.2 is already patched with patch 17410040.

Changes

 Upgraded from WLS 10.3.6 to 12.1.2

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