政府机关中间件

was 6.0 查找的引用对象被发送到 JNDI 命名管理器并且导致异常

环境介绍:操作系统 windows xp系统
was版本:6.0.0.1
现象描述:在jdbc数据源中连接正常,但是在程序中连接时就报如下错误。
原来在was5.0中使用时正常。但是迁移到was6.0中就报如下错误。
请各位大哥帮帮忙。谢谢。
[10-7-14 9:49:46:422 CST] 00000025 SystemOut     O init servlet, logPropertiesFile=E:Program FilesIBMWebSphereAppServerprofilesAppSrv01installedAppsjinye-001Node01Cellcallcenter.eartobacco.warWEB-INFconflog4j.properties
[10-7-14 9:49:46:469 CST] 00000025 ServletWrappe A   SRVE0242I: [MainServlet]:初始化成功。
[10-7-14 9:49:46:938 CST] 00000025 ConnectionFac E   J2CA0106E: 尝试在非 2.3 级别的 WebModule 中使用 5.0 数据源。
[10-7-14 9:49:47:000 CST] 00000025 Helpers       W   NMSV0605W: 使用名称“jdbc/MyDataSource”从上下文“jinye-001Node01Cell/nodes/jinye-001Node01/servers/server1”中查找的引用对象被发送到 JNDI 命名管理器并且导致异常。引用数据如下:
引用工厂类名:com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
引用工厂类位置 URL:
Reference Class Name: javax.resource.cci.ConnectionFactory
Type: connectorName
Content: MyDataSource
Type: classpath
Content: E:Program FilesIBMWebSphereAppServer/lib/rsadapter.rar;E:Program FilesIBMWebSphereAppServer/lib/rsadapter.rar
Type: FactoryJndiName
Content: jdbc/MyDataSource
Address Type: dd
AddressContents: ffffffac ffffffed 0 5 73 72 0 25 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 52 65 73 6f 75 72 63 65  ...
Address Type: miscProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a  ...
Address Type: poolProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 27 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f  ...
Address Type: configProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 23 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f  ...
Address Type: mmProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a  ...
Address Type: dsProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a  ...
Address Type: mcfProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 2d 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 61 6e 61 67 65 64 43  ...
Address Type: mbeanProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 1a 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 42 65 61 6e 50 72 6f  ...

异常数据如下:
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.ConnectionFactoryBuilderServerImpl.processObjectInstance(ConnectionFactoryBuilderServerImpl.java:887)
        at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:557)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:314)
        at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874)
        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:361)
        at com.loushang.waf.service.conn.JndiDataSource.init(JndiDataSource.java:34)
        at com.loushang.waf.service.conn.JndiDataSource.getConnection(JndiDataSource.java:103)
        at com.loushang.waf.service.conn.JndiDataSource.getConnection(JndiDataSource.java:95)
        at com.loushang.waf.service.conn.OurConnService.getConnection(OurConnService.java:56)
        at com.loushang.waf.service.conn.OurConn.getConnection(OurConn.java:68)
        at com.loushang.waf.service.newdict.OurDictService.queryMap(OurDictService.java:264)
        at com.loushang.waf.service.newdict.OurDictService.initDict(OurDictService.java:363)
        at com.loushang.waf.service.newdict.OurDictService.initDicts(OurDictService.java:74)
        at com.loushang.waf.service.newdict.OurDictService.init(OurDictService.java:57)
        at com.loushang.util.service.GenericServiceProxy.initService(GenericServiceProxy.java:174)
        at com.loushang.util.service.GenericServiceProxy.doInitService(GenericServiceProxy.java:231)
        at com.loushang.util.service.GenericServiceProxy.initServices(GenericServiceProxy.java:201)
        at com.loushang.util.service.GenericServiceProxy.init(GenericServiceProxy.java:97)
        at com.loushang.waf.servlet.MainServlet.init(MainServlet.java:370)
        at com.loushang.waf.servlet.MainServlet.performTask(MainServlet.java:431)
        at com.loushang.waf.servlet.MainServlet.doPost(MainServlet.java:94)
        at com.loushang.waf.servlet.MainServlet.doGet(MainServlet.java:81)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        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.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2841)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
        at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
        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.HttpInboundLink.ready(HttpInboundLink.java:276)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
        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)

[10-7-14 9:49:47:188 CST] 00000025 Helpers       W   NMSV0610I: 从 javax.naming.Context 实现中抛出 NamingException。详细信息如下:
上下文实现:com.ibm.ws.naming.jndicos.CNContextImpl
上下文方法:lookupExt
上下文名称:jinye-001Node01Cell/nodes/jinye-001Node01/servers/server1
目标名称:jdbc/MyDataSource
其它数据:""
异常堆栈跟踪: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.ejs.j2c.ConnectionFactoryBuilderImpl.validServlet(ConnectionFactoryBuilderImpl.java:1109)
        at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getCMConfigData(ConnectionFactoryBuilderImpl.java:730)
        at com.ibm.ejs.j2c.ConnectionFactoryBuilderServerImpl.processObjectInstance(ConnectionFactoryBuilderServerImpl.java:887)
        at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:557)
        at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:314)
        at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:874)
        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:361)
        at com.loushang.waf.service.conn.JndiDataSource.init(JndiDataSource.java:34)
        at com.loushang.waf.service.conn.JndiDataSource.getConnection(JndiDataSource.java:103)
        at com.loushang.waf.service.conn.JndiDataSource.getConnection(JndiDataSource.java:95)
参与1

0同行回答

“答”则兼济天下,请您为题主分忧!

提问者

caohjdragon
系统运维工程师inspur
擅长领域: 服务器AIXUnix

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2010-07-14
  • 关注会员:1 人
  • 问题浏览:3858
  • X社区推广