Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

new InitialContext() hangs up...help please

819650Jan 29 2011 — edited Feb 1 2011
Hi,

I met a problem like the function "InitialContext()" hung up for many days...I'm using the Java ORB for RMI-IIOP communications.
The JDK version looks like,
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Server VM (build 17.0-b16, mixed mode)

My source looks like,

ORB orb = ORB.init((String[])null, properties);
Hashtable environment = new Hashtable();
environment.put("java.naming.factory.initial",
"com.sun.jndi.cosnaming.CNCtxFactory");
environment.put("java.naming.provider.url", "iiop://" + hostname + ":"
+ portId);
environment.put("java.naming.corba.orb", orb);
// Setup naming context
namingContext = new InitialContext(environment); -----> hung up here

The orb properties look like,
/opt/cems/jre/bin/orbd -ORBInitialPort 1050 -ORBServerHost 47.224.244.57 -defaultdb /opt/cems/adm/orb.db -Dcom.sun.CORBA.connection.ORBHighWaterMark=4050 -Dcom.sun.CORBA.connection.ORBLowWaterMark=4000 -J-Xmx256m

The thread dump looks like,

"Thread-9" daemon prio=3 tid=0x0032bc00 nid=0x1c in Object.wait() [0xb637e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xe760a370> (a java.lang.Object)
at java.lang.Object.wait(Object.java:485)
at com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl.waitForResponse(CorbaResponseWaitingRoomImpl.java:140)
- locked <0xe760a370> (a java.lang.Object)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.waitForResponse(SocketOrChannelConnectionImpl.java:1084)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.waitForResponse(CorbaMessageMediatorImpl.java:253)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(CorbaClientRequestDispatcherImpl.java:362)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:336)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:213)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:404)
at com.sun.jndi.cosnaming.CNCtx.initUsingIiopUrl(CNCtx.java:298)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:264)
at com.sun.jndi.cosnaming.CNCtx.initOrbAndRootContext(CNCtx.java:232)
at com.sun.jndi.cosnaming.CNCtx.<init>(CNCtx.java:87)
at com.sun.jndi.cosnaming.CNCtxFactory.getInitialContext(CNCtxFactory.java:32)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.NTX.cdma.gsf.util.NamingServerUtilities.getNamingContext(NamingServerUtilities.java:122)
at com.NTX.cdma.gsf.process.ProcessWatchdog.waitForNamingServer(ProcessWatchdog.java:3669)
at com.NTX.cdma.gsf.process.NamingServerThread.run(NamingServerThread.java:273)
- locked <0xe760a2e0> (a com.NTX.cdma.gsf.process.NamingServerThread)

Would anyone give me some suggestions?

Thanks.

Edited by: Arica on Jan 29, 2011 5:49 PM

Edited by: Arica on Jan 29, 2011 5:50 PM

Comments

unknown-951199

>Anyone has any ideas?

a problem exists

content deleted

How do I ask a question on the forums?

https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002

Ivica Arsov

Hi,

You need to provide more detail information ... from this I see shutdown initiated by user.

Ivica

jgarry

What platform are you on?  Do you have a cron doing a bounce for backups?  Does it happen at the same time?  Are you on a VM?

BPeaslandDBA

Occasionally, it automatically shuts itself down

Shutting down instance (immediate)

The two statements above are in direct opposition to itself. The database will not automatically shut itself down and the second line shows a SHUTDOWN IMMEDIATE was explicitly requested. Now maybe you didn't do the requesting, but someone or better yet...something made the request. Check for scheduled batch jobs that are performing a cold backup...or one that the previous DBA implemented to perform a regular restart "just to clear things up".

Cheers,

Brian

Aman....

Like other members have mentioned, without an explicit attempt, it's not possible. So check for any scheduled jobs, review the auditing logs and ask around if someone is having itchy fingers.

Aman....

Harmandeep Singh

Just two cents, From the timings of shutdown and startup, as others said, look at various logs and cron jobs

Regards,

Harman

tvCa-Oracle

There's different ways to find out, one is to start changing passwords. Of course, using the pre-designed method.

It could be an external system, reaching out to your server.

Could be a lot, really. But just check Crontab

Vsevolod Afanassiev

Is it running in noarchive,log mode? May be it gets shut down for cold backup?

Is there a time gap between shutdown and startup?

What's about the server where the database is running? Does it stay up or it also gets restarted? On UNIX user "uptime" to determine when a server was restarted.

User726571-Oracle

Hi All,

Thank you very much for all of the replies. My sincere apologies for not fully complying with all forum rules and etiquettes.

This is a QE automatic  environment where the problem is seen occasionally (not always).

It cannot be reproduced in development or other manually driven QE environment.

Here is the information on the automatic process and its environment.

* It accepts a job request with all necessary parameters from a user

* it arbitrarily allocates a host machine - a Linux (OLE5/6) image, from a pool of hosts

* It installs the DB (oracle 11.2.0.1.0) on the that host

* It installs the applications/products on the same host

* It runs all kinds of test scripts that include some selenium tests for UI implemented using Oracle ADF

* It occasionally fails only on selenium tests

* After completion of the job, it creates a job report on partially or fully successful tests.

* The host image is available for a few hours after the job completion notification

* Users have access to DB log files and application log files for a few hours.

* The host image is then retuned to the pool of hosts and thereafter no further access to the host is possible.

Regards,

-ab

jgarry

Well, in the absence of other errors, the likelihood is either there is something wrong with the script, or somehow it is getting run twice without actually creating a new VM (I'm guessing however it is created assumes it is not in use), or you have some backup routine for the VM that shuts down the db in conflict with the test, or something else is wrong.

I have seen situations where VMs run out of resources and restart, leaving old ones hanging, but that depends on the VM.

1 - 10
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 1 2011
Added on Jan 29 2011
9 comments
1,995 views