• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Prasanna krishnan wrote:
My question is: how can we catch the UnknownHostException here?



 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic