AbstractXmlApplicationContext Error When Logging Into P6 Using API Session Login Method (Doc ID 1354475.1)

Last updated on JUNE 30, 2016

Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version: 6.0 and later   [Release: 6.0 and later ]
Information in this document applies to any platform.

Symptoms


Note: This error only applies to API in local connection mode.

When using the Session login method to get a Session object and connect to P6 database the following errors may occur:
  • Fatal error: org/springframework/context/support/AbstractXmlApplicationContext
  • Fatal error: null
Example

A class called APIConnect which is contained in the package APIConnectPackage and which calls its main method that uses the Session.login() method to try getting a Session object will give the following stack trace error:

com.primavera.integration.client.ClientException: Fatal error: org/springframework/context/support/AbstractXmlApplicationContext
at com.primavera.integration.client.Session.a(Session.java:411)
at com.primavera.integration.client.Session.login(Session.java:371)
at APIConnectPackage.APIConnect.main(APIConnect.java:24)

Original Exception:
java.lang.NoClassDefFoundError: org/springframework/context/support/AbstractXmlApplicationContext
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.primavera.bre.Initializer.start(Initializer.java:25)
at com.primavera.bre.Application.start(Application.java:113)
at com.primavera.integration.server.ServerFacadeBase.<init>(ServerFacadeBase.java:97)
at com.primavera.integration.server.ServerFacadeBOMgr.<init>(ServerFacadeBOMgr.java:141)
at com.primavera.integration.server.ServerFacade.<init>(ServerFacade.java:21)
at com.primavera.integration.server.ServerFacade.<clinit>(ServerFacade.java:16)
at com.primavera.integration.client.LocalSession.login(LocalSession.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.primavera.integration.client.Session.a(Session.java:383)
at com.primavera.integration.client.Session.login(Session.java:371)
at APIConnectPackage.APIConnect.main(APIConnect.java:24)

Caused by: java.lang.ClassNotFoundException: org.springframework.context.support.AbstractXmlApplicationContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 38 more

In the P6WebAccess.html log file contained within the API Install Directory PrimaveraLogs folder may contain the following messages regarding this error:
  • Session may not be null in this business object.
  • Invalid database instance while checking authentication mode.
  • Connection pool configuration error for database with id 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