Problem linking BMP to Connection pool

Hi there!

I am working on a BMP entity bean on weblogic6.1. When I RUN my client class I am getting a Linking error with the connection pool(named as ejbPool) (using Oracle 8i DB).

The error reads:

javax.naming.LinkException: [Root exception is javax

.naming.NameNotFoundException: Unable to resolve ejbPool. Resolved: '' Unresolve

d:'ejbPool' ; remaining name '']; Link Remaining Name: 'ejbPool'

Start server side stack trace:

examples.AccountException: javax.naming.LinkException: [Root exception is javax

.naming.NameNotFoundException: Unable to resolve ejbPool. Resolved: '' Unresolve

d:'ejbPool' ; remaining name '']; Link Remaining Name: 'ejbPool'

at examples.AccountBean.ejbHomeGetTotalBankValue(AccountBean.java:114)

at examples.AccountBean_t4qrab_Impl.ejbHomeGetTotalBankValue(AccountBean

_t4qrab_Impl.java:212)

at examples.AccountBean_t4qrab_HomeImpl.getTotalBankValue(AccountBean_t4

qrab_HomeImpl.java:159) and so on and on....................

Any ideas about where I might have went wrong?

Thanks in advance!

-Manasvi

[1177 byte] By [nmhb23] at [2007-9-19]
# 1

Hi Manasvi,

Seems like u tempered with the "weblogic-ejb-jar.xml" file and changed the default jndi name(ie examples-dataSource-demoPool) with "ejbPool".

Now if I m correct then u need to go to the administrator pane and create a connection pool with any name. Then u go to a Tab just below connection pool called tx Data Sources(if I guessed right).There u need to create a new datasource with the jndi name "ejbPool". Then u specify the Pool Name ( the one u created above).Then press "Create".Got to "targets" tab set the server as "examplesserver".Apply.

Close everything.

Restart ur server.

and run ur example.

Hope by the time u read this ur problem is solved.

Regards

Chatni

> Hi there!

> I am working on a BMP entity bean on weblogic6.1. When

> I RUN my client class I am getting a Linking error

> with the connection pool(named as ejbPool) (using

> Oracle 8i DB).

>

> The error reads:

> javax.naming.LinkException: [Root exception is

> javax

> .naming.NameNotFoundException: Unable to resolve

> ejbPool. Resolved: '' Unresolve

> d:'ejbPool' ; remaining name '']; Link Remaining Name:

> 'ejbPool'

>

> Start server side stack trace:

> examples.AccountException: javax.naming.LinkException:

> [Root exception is javax

> .naming.NameNotFoundException: Unable to resolve

> ejbPool. Resolved: '' Unresolve

> d:'ejbPool' ; remaining name '']; Link Remaining Name:

> 'ejbPool'

> at

> at

> at

> t

> examples.AccountBean.ejbHomeGetTotalBankValue(AccountBe

> n.java:114)

> at

> at

> at

> t

> examples.AccountBean_t4qrab_Impl.ejbHomeGetTotalBankVal

> e(AccountBean

> _t4qrab_Impl.java:212)

> at

> at

> at

> t

> examples.AccountBean_t4qrab_HomeImpl.getTotalBankValue(

> ccountBean_t4

> qrab_HomeImpl.java:159) and so on and

> on....................

>

> Any ideas about where I might have went wrong?

>

> Thanks in advance!

> -Manasvi

>

>

Chatni at 2007-7-5 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 2

It works now. Thanks to U Chatni!

I was using a differt jndi name for the datasource before and it din't like it.

For the CMP beam I used the following configuaration and it worked:

<JDBCDataSource JNDIName="titan-dataSource" Name="titan-dataSource"

PoolName="titan-pool" Targets="MyServer"/>

But for my BMP, as U said, I have to use same DS jndi name as my pool's name:

<JDBCDataSource JNDIName="ejbPool" Name="ejb-dataSource"

PoolName="ejbPool" Targets="myserver"/>

Why the difference? Can U please tell me the reason behind it....

Thanks very much

-Manasvi

nmhb23 at 2007-7-5 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Hi Manasvi,

Hey I m sorry. All the description I gave u was in context of Weblogic7.0 and not Weblogic 6.1(didn't notice that...my mistake).What happens is that in the "weblogic-ejb-jar.xml" u specify the JNDI name for the datasource. Then, when u go to the admin pane u actually map that JNDI name with the connection pool name.Now when u changed the JNDI name u did not create a datasource connecting to the pool with that JNDI name.

Regards

Deepank

> It works now. Thanks to U Chatni!

> I was using a differt jndi name for the datasource

> before and it din't like it.

>

> For the CMP beam I used the following configuaration

> and it worked:

> <JDBCDataSource JNDIName="titan-dataSource"

> Name="titan-dataSource"

> PoolName="titan-pool" Targets="MyServer"/>

>

> But for my BMP, as U said, I have to use same DS jndi

> name as my pool's name:

> <JDBCDataSource JNDIName="ejbPool"

> Name="ejb-dataSource"

> PoolName="ejbPool" Targets="myserver"/>

>

> Why the difference? Can U please tell me the reason

> behind it....

>

> Thanks very much

> -Manasvi

Chatni at 2007-7-5 > top of java,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Hi Deepank!Thanks for the information about mapping. cheers-Manasvi
nmhb23 at 2007-7-5 > top of java,Enterprise & Remote Computing,Enterprise Technologies...