IBM Support

PI23168;8.5.5: java.lang.classnotfoundexception in data sources after upgrade to

Download


Abstract

ClassNotFoundExceptions occur where nested libraries are in use

Download Description

PI23168 resolves the following problem:

ERROR DESCRIPTION:
After upgrading to WebSphere Application Server Liberty Edition 8.5.5.2, datasources may throw an exception like the following:

Could not find datasource: jdbc/eIntake
javax.naming.NamingException: CWWKN0008E: An object could not be
obtained for name jdbc/datasource.
at
com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:125)
at
com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:306)
at
com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:301)
at
org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)

Caused by: java.lang.ClassNotFoundException:
oracle.jdbc.pool.OracleConnectionPoolDataSource
at
com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonL
ibraryClassLoaders(AppClassLoader.java:403)
at
com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppCla
ss Loader.java:232)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppCla
ssLoader.java:378)
at
com.ibm.ws.jdbc.internal.JDBCDriverService$1.run(JDBCDriverServi
ce.java:226)

This is due to a defect in which an ID generated for nested library elements is the same across different <dataSource/> elements causing only one of them to be loaded.

LOCAL FIX:
Set an ID on the nested <library/> element. As this will produce a warning from the WebSphere Developer Tools also move the <library/> elements to the top level and using a libraryRef inside the <jdbcDriver/> element to reference them.

PROBLEM SUMMARY

USERS AFFECTED:
All users of IBM WebSphere Application Server Liberty Profile 8.5.5.3 using nested libraries

PROBLEM DESCRIPTION:
ClassNotFoundExceptions occur where nested libraries are in use

RECOMMENDATION:
None

Internal IDs generated for nested library elements in server.xml are the same across different elements causing only one of them to be loaded. This therefore leads to ClassNotFoundExceptions.
For example when using configuration such as:
<dataSource id="derbyWithNestedList"
jndiName="jdbc/derbyWithNestedList">
<jdbcDriver>
<library>
<fileset dir="${server.config.dir}/derby"/>
</library>
</jdbcDriver>
<properties.derby.embedded createDatabase="create" />
</dataSource>
<dataSource id="db2WithNestedList"
jndiName="jdbc/db2WithNestedList">
<jdbcDriver>
<library>
<fileset dir="${server.config.dir}/db2"/>
</library>
</jdbcDriver>
<properties.db2.jcc />
</dataSource>
the two nested libraries end up with the same internal ID which leads to problems when class loading.

PROBLEM CONCLUSION:
The Liberty profile server has been changed so that unique IDs are generated for each nested library element in the server configuration.
The fix for this APAR is currently targeted for inclusion in fix pack 8.5.5.4. Please refer to the Recommended Updates page for delivery information:
http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980

Prerequisites

None

Installation Instructions

Please review the readme.txt for detailed installation instructions.

[{"INLabel":"Readme","INLang":"US English","INSize":"6461","INURL":"ftp://public.dhe.ibm.com/software/websphere/appserv/support/fixes/PI23168/8.5.5.3/readme.txt"}]
On
[{"DNLabel":"8.5.5.3-WS-WLP-IFPI23168","DNDate":"10-15-2014","DNLang":"US English","DNSize":"462316","DNPlat":{"label":"AIX","code":"PF002"},"DNURL":"http://www-933.ibm.com/eserver/support/fixes/fixcentral/swgquickorder?fixes=8.5.5.3-WS-WLP-IFPI23168&productid=WebSphere%20Application%20Server&brandid=5","DNURL_FTP":null,"DDURL":null},{"DNLabel":"8.5.5.2-WS-WLP-IFPI23168","DNDate":"10-15-2014","DNLang":"US English","DNSize":"459931","DNPlat":{"label":"AIX","code":"PF002"},"DNURL":"http://www-933.ibm.com/eserver/support/fixes/fixcentral/swgquickorder?fixes=8.5.5.2-WS-WLP-IFPI23168&productid=WebSphere%20Application%20Server&brandid=5","DNURL_FTP":null,"DDURL":null}]

Technical Support

Contact IBM Support using SR (http://www.ibm.com/software/support/probsub.html), visit the WebSphere Application Server support web site (http://www.ibm.com/software/webservers/appserv/was/support/), or contact 1-800-IBM-SERV (U.S. only).

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.5.5.2;8.5.5.3","Edition":"Liberty","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg24038522