Advertisement

06.29.2005 at 03:46AM PDT, ID: 21474578
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

WebSphere 6.0 + connection pool problem

Asked by sicyon in IBM Websphere Application Server

Tags: , ,

I have setup an a connection pool on webSphere 6.0 server.
Here is my JSP:
<%@ page import="java.sql.*,javax.sql.*,javax.naming.*"%>
<%
Context c = new InitialContext();
DataSource ds = (DataSource)c.lookup("jdbc/webuser");
%>

I got the following error message, when I execute the above coding:

Error 500: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.

Here is the System.out.log content:
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:932)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:681)
      at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1969)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1824)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1737)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1444)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1324)
      at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.ibm._jsp._db._jspService(_db.java:70)
      at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
      at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
      at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.validServlet(ConnectionFactoryBuilderImpl.java:1109)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getCMConfigData(ConnectionFactoryBuilderImpl.java:730)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:330)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874)
      ... 26 more

[6/29/05 18:36:47:391 HKT] 0000003f ServletWrappe E   SRVE0014E: Uncaught service() exception root cause /db.jsp: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:932)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:681)
      at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1969)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1824)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1737)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1444)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1324)
      at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.ibm._jsp._db._jspService(_db.java:70)
      at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
      at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
      at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.validServlet(ConnectionFactoryBuilderImpl.java:1109)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getCMConfigData(ConnectionFactoryBuilderImpl.java:730)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:330)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874)
      ... 26 more

[6/29/05 18:36:47:413 HKT] 0000003f WebApp        E   SRVE0026E: [Servlet Error]-[/db.jsp]: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet]
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:932)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:681)
      at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1969)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1824)
      at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1737)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1444)
      at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1324)
      at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.ibm._jsp._db._jspService(_db.java:70)
      at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
      at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
      at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
      at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Caused by: java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.validServlet(ConnectionFactoryBuilderImpl.java:1109)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getCMConfigData(ConnectionFactoryBuilderImpl.java:730)
      at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:330)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
      at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874)

Can any one tell me what happening and how can I fix this problem?

thank youStart Free Trial
[+][-]06.29.2005 at 05:52AM PDT, ID: 14327905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.29.2005 at 04:55PM PDT, ID: 14334442

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2005 at 05:47AM PDT, ID: 14337490

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: IBM Websphere Application Server
Tags: websphere, connection, datasource
Sign Up Now!
Solution Provided By: damonf
Participating Experts: 2
Solution Grade: B
 
 
[+][-]07.03.2005 at 07:26PM PDT, ID: 14359696

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2005 at 07:27PM PDT, ID: 14359699

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42