Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Referencing Local EJB interfaces from a servlet

13 views
Skip to first unread message

kkarski

unread,
Feb 29, 2004, 6:32:23 PM2/29/04
to
Ok, so I did some print out statements of my context path and discovered that even though I specify the local bean JNDI name as ProductFactoryLocal, it is still being registered as ProductFactory but under the “local:ejb” context. So, I can now access my local bean via “local:ejb/ProductFactory”.

However, if I move my EAR to a different container, will the path “local:ejb” work? In other words, is this a J2EE spec compliant path declaration or is this a WebSphere only thing?

Sudhakar

unread,
Feb 29, 2004, 10:37:12 PM2/29/04
to
Hi All,
I'm trying to connect to a AS400 DB from WSA5.1 on Windows2000
professional. I connect to the AS400 db using DB2Connect 8.1 EE and gave
the ALIAS name of the db in the DataSource configuration in WAS5.1

When i start the server i get the following error message

COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1097N The node name
was not found in the node directory. SQLSTATE=42720

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown
Source)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown
Source)
at COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Connection.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2ReusableConnection.<init>(Unknown Source)
at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(Unknown Source)
at COM.ibm.db2.jdbc.DB2XAConnection.<init>(Unknown Source)
at COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(Unknown Source)
at COM.ibm.db2.jdbc.DB2XADataSource.getXAConnection(Unknown Source)
at
com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:688)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:683)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:191)
at
com.olasme.data.manager.ejb.JDBCDataSessionBean.getConnection(JDBCDataSessionBean.java:194)
at
com.olasme.data.manager.ejb.JDBCDataSessionBean.getConnection(JDBCDataSessionBean.java:158)
at
com.olasme.framework.persistency.DomainSaver.prepareSQLStatement(DomainSaver.java:1432)
at
com.olasme.framework.persistency.DomainSaver.fetchPersistentContainerObjectsForIdHelperSet(DomainSaver.java:1028)
at
com.olasme.framework.persistency.DomainSaver.createContainerObjectsForIdHelperSet(DomainSaver.java:817)
at
com.olasme.framework.persistency.DomainSaver.findByIdSet(DomainSaver.java:744)
at
com.olasme.framework.persistency.DomainSaver.findById(DomainSaver.java:710)
at
com.olasme.framework.persistency.BaseContainmentWorker.findById(BaseContainmentWorker.java:386)
at
com.olasme.domain.id.GlobalRecordIdHelper$1.findById(GlobalRecordIdHelper.java:64)
at
com.olasme.data.manager.ejb.DataReaderBean.findById(DataReaderBean.java:80)
at
com.olasme.data.manager.ejb.EJSRemoteStatelessDataReader_c2be3553.findById(Unknown
Source)
at
com.olasme.data.manager.ejb._EJSRemoteStatelessDataReader_c2be3553_Tie.findById(_EJSRemoteStatelessDataReader_c2be3553_Tie.java:192)
at
com.olasme.data.manager.ejb._EJSRemoteStatelessDataReader_c2be3553_Tie._invoke(_EJSRemoteStatelessDataReader_c2be3553_Tie.java:88)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:602)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:455)
at com.ibm.rmi.iiop.ORB.process(ORB.java:402)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1685)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2173)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:64)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
.
[1/03/04 15:37:41:312 NZDT] 5d2acb40 FreePool E J2CA0046E: Method
createManagedConnctionWithMCWrapper caught an exception during creation
of the ManagedConnection for resource jdbc/DataSource, throwing
ResourceAllocationException. Original exception:
com.ibm.ws.exception.WsException: DSRA8100E: Unable to get a
XAConnection from the DataSource.
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:244)
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:171)
at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:208)
at
com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:706)
at
com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:487)
at
com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:577)
at
com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1280)
at
com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:1064)
at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1571)
at
com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:622)
at
com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:424)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:216)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:191)
at
com.olasme.data.manager.ejb.JDBCDataSessionBean.getConnection(JDBCDataSessionBean.java:194)
at
com.olasme.data.manager.ejb.JDBCDataSessionBean.getConnection(JDBCDataSessionBean.java:158)
at
com.olasme.framework.persistency.DomainSaver.prepareSQLStatement(DomainSaver.java:1432)
at
com.olasme.framework.persistency.DomainSaver.fetchPersistentContainerObjectsForIdHelperSet(DomainSaver.java:1028)
at
com.olasme.framework.persistency.DomainSaver.createContainerObjectsForIdHelperSet(DomainSaver.java:817)
at
com.olasme.framework.persistency.DomainSaver.findByIdSet(DomainSaver.java:744)
at
com.olasme.framework.persistency.DomainSaver.findById(DomainSaver.java:710)
at
com.olasme.framework.persistency.BaseContainmentWorker.findById(BaseContainmentWorker.java:386)
at
com.olasme.domain.id.GlobalRecordIdHelper$1.findById(GlobalRecordIdHelper.java:64)
at
com.olasme.data.manager.ejb.DataReaderBean.findById(DataReaderBean.java:80)
at
com.olasme.data.manager.ejb.EJSRemoteStatelessDataReader_c2be3553.findById(Unknown
Source)
at
com.olasme.data.manager.ejb._EJSRemoteStatelessDataReader_c2be3553_Tie.findById(_EJSRemoteStatelessDataReader_c2be3553_Tie.java:192)
at
com.olasme.data.manager.ejb._EJSRemoteStatelessDataReader_c2be3553_Tie._invoke(_EJSRemoteStatelessDataReader_c2be3553_Tie.java:88)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:602)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:455)
at com.ibm.rmi.iiop.ORB.process(ORB.java:402)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1685)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2173)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:64)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1097N
The node name was not found in the node directory. SQLSTATE=42720

