J2CA0106E: A 5.0 DataSource was attempted to be used in a WebModule that was not level 2.3
 Technote (troubleshooting)
 
Problem(Abstract)
When a Web application tries to use a data source in WebSphere® Application Server V5.0, V5.1 or V6.0, the following error may occur:

J2CA0106E: A 5.0 DataSource was attempted to be used in a WebModule that was not level 2.3
 
Cause
WebSphere Application Server V5.0 and V5.1 support servlets that comply with the Servlet 2.2 or Servlet 2.3 specifications. WebSphere Application Server V6.0 supports servlets at the Servlet 2.2, 2.3, or 2.4 specifications. You can review the differences between the Servlet specifications here.

In WebSphere Application Server V5.0, V5.1 and V6.0, servlets at the 2.2 specification level cannot use a standard data source. Such servlets must use a data source that is defined as a Version 4 data source. In the JDBC Provider configuration in the administrative console, you can create either Data Sources or Data Sources (Version 4). Standard data sources are sometimes referred to as Version 5 data sources.

The application developer must decide which Servlet specification level to use. The selection is made when packaging the application using the Application Server Toolkit, WebSphere Studio Application Developer (WSAD), Rational® Application Developer (RAD), or a third-party development tool.

The Application Server Toolkit or the development tool will generate a deployment descriptor, web.xml, for the Web application. The web.xml is generated differently depending on the Servlet specification level that is chosen.

WebSphere Application Server will read the web.xml to determine the specification level of the servlet at runtime. If the servlet is at the 2.2 specification level and tries to use a standard data source, the J2CA0106E error will occur.

 
Resolving the problem
To resolve the problem, you can create a Version 4 data source and have the application use it instead of the standard data source. You can also use the Application Server Toolkit or your development tool to migrate your web application to the Servlet 2.3 or 2.4 specification.

To determine which Servlet specification your application is using, check the web.xml packaged within the .war file.

For a Servlet 2.2 application, you will see:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

For a Servlet 2.3 application, you will see:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

For a Servlet 2.4 application, you will see:
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1227802
IBM Group: Software Group
Modified date: Feb 1, 2006