Prasanna Kulkarni

+ Follow
since Jan 07, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prasanna Kulkarni


I'm defining a JDBC datasource in my weblogic(10.3.5) domain with JNDI name "weblogic.xyzDataSource". I have defined this data source from admin console.
When I try to look up this data source from code, I do not get it instead get a naming exception saying

javax.naming.NameNotFoundException: While trying to look up /weblogic.xyzDataSource in myclass.; remaining name '/weblogic/xyzDataSource'

Some surprising things are -

1. When WLS boots up, it shows a message that this datasource is successfully tied to assigned JNDI name with message like -
[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1315572938610> <BEA-001174> <Creating Data Source named xyzDataSource, JNDI Name = weblogic.xyzDataSource>

2. When I do JNDI tree lookup from admin console, I can see this data source in weblogic tree

3. I tried to change jndi name to something like "XYZ" only but still same error.

4. When I test datasource from admin console, it is successful.

5. Same code works with 8.1 (Now my application is migrated successfully to 10.3 except this error )

My JDBC data source XML is as follows:(Replacing host/user/sid/pwd with real values)

<jdbc-data-source xmlns="" xmlns:sec="" xmlns:wls="" xmlns:xsi="" xsi:schemaLocation="">

My code to look JNDI name is as follows:


javax.naming.NameNotFoundException: While trying to look up /weblogic.xyzDataSource inmyclass.; remaining name '/weblogic/xyzDataSource'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(
at weblogic.jndi.internal.ApplicationNamingNode.lookup(
at weblogic.jndi.internal.WLEventContextImpl.lookup(
at weblogic.jndi.internal.WLContextImpl.lookup(
at weblogic.jndi.internal.AbstractURLContext.lookup(
at javax.naming.InitialContext.lookup(

Please help me, I have searched a lot and tried a lot but it does not work

Thanks !
9 years ago
Hi, this is something funny

double amount = 128.98;

This gives answer - 12897.999999999998 and not 12898.00 !

This only happens after 128.98 [E.g for 128.98, 129.98 etc] - also specifically for 0.98, not even 0.99...

Anybody knows the reason ?
12 years ago

My friend had following conversation during interview:

Interviewer: Can garbage collection be forced.
My Friend: No, it can not, its a low priority thread and ...We are never sure when it will run.
Interviewer: Yes gc can be forced, If we write a JVM which runs gc thread on definite intervals then we are sure it'll run for sure, and we can force according to timer.

Now, I dont know what the interviewer meant exactly but I think doing something like that will be like not following Java specification so that VM can not be called as "J"VM on the first place.

Any comments? Am I wrong?
15 years ago
Thank you very much for helping ,
both the reasonings seem very logical.
16 years ago
Sorry If I've been confusing.

The method returns int...but fills up the passed array with the
active Thread question is....
Why the method is designed in such a way...why doesnt it returns array directly...why do we need 2 pass it?
[ January 24, 2005: Message edited by: Prasanna Kulkarni ]
16 years ago
Hi all,
In Java there are some methods, which return their result in the supplied
parameter (most of the times array)... particulary the methods which return array of any specific kind of Objects.
e.g. static int enumerate(Thread[] array) in Thread class.

Now my question is...why these methods' signatures are like this?
Please, don't get me wrong,
but why not the method is designed in such a way that it will directly return the array...and we dont have to supply it as a parameter?

there are number of such methods in io package also.

Is there any specific reason for this type of method signatures?
16 years ago
Yes off course procedure may be wrong !
But just make sure that, you are not keeping two diff resultset open at a time for a single callable statement, more specifically a resultset opened inside while for a prior resultset.
This may cause this weired behaviour.
16 years ago
Hi All;

Here's some wierd problem I'm facing while handeling multiple resultsets from stored procedure.

I've a stored procedure that returns multiple cursors. And I access them
in my code. After accessing the first resultset when I want to access next
one. As usual I code it like


But I get ResultsetObj as null...and I know that stored produre returns valid data for 2nd I have confirmed it by running the procedure in stored procedure builder.
I'm using IBM DB2 7.0

I'll be very glad, If anybody can give me the clarification.
Hi all,
I want to know that whethere I can send SMS from website to the mobile
using the JMS api
If it is not possible, then whats the way that I can code such an application. Are there any other apis I can use
Hi All,
Thankx to Michael Yuan first...but now I'll like to put more generelized question--Is there any way that I can write an application using java for sending SMS from website...but I WANT TO USE THOSE APIS which are either provided free or available for free download on sun's site.
Plz...apologize me if anybody feels the wording very primary and basic as I'm aneophyte in this field
17 years ago
Hi All,
I came to know that one can not use javax.wireless.messaging api for j2se. Is there any way that I can write my appliction in j2se and can send
sms from website to mobile.
Can anybody guide me. Also provide me if u know any resource links
Thanx in advance
17 years ago
Hi All,
Can I use javax.wireless.messaging api in j2se? Are any other apis I need to
import if I want to use it?
I want to write an application for sending sms through web?
17 years ago
Hi All,
I want to write application for sending sms from web
Can I use wma api in j2se for writing it
Please help me.
17 years ago
Can I use WMA provided as optional package in J2me for writing application in j2se
I want to write application for sending sms from web. How can I write this application in j2se using only provided wma api in j2me?
Is there any way?
Plz guide me...thanks in advance
17 years ago
Hi all,
I want to write application for sending sms from web
Can I write it in j2se only
Plz Help ms...thanx in advance.
17 years ago