• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't get Weblogic Initial Context

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a typical problem with getting Weblogic Initial Context.I have made a very simple client to look up
the session bean.When i run the client with the following
command
java TestBean
it works perfactly.But when i run with the following command
jre -cp .;c:\bea\wlserver6.0\lib\weblogic.jar TestBean
It gives followinf error
java.lang.NoClassDefFoundError: javax/management/DynamicMBean
at
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDel
egate.java:134)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory
.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at TestBean.<init>(TestBean.java:16)
at TestBean.main(TestBean.java:29)
Exception in thread "main" java.lang.InternalError: error initializing kernel
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:105)
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDel
egate.java:134)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory
.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at TestBean.<init>(TestBean.java:16)
at TestBean.main(TestBean.java:29)
I tried with jre versions 1.1.6,1.1.7,1.1.8,1.1.8_008,but
getting the same error.I want to run my program with jre &
not java
If any body can help me pl.
mail me at
shettyteam@im.eth.net
Nitesh
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you have the same classpath all the way down the line. You may have a method being called early on in the stack from a different class.
I had a similar problem using Websphere trying to get the Initial Context. It ran fine from the command line, but not from Visual Age for Java. I found a different rt.jar was being called. Not to say that jar file will be your problem, but make sure everything is in sync.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the WebLogic forum.
------------------
Tom
Sun Certified Programmer for the Java� 2 Platform
Moderator of the forums:
J2EE and EJB
Other Java APIs
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
are u using the same weblogic .jar for the server and client? if not try to set your classpath correctly and order is important in this case ...hope that's help

Originally posted by Nitesh Shetty:
I have a typical problem with getting Weblogic Initial Context.I have made a very simple client to look up
the session bean.When i run the client with the following
command
java TestBean
it works perfactly.But when i run with the following command
jre -cp .;c:\bea\wlserver6.0\lib\weblogic.jar TestBean
It gives followinf error
java.lang.NoClassDefFoundError: javax/management/DynamicMBean
at
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDel
egate.java:134)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory
.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at TestBean.<init>(TestBean.java:16)
at TestBean.main(TestBean.java:29)
Exception in thread "main" java.lang.InternalError: error initializing kernel
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:105)
at weblogic.jndi.WLInitialContextFactoryDelegate.<init>(WLInitialContextFactoryDel
egate.java:134)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory
.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242)
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at TestBean.<init>(TestBean.java:16)
at TestBean.main(TestBean.java:29)
I tried with jre versions 1.1.6,1.1.7,1.1.8,1.1.8_008,but
getting the same error.I want to run my program with jre &
not java
If any body can help me pl.
mail me at
shettyteam@im.eth.net
Nitesh


 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic