Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't get Weblogic Initial Context  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • 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
 
Neil Goldsmith
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • 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.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!