Friday, May 27, 2011

JNDI Objects under JNDI tree is not listed for Weblogic Instance?

As most of us know Weblogic Applications make use of naming services to locate objects in data sources, EJBs, JMS, MailSessions, and so on. A naming service associates names with objects and finds objects based on their given names. JNDI is defined to be independent of any specific naming or directory service implementation. It supports the use of a number of methods for accessing various new and existing services.

The WebLogic Server implementation of JNDI supplies methods that:
-- Give clients access to the WebLogic Server naming services
-- Make objects available in the WebLogic namespace
-- Retrieve objects from the WebLogic namespace
Each WebLogic Server cluster is supported by a replicated cluster-wide JNDI tree that provides access to both replicated and pinned RMI and EJB objects. While the JNDI tree representing the cluster appears to the client as a single global tree, the tree containing the cluster-wide services is actually replicated across each WebLogic Server in the cluster.

Unknowingly or accidentally some of you might have an empty or \ instead of / as <jndi-name> tag in your configuration files. For example an empty <jndi-name> tag was accidentally added in the data-source configuration file. The next time you restart the Weblogic Server instances your JNDI tree for a Weblogic instance will not be displayed and the below error will be logged in your server log file.

Data-Source Config:
<jdbc-data-source-params>

    <jndi-name>example/test/jndiname</jndi-name>
    <jndi-name></jndi-name>
    <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>

</jdbc-data-source-params>


Error Log
java.lang.StackOverflowError
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)

at weblogic.jndi.internal.ServerNamingNode_922_WLStub.listBindings(Unknown Source)

at weblogic.jndi.internal.WLContextImpl.listBindings(WLContextImpl.java:333)

at javax.naming.InitialContext.listBindings(InitialContext.java:406)

at com.bea.jsptools.tree.JNDITreeHelper$PrintContextAction.run(JNDITreeHelper.java:105)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)


Screenshot 

No JNDI Tree visible.


This issue has been identified as a bug [#8164017] in Weblogic 9.2.2MP and is fixed in Weblogic 9.2.4 and higher versions.

The only solution to the issue is to identify and remove/fix all the empty or invalid <jndi-name> tag from your configuration files. You might need to restart your Weblogic Instances once you are done with the fixes.

Screenshot after the Fix:


Steps to Reproduce this problem
1. Create a DataSource

2. Enter a jndi-name with a blank space at the end or with a \ instead of /

3. Then target the data-source to the managed server

4. Activate the changes

5. Restart all the Weblogic Instances in the domain
6. Try to display the JNDI tree in Domain > Servers > ManagedServer > view JNDI tree
 
7. The JNDI objects are not listed

5 comments:

Vijay Naik said...

Hi Sunil, Yes i have seen this many times even in 10g3 of weblogic. If i accidently create with duplicate JINDI name, then also same thing happenes. The tree just don't get displayed at all.

Anonymous said...

Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year old
daughter and said "You can hear the ocean if you put this to your ear."
She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell
someone!

Here is my web page how much should i weigh for my age

Anonymous said...

Thank you fοr аny οther ωondeгful post.
Where else may anyonе gеt that tyрe of infо
іn such аn ideal manneг of writіng?
I've a presentation next week, and I am on the look for such information.

Look at my weblog: legal ecstasy review

Anonymous said...

Thank you for the good writeup. It in fact was a amusement accοunt it.
Look aԁvanced to moгe added agreeable from you!
By the way, hоw cаn we communicate?


My site best herbal highs

Anonymous said...

Wooo, thank you. I mistakenly added a space after the JNLP name, therefore I did not have the data source displayed under the JNLP tree. Thanks for the tips.