20 May 2010

WLS ListenAddress

When the WebLogic Server is set up to listen a specific port then it stops to listen even the loopback address (localhost/, let's suppose you want to listen each local server where your application has been deployed.

And could appears many Exceptions related to, such as:

Failed to connect to t3://localhost:7003: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
java.net.ConnectException: t3://localhost:7003: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:203)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:344)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:339)
at weblogic.jndi.Environment.getContext(Environment.java:315)
at weblogic.jndi.Environment.getContext(Environment.java:285)
at weblogic.jndi.Environment.createInitialContext(Environment.java:208)
at weblogic.jndi.Environment.getInitialContext(Environment.java:192)
at weblogic.jndi.Environment.getInitialContext(Environment.java:170)
at weblogic.management.commandline.tools.AdminToolHelper.getMBeanHome(AdminToolHelper.java:590)
at weblogic.management.commandline.tools.ServerInfoCommandLineInvoker.doCommandline(ServerInfoCommandLineInvoker.java:924)
at weblogic.management.commandline.tools.ServerInfoCommandLineInvoker.(ServerInfoCommandLineInvoker.java:117)
at weblogic.management.commandline.AdminMain.main(AdminMain.java:132)
at weblogic.Admin.useAdminMain(Admin.java:43)
at weblogic.Admin.main(Admin.java:22)
Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:464)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:315)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:251)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:194)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:225)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:188)
... 16 more

The solution is to eliminate that configuration:

Through the GUI you can go to DOMAIN_NAME -> Environment -> Servers -> SERVER_NAME There you'll find a ``Listen Address'' input text. Leave it blank so WLS can listen to localhost otherwise only it will listen to the address entered.

In the config.xml you will see:


Restart the WLS and try out again, now it should be able to reach to localhost, doing a WLS Ping and deploying your application.
``If a server's listen address is undefined, clients can reach the server through an IP address of the computer that hosts the server, a DNS name that resolves to the host, or the localhost string. The localhost string can be used only for requests from clients that running on the same computer as the server.''

Simple WebLogic Ping

Many times someone wants to see if a WebLogic Server is up and running. This can be checked thru (even it has been deprecated still comes bundled in the last WLS 10.3.x ):

If you wish to use a more modern tool then use WLST, but then you should write more text for the same test.

java weblogic.Admin -url localhost:7001 -username weblogic -password  welcome1 -verbose PING 1 1024

Muchas veces se quiere ver si un WebLogic Server esta arriba y funcionando, esto se puede lograr con (a pesar que ha sido descontinuado aun viene dentro del WLS 10.3.x) :

java weblogic.Admin -url localhost:7001 -username weblogic -password  welcome1 -verbose PING 1 1024

Esta herramienta ya esta deprecada, pero aun sirve y es útil.

Si quieren usar una herramienta actual entonces pueden usar WLST, pero deben poner mas texto para poder hacer la misma prueba.


16 May 2010

Martin Gardner

After reaching Martin Gardner for a particular riddle, He wrote me telling me that he is not longer doing anything related to the subject and have donated all his library to Stanford University.

He always with a innovated progressive thinking...

J2EE Web Services - Richard Monson-Haefel - Source Code

Many times has been asked for for the source code of the J2EE Web Services - Richard Monson-Haefel.
In Code Ranch forums he has answered that question:
``I lost the code for the book ... Always and I mean ALWAYS back up your hard drive! I had kept the book code on my old PC because my copy of XMLSpy only works on PCs (I use a Mac). I'm still trying to recover after a worm or wear-and-tear or something made the PC stop working. It won't even boot now.

I did test the JAXR code a lot. In fact, I ran the code through the ringer twice so I'm not sure why you are having problems. That said, the UBR registries never did behave exactly as expected so maybe there was a change.

Anyway, I haven't had time to rebuild all the code for the book yet. If anyone gets a start on this I'll be happy to open source it.''
 So, if anyone has done something please contact him.

My Blog List

Blog Archive


The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.