But i'm able to connect to the same db using WSAD5.1.1 and do my stuff.
Any help would be appreciated.

Thnx in Advance
Sudhakar

kkarski

unread,
Feb 29, 2004, 11:24:40 PM2/29/04
to
eh....I think you accidentally replied to my post rather than post a new thread.

Ken Hygh

unread,
Mar 1, 2004, 6:08:08 AM3/1/04
to
> ..

You probably need to do a DB2 catalog TCPIP node .... command

Ken

Sudhakar

unread,
Mar 1, 2004, 4:04:19 PM3/1/04
to
Hi Ken,
I did the db2 catalog comand and still having the same problem

Sudhakar
Ken Hygh wrote:

> Sudhakar wrote:
>
> > Hi All,
> > I'm trying to connect to a AS400 DB from WSA5.1 on Windows2000
> > professional. I connect to the AS400 db using DB2Connect 8.1 EE and
> > gave the ALIAS name of the db in the DataSource configuration in WAS5.1
> >
> > When i start the server i get the following error message
> >
> > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1097N The node
> > name was not found in the node directory. SQLSTATE=42720
> >
> > at
> > COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown
> > Source)
> > at
> > COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown
> > Source)
> > at COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source)

> > at COM.ibm.db2.jdbc.app.DB2Connection.(Unknown Source)
> > at COM.ibm.db2.jdbc.app.DB2ReusableConnection.(Unknown Source)
> > at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(Unknown
> Source)
> > at COM.ibm.db2.jdbc.DB2XAConnection.(Unknown Source)

> com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.(DataStoreAdapterException.java:244)
>
> >
> > at
> >
> com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.(DataStoreAdapterException.java:171)

Ken Hygh

unread,
Mar 2, 2004, 6:29:39 AM3/2/04
to
Sudhakar wrote:
> Hi Ken,
> I did the db2 catalog comand and still having the same problem
>
> Sudhakar
> Ken Hygh wrote:
>
>> Sudhakar wrote:
>>

>> >
>> > COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1097N The node
>> > name was not found in the node directory. SQLSTATE=42720

Then you may have finger-checked something in the datasource definition.
This is saying that the node specified isn't found on the machine WAS is
installed on.

Ken

Frances Stewart

unread,
Mar 2, 2004, 7:18:55 AM3/2/04
to
Is there any particular reason you are attempting to use DB2 8.1 one
instead of the Java Toolbox for iSeries JDBC drivers/datasources which
are meant for just this type of situation?

Ballallaz

unread,
Mar 8, 2004, 11:06:13 AM3/8/04
to
Stewart, I you seem to be very knowledgable, can you tell me where to
find this "Java Toolbox for iSeries JDBC drivers"??

The explanation for the "DB2 UDB for iSeries (Toolbox)" is: "IBM
Toolbox for Java JDBC Driver for remote DB2 connections on iSeries.
This driver is recommended over the IBM Developer Kit for Java JDBC
Driver for access to remote DB2 UDB for iSeries. The jar file for this
driver is /QIBM/ProdData/Http/Public/jt400/lib/jt400.jar "

where does this JT400.jat come from? (....with this installation path)
Do I have to install any special software on my WAS server?
Or I just need the jt400.jar file?

Let me know, that would be a great help

regards

Ballallaz

Frances Stewart <fran...@us.ibm.com> wrote in message news:<c21u3l$82r6$1...@news.boulder.ibm.com>...

Jacques Desmazieres

unread,
Mar 9, 2004, 3:09:16 AM3/9/04
to
I did that on WAS 5.0.2. I just retrieved the jt400.jar file from the DB2
install on the AS400 server and copy it somewhere on the WAS server. We did
not install anything.


Jacques


"Ballallaz" <jdo...@yahoo.com> a écrit dans le message news:
4084f63f.04030...@posting.google.com...

Sudhakar

unread,
Mar 14, 2004, 6:05:29 PM3/14/04
to
Hi All,
Thnx for the suggestions. And sorry for the late reply. I got the
thing working. My database structure was not in sync with the code (one
field was missing in the table).

After fixing that i'm able to connect and play. I think this might be
a bug in either DB2 Connect / AS400 DB2 or else some config settings
need to be done on the AS400 side.

Thanx for All of you

Sudhakar

Jacques Desmazieres

> I did that on WAS 5.0.2. I just retrieved the jt400.jar file from the DB2
> install on the AS400 server and copy it somewhere on the WAS server.
> We did
> not install anything.
>
>
> Jacques
>
>

> "Ballallaz" a écrit dans le message news:

0 new messages