Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to catch root exception thrown by domain runtime MBean Server in Weblogic  RSS feed

 
Prasanna krishnan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have some java code which initialises a MBean server connection. This code is called by a ant task. The ant task uses parameters like host name, username and password. On executing the ant task with the parameters, I get an exception as shown below:




EXCEPTION
------------------

validateMDSwithInvalidHost:
[ValidateMDS] java.io.IOException
[ValidateMDS] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:187)
[ValidateMDS] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:81)
[ValidateMDS] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:338)
[ValidateMDS] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
[ValidateMDS] at oracle.apps.fnd.provisioning.ant.taskdefs.validation.ValidateMDS.initConnection(ValidateMDS.java:352)
[ValidateMDS] at oracle.apps.fnd.provisioning.ant.taskdefs.validation.ValidateMDS.execute(ValidateMDS.java:207)
[ValidateMDS] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[ValidateMDS] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[ValidateMDS] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ValidateMDS] at java.lang.reflect.Method.invoke(Method.java:597)
[ValidateMDS] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[ValidateMDS] at org.apache.tools.ant.Task.perform(Task.java:348)
[ValidateMDS] at org.apache.tools.ant.Target.execute(Target.java:357)
[ValidateMDS] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[ValidateMDS] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[ValidateMDS] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[ValidateMDS] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ValidateMDS] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[ValidateMDS] at org.apache.tools.ant.Main.runBuild(Main.java:698)
[ValidateMDS] at org.apache.tools.ant.Main.startAnt(Main.java:199)
[ValidateMDS] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[ValidateMDS] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[ValidateMDS] Caused by: javax.naming.ServiceUnavailableException [Root exception is java.net.UnknownHostException: stpcy05]
[ValidateMDS] at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:34)
[ValidateMDS] at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:783)
[ValidateMDS] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:365)
[ValidateMDS] at weblogic.jndi.Environment.getContext(Environment.java:315)
[ValidateMDS] at weblogic.jndi.Environment.getContext(Environment.java:285)
[ValidateMDS] at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
[ValidateMDS] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
[ValidateMDS] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
[ValidateMDS] at javax.naming.InitialContext.init(InitialContext.java:223)
[ValidateMDS] at javax.naming.InitialContext.<init>(InitialContext.java:197)
[ValidateMDS] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:169)
[ValidateMDS] ... 21 more
[ValidateMDS] Caused by: java.net.UnknownHostException: stpcy05
[ValidateMDS] at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
[ValidateMDS] at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
[ValidateMDS] at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200)
[ValidateMDS] at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
[ValidateMDS] at java.net.InetAddress.getAllByName(InetAddress.java:1083)
[ValidateMDS] at java.net.InetAddress.getAllByName(InetAddress.java:1019)
[ValidateMDS] at weblogic.rjvm.RJVMFinder.getDnsEntries(RJVMFinder.java:422)
[ValidateMDS] at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:192)
[ValidateMDS] at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
[ValidateMDS] at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
[ValidateMDS] at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:344)
[ValidateMDS] at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
[ValidateMDS] at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
[ValidateMDS] at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:339)
[ValidateMDS] ... 29 more




My question is: how can we catch the UnknownHostException here?
Please let me know.
Thanks

[NK: Added Code Tags. Please Use code tags while posting code]
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasanna krishnan wrote:
My question is: how can we catch the UnknownHostException here?


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